Uploaded image for project: 'IronJacamar'
  1. IronJacamar
  2. JBJCA-1264

NullPointerException hides cause of PostgreSql Exception for getConnection call.


    • Hide

      set the loglevel property to 2 on a datasource.

      set the loglevel property to 2 on a datasource.

      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


      In my case clw is null. Which then causes an NullPointerException. Completely hiding the underlying exception to the user.

            jpederse@redhat.com Jesper Pedersen
            jwhiting@redhat.com Jeremy Whiting
            0 Vote for this issue
            2 Start watching this issue