6 Replies Latest reply on Aug 16, 2016 7:06 AM by Rajitha Gunawardhane

    Datasource exception after some time

    Rajitha Gunawardhane Newbie

      Hi,

      I have created few oracle data sources and test the connection from admin panel it worked with out any issue. But after some time it is giving following error for all data sources.

       

      Server start log:

       

      15:12:31,100 INFO  [org.infinispan.factories.GlobalComponentRegistry] (MSC service thread 1-1) ISPN000128: Infinispan version: Infinispan 'Mahou' 8.1.0.Final

      15:12:31,118 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-7) WFLYJCA0001: Bound data source [java:jboss/datasources/A_prod_ds]

      15:12:31,124 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-8) WFLYJCA0001: Bound data source [java:jboss/datasources/ExampleDS]

      15:12:31,150 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-8) WFLYJCA0001: Bound data source [java:jboss/datasources/B_prod_ds]

      15:12:31,119 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-5) WFLYJCA0001: Bound data source [java:jboss/datasources/C_prod_ds]

      15:12:31,118 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-4) WFLYJCA0001: Bound data source [java:jboss/datasources/D_prod_ds]

      15:12:31,118 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-1) WFLYJCA0001: Bound data source [java:jboss/datasources/E_prod_ds]

       

       

       

      Error Log:

       

      15:14:40,854 ERROR [org.jboss.jca.core.tx.jbossts.XAResourceRecoveryImpl] (Periodic Recovery) IJ000906: Error during crash recovery: java:jboss/datasources/A_prod_ds (IJ031084: Unable to create connection): javax.resource.ResourceException: IJ031084: Unable to create connection

              at org.jboss.jca.adapters.jdbc.xa.XAManagedConnectionFactory.getXAManagedConnection(XAManagedConnectionFactory.java:509)

              at org.jboss.jca.adapters.jdbc.xa.XAManagedConnectionFactory$1$1.run(XAManagedConnectionFactory.java:395)

              at org.jboss.jca.adapters.jdbc.xa.XAManagedConnectionFactory$1$1.run(XAManagedConnectionFactory.java:392)

              at java.security.AccessController.doPrivileged(Native Method)

              at javax.security.auth.Subject.doAs(Subject.java:422)

              at org.jboss.jca.adapters.jdbc.xa.XAManagedConnectionFactory$1.run(XAManagedConnectionFactory.java:391)

              at org.jboss.jca.adapters.jdbc.xa.XAManagedConnectionFactory$1.run(XAManagedConnectionFactory.java:388)

              at java.security.AccessController.doPrivileged(Native Method)

              at org.jboss.jca.adapters.jdbc.xa.XAManagedConnectionFactory.createManagedConnection(XAManagedConnectionFactory.java:387)

              at org.jboss.jca.core.tx.jbossts.XAResourceRecoveryImpl.open(XAResourceRecoveryImpl.java:355)

              at org.jboss.jca.core.tx.jbossts.XAResourceRecoveryImpl.getXAResources(XAResourceRecoveryImpl.java:193)

              at com.arjuna.ats.internal.jbossatx.jta.XAResourceRecoveryHelperWrapper.getXAResources(XAResourceRecoveryHelperWrapper.java:51)

              at com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.resourceInitiatedRecoveryForRecoveryHelpers(XARecoveryModule.java:519)

              at com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.periodicWorkFirstPass(XARecoveryModule.java:185)

              at com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.doWorkInternal(PeriodicRecovery.java:747)

              at com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.run(PeriodicRecovery.java:375)

      Caused by: java.sql.SQLException: ORA-01017: invalid username/password; logon denied

       

              at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:450)

              at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:392)

              at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:385)

              at oracle.jdbc.driver.T4CTTIfun.processError(T4CTTIfun.java:938)

              at oracle.jdbc.driver.T4CTTIoauthenticate.processError(T4CTTIoauthenticate.java:476)

              at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:655)

              at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:249)

              at oracle.jdbc.driver.T4CTTIoauthenticate.doOAUTH(T4CTTIoauthenticate.java:412)

              at oracle.jdbc.driver.T4CTTIoauthenticate.doOAUTH(T4CTTIoauthenticate.java:821)

              at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:596)

              at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:711)

              at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:385)

              at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:30)

              at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:558)

              at oracle.jdbc.pool.OracleDataSource.getPhysicalConnection(OracleDataSource.java:297)

              at oracle.jdbc.xa.client.OracleXADataSource.getPooledConnection(OracleXADataSource.java:500)

              at oracle.jdbc.xa.client.OracleXADataSource.getXAConnection(OracleXADataSource.java:174)

              at oracle.jdbc.xa.client.OracleXADataSource.getXAConnection(OracleXADataSource.java:143)

              at org.jboss.jca.adapters.jdbc.xa.XAManagedConnectionFactory.getXAManagedConnection(XAManagedConnectionFactory.java:492)

              ... 15 more

       

      What could be the issue

        • 1. Re: Datasource exception after some time
          Wolfgang Mayer Master

          >>> ORA-01017: invalid username/password; logon denied

          You should make sure that the credentials are correct

          • 2. Re: Datasource exception after some time
            Rajitha Gunawardhane Newbie

            But when testing from Admin panel it is successful. Isn't admin panel not using username/password  when testing connection?

            • 3. Re: Datasource exception after some time
              Wolfgang Mayer Master

              Not neccessarily. Which username/password do you refer to?

               

              Can you access the database directly (eg via SQLPlus)?

               

              You should also check in the source file of your program how the authentication is made against the database.

              How is the database connected (JDBC, JPA, ...)?

              • 4. Re: Datasource exception after some time
                Rajitha Gunawardhane Newbie

                It is JPA, When i check the connection from SQL developer it is working fine for the given user name and password. The reason could be that i have missed the following section of the data source.

                 

                                    <recovery no-recovery="false">

                                        <recover-credential>

                                            <user-name>user</user-name>

                                            <password>password</password>

                                        </recover-credential>

                                    </recovery>

                 

                Now i am not getting above exception but a new one like below. What could be the issue this time?

                 

                15:55:44,269 WARN  [com.arjuna.ats.jta] (Periodic Recovery) ARJUNA016027: Local XARecoveryModule.xaRecovery got XA exception XAException.XAER_RMERR: javax.transaction.xa.XAException

                        at oracle.jdbc.xa.OracleXAResource.recover(OracleXAResource.java:727)

                        at org.jboss.jca.adapters.jdbc.xa.XAManagedConnection.recover(XAManagedConnection.java:362)

                        at org.jboss.jca.core.tx.jbossts.XAResourceWrapperImpl.recover(XAResourceWrapperImpl.java:185)

                        at com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.xaRecoveryFirstPass(XARecoveryModule.java:550)

                        at com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.periodicWorkFirstPass(XARecoveryModule.java:190)

                        at com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.doWorkInternal(PeriodicRecovery.java:747)

                        at com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.run(PeriodicRecovery.java:375)

                • 5. Re: Datasource exception after some time
                  Wolfgang Mayer Master

                  The XAER_RMERR message may be related to missing permissions (XAER_RMERR during XA transaction recovery for Oracle database in JBoss EAP - Red Hat Customer Portal)

                  But I don't think this XA message is related to the above problem.

                  Does the authentication issue only come up in the XA configuration?

                  Where did you configure the credentials before?

                  • 6. Re: Datasource exception after some time
                    Rajitha Gunawardhane Newbie

                    Hi Wolfgang,

                     

                    Thank you for your quick reply now it is resolved i will list steps again here, so that it may help for others.

                     

                    There are two places for user/password

                    Main:

                    <xa-datasource-property name="User">user</xa-datasource-property>

                    <xa-datasource-property name="Password">password</xa-datasource-property>

                     

                    Recovery:

                    <recover-credential>

                            <user-name>user</user-name>

                            <password>password</password>

                    </recover-credential>

                    Not sure if we can set to use main info recovery as well. Then what is the purpose??? another question, May be i need to disable recovery.

                     

                    If recovery is used, Use above link for XAER_RMERR message.