[jboss-jira] [JBoss JIRA] (JBJCA-1264) NullPointerException hides cause of PostgreSql Exception for getConnection call.

Jesper Pedersen (JIRA) issues at jboss.org
Fri May 1 07:57:45 EDT 2015


     [ https://issues.jboss.org/browse/JBJCA-1264?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jesper Pedersen reopened JBJCA-1264:
------------------------------------


> NullPointerException hides cause of PostgreSql Exception for getConnection call.
> --------------------------------------------------------------------------------
>
>                 Key: JBJCA-1264
>                 URL: https://issues.jboss.org/browse/JBJCA-1264
>             Project: IronJacamar
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.0.30.Final
>         Environment: All environments.
>            Reporter: Jeremy Whiting
>            Assignee: Jesper Pedersen
>              Labels: nullPointerException, pgsqlexception
>             Fix For: 1.0.32.Final
>
>
> When a datasource using PostgreSql is configured with the "loglevel" property the JCA db server causes a PGSqlException. Besides that cause the exception is not displayed to the user.
> org.postgresql.util.PSQLException: Connection to localhost:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
> The JCA code attempts to handle the exception in a catch block. Initially by logging a message. But the JCA code to log the message assumes the clw reference is not null. On this line
> https://github.com/ironjacamar/ironjacamar/blob/ironjacamar-1.0.30.Final/core/src/main/java/org/jboss/jca/core/connectionmanager/pool/mcp/SemaphoreConcurrentLinkedQueueManagedConnectionPool.java#L398
> In my case clw is null. Which then causes an NullPointerException. Completely hiding the underlying exception to the user.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


More information about the jboss-jira mailing list