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

ConnectionListenerWrapper NullPointerException in ConnectionValidator

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 1.5.19.Final, 3.0.11.Final
    • None
    • None
    • None
    • Hide
      1. start postgresql by podman.
      2. add module and jdbc driver by CLI.
      3. add xa datasource by CLI.
      4. stop postgresql.
      5. WARN mesage can be checked.
      // CLI at step.2
      [disconnected /] module add --name=org.postgresql --resources=/home/manabu/podman_database/jdbc/postgresql-42.7.4.jar --dependencies=wildflyee.api,sun.jdk,ibm.jdk,javax.api
      /subsystem=datasources/jdbc-driver=postgresql:add(driver-name=postgresql,driver-module-name=org.postgresql,driver-xa-datasource-class-name=org.postgresql.xa.PGXADataSource)
      
      // CLI at step.3
      xa-data-source add --name=PostgresXADS --jndi-name=java:jboss/datasources/PostgresXADS --driver-name=postgresql --user-name=username --password=password --background-validation=true --background-validation-millis=10000 --check-valid-connection-sql="select 1" --exception-sorter-class-name=org.jboss.jca.adapters.jdbc.extensions.postgres.PostgreSQLExceptionSorter --pool-prefill=true --initial-pool-size=1 --min-pool-size=2 --max-pool-size=4 --xa-datasource-properties={"ServerName"=>"localhost","PortNumber"=>"5432","DatabaseName"=>"test"}
      Show
      start postgresql by podman. add module and jdbc driver by CLI. add xa datasource by CLI. stop postgresql. WARN mesage can be checked. // CLI at step.2 [disconnected /] module add --name=org.postgresql --resources=/home/manabu/podman_database/jdbc/postgresql-42.7.4.jar --dependencies=wildflyee.api,sun.jdk,ibm.jdk,javax.api /subsystem=datasources/jdbc-driver=postgresql:add(driver-name=postgresql,driver-module-name=org.postgresql,driver-xa-datasource- class- name=org.postgresql.xa.PGXADataSource) // CLI at step.3 xa-data-source add --name=PostgresXADS --jndi-name=java:jboss/datasources/PostgresXADS --driver-name=postgresql --user-name=username --password=password --background-validation= true --background-validation-millis=10000 --check-valid-connection-sql= "select 1" --exception-sorter- class- name=org.jboss.jca.adapters.jdbc.extensions.postgres.PostgreSQLExceptionSorter --pool-prefill= true --initial-pool-size=1 --min-pool-size=2 --max-pool-size=4 --xa-datasource-properties={ "ServerName" => "localhost" , "PortNumber" => "5432" , "DatabaseName" => "test" }

      7.4.19 produces the following WARN message.

      09:43:21,474 WARN  [org.jboss.jca.core.connectionmanager.pool.validator.ConnectionValidator] (ConnectionValidator) IJ000602: ConnectionValidator ignored unexpected runtime exception: java.lang.NullPointerException
          at org.jboss.ironjacamar.impl@1.5.18.Final-redhat-00001//org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreConcurrentLinkedDequeManagedConnectionPool.validateConnections(SemaphoreConcurrentLinkedDequeManagedConnectionPool.java:1490)
          at org.jboss.ironjacamar.impl@1.5.18.Final-redhat-00001//org.jboss.jca.core.connectionmanager.pool.validator.ConnectionValidator$ConnectionValidatorRunner.run(ConnectionValidator.java:285)
          at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
          at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
          at java.base/java.lang.Thread.run(Thread.java:829)
      

      8.0.3 produces the following WARN message.

      13:28:51,606 WARN  [org.jboss.jca.core.connectionmanager.pool.validator.ConnectionValidator] (ConnectionValidator) IJ000602: ConnectionValidator ignored unexpected runtime exception: java.lang.NullPointerException: Cannot invoke "org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreConcurrentLinkedDequeManagedConnectionPool$ConnectionListenerWrapper.getConnectionListener()" because "clw" is null
          at org.jboss.ironjacamar.impl@3.0.8.Final-redhat-00001//org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreConcurrentLinkedDequeManagedConnectionPool.validateConnections(SemaphoreConcurrentLinkedDequeManagedConnectionPool.java:1499)
          at org.jboss.ironjacamar.impl@3.0.8.Final-redhat-00001//org.jboss.jca.core.connectionmanager.pool.validator.ConnectionValidator$ConnectionValidatorRunner.run(ConnectionValidator.java:285)
          at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
          at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
          at java.base/java.lang.Thread.run(Thread.java:840) 

            lvydra Lukas Vydra
            lvydra Lukas Vydra
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: