Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NullPointerException during failure logging #1245

Closed
amir-khassaia opened this issue Jul 10, 2018 · 1 comment
Closed

NullPointerException during failure logging #1245

amir-khassaia opened this issue Jul 10, 2018 · 1 comment

Comments

@amir-khassaia
Copy link

PostgreSQL JDBC driver 42.2.2

During connection failure the log message being generated together with slf4j/log4j 1.x results in a further NPE due to logger being null once the logging record was generated by postgres.

Caused by: java.lang.NullPointerException
at org.apache.log4j.CategoryKey.(CategoryKey.java:32)
at org.apache.log4j.Hierarchy.getLogger(Hierarchy.java:266)
at org.apache.log4j.Hierarchy.getLogger(Hierarchy.java:247)
at org.apache.log4j.LogManager.getLogger(LogManager.java:228)
at org.apache.log4j.Logger.getLogger(Logger.java:104)
at ...server.JavaToLog4JHandler.publish(JavaToLog4JHandler.java:26)
at java.util.logging.Logger.log(Logger.java:738)
at org.postgresql.core.v3.ConnectionFactoryImpl.log(ConnectionFactoryImpl.java:317)
at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:252)
at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:49)
at org.postgresql.jdbc.PgConnection.(PgConnection.java:195)
at org.postgresql.Driver.makeConnection(Driver.java:452)
at org.postgresql.Driver.connect(Driver.java:254)

@davecramer
Copy link
Member

fixed in #1187

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants