Ich benutze Wildfly8 und postgresql als meine DB. Ich brauche org.postgresql.PGConnection, um die LISTEN/NOTIFY-Funktionalität von postgresql zu implementieren.Verbindung Cast Ausnahme Wildfly
Mein Code sieht so aus:
private Connection conn;
private org.postgresql.PGConnection pgconn;
Conn = entityManager.unwrap(java.sql.Connection.class);
this.pgconn = conn.unwrap(org.postgresql.PGConnection.class);
Ich erhalte folgende Ausnahme:
java.sql.SQLException: Not a wrapper for: org.postgresql.PGConnection
Was hier das Problem sein kann?
Beim Drucken des Wertes von Conn, erhalte ich: : [email protected] –