5 Replies Latest reply on Mar 20, 2014 3:42 AM by Joep Vaes

    Jboss connection error please help?

    Maimur Hasan Newbie

      I am getting the following error for a particular value but working for other values. Can any body help me why is this happening my database is postgres 8.4.17. My connection jar is pg73jdbc3.jar. I am attaching the postgresql-ds.xml and login-xml file also.

       

       

      2013-08-10 12:11:32,588 WARN  [org.jboss.resource.connectionmanager.TxConnectionManager] (http-0.0.0.0-8080-3) Connection error occured: org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener@161ae499[state=NORMAL mc=org.jboss.resource.adapter.jdbc.local.LocalManagedConnection@706ba7cf handles=1 lastUse=1376116869815 permit=true trackByTx=false mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool@1c387843 context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@3f5f852e xaResource=org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource@5296d03b txSync=null]: java.lang.NullPointerException

        • 1. Re: Jboss connection error please help?
          Madhusudhan raju Newbie

          Which version of JBoss AS you are using?

          • 2. Re: Jboss connection error please help?
            Maimur Hasan Newbie

            I am using jboss 6

            • 3. Re: Jboss connection error please help?
              Madhusudhan raju Newbie

              You cannot use *-ds.xml file in JBoss 6

               

              any more...

               

              For Configuring JDBC driver and datasource follow the below steps:

               

              Step 1: Deploy your jdbc driver (postgresql-9.1-902.jdbc4.jar) under JBoss_6_Home\modules\org\postgresql\main  directory (if such directory doesn't exists create one)

               

              Step 2: P

               

              lace the following module.xml file under JBoss_6_Home\modules\org\postgresql\main  directory

               

              <module xmlns="urn:jboss:module:1.1" name="org.postgresql">
              <resources>
              <resource-root path="postgresql-9.1-902.jdbc4.jar"/>
              </resources>
              <dependencies>
              <module name="javax.api"/>
              <module name="javax.transaction.api"/>
              </dependencies>
              </module>

               

              Step 3: Configure your datasource standalone.xml

               

              file under JBoss_6_Home\standalone\configuration as below

               

              Find the datasource tag in the standalone.xml file and configure as

               

              below:

               

              <datasources>
              <datasource jndi-name="java:jboss/PostgresDS" pool-name="PostgresDS">
              <connection-url>jdbc:postgresql://localhost:5432/postgresdb</connection-url>
              <driver>postgresql</driver>
              <security>
              <user-name>admin</user-nam e>
              <password>admin</password>
              </security>
              <validation>
              <valid-connection-checker classname="org.jboss.jca.adapters.jdbc.extensions.postgres.PostgreSQLValidConnectionChecker"></valid-connection-checker>
              <exception-sorter classname="org.jboss.jca.adapters.jdbc.extensions.postgres.PostgreSQLExceptionSorter">
              </exception-sorter>
              </validation>
              </datasource>
              <drivers>
              <driver name="postgresql" module="org.postgresql">
              <xa-datasource-class>org.postgresql.xa.PGXADataSource</xa-datasource-class>
              </driver>
              </drivers>
              </datasources>

               

              Replace connection url according to your application, the above procedure might work...

               

              Regards,

              Madhu

              • 4. Re: Jboss connection error please help?
                Maimur Hasan Newbie

                I understand what you say but currently I am able to connect to my database from my application. and also i will try what you say.

                • 5. Re: Jboss connection error please help?
                  Joep Vaes Newbie

                  Hi Maimur, we have had the same issue twice yesterday, using jboss 6.1. Do you happen to have a solution/reason for the issue?

                   

                  Regards,

                   

                  Joep Vaes