1 Reply Latest reply on Jun 10, 2016 2:40 AM by Purush Reddy

    Error SQL Error: 0, SQLState: null ...org.hibernate.exception.GenericJDBCException: Could not open connection in Wildfly 8.1.0 final

    good life Newbie

      Hi everyone,

         Current, I using wildfly 8.1.0 and happening error following:

      08:21:03,937 WARN  [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (default-threads - 46) SQL Error: 0, SQLState: null

      08:21:03,937 ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (default-threads - 46) javax.resource.ResourceException: IJ000460: Error checking for a transaction

      08:21:03,938 ERROR [stderr] (default-threads - 23) ERROR ProfileCrawlerStatisticConsumerService: {"accountName":"fbjson.","profileUrl":"https://www.abc.com/profile.php?id=100002022348787","time":1450367418043}

      08:21:03,938 ERROR [stderr] (default-threads - 23) org.hibernate.exception.GenericJDBCException: Could not open connection

      08:21:03,938 INFO  [stdout] (default-threads - 23) https://www.abc.com/profile.php?id=100009601395964

      08:21:03,938 ERROR [stderr] (default-threads - 46) ERROR ProfileCrawlerStatisticConsumerService: {"accountName":"fbjson.","profileUrl":"https://www.abc.com/profile.php?id=100001898002211","time":1450367439633}

      08:21:03,938 ERROR [stderr] (default-threads - 46) org.hibernate.exception.GenericJDBCException: Could not open connection

      08:21:03,939 INFO  [stdout] (default-threads - 46) https://www.abc.com/profile.php?id=100002909562687

      08:21:03,939 WARN  [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (default-threads - 23) SQL Error: 0, SQLState: null

      08:21:03,939 ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (default-threads - 23) javax.resource.ResourceException: IJ000460: Error checking for a transaction

      08:21:03,939 WARN  [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (default-threads - 46) SQL Error: 0, SQLState: null

      08:21:03,939 ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (default-threads - 46) javax.resource.ResourceException: IJ000460: Error checking for a transaction

      08:21:03,940 ERROR [stderr] (default-threads - 46) ERROR ProfileCrawlerStatisticConsumerService: {"accountName":"fbjson.","profileUrl":"https://www.abc.com/profile.php?id=100002909562687","time":1450367439633}

      08:21:03,940 ERROR [stderr] (default-threads - 23) ERROR ProfileCrawlerStatisticConsumerService: {"accountName":"fbjson.","profileUrl":"https://www.abc.com/profile.php?id=100009601395964","time":1450367426688}

      08:21:03,940 ERROR [stderr] (default-threads - 46) org.hibernate.exception.GenericJDBCException: Could not open connection

      08:21:03,940 ERROR [stderr] (default-threads - 23) org.hibernate.exception.GenericJDBCException: Could not open connection

      ...............

      08:22:03,940 WARN  [com.arjuna.ats.jta] (default-threads - 18) ARJUNA016045: attempted rollback of < formatId=131077, gtrid_length=29, bqual_length=36, tx_uid=0:ffff0a1e9a67:-6bcbd97e:5669c136:1ab0b64d, node_name=1, branch_uid=0:ffff0a1e9a67:-6bcbd97e:5669c136:1ab0b65a, subordinatenodename=null, eis_name=java:jboss/datasources/controller > (XAResourceWrapperImpl@184464ad[xaResource=org.jboss.jca.adapters.jdbc.xa.XAManagedConnection@38697ab pad=true overrideRmValue=null productName=MySQL productVersion=5.6.24 jndiName=java:jboss/datasources/controller]) failed with exception code ARJUNA016099: Unknown error code:0: com.mysql.jdbc.jdbc2.optional.MysqlXAException: XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected

          at com.mysql.jdbc.jdbc2.optional.MysqlXAConnection.mapXAExceptionFromSQLException(MysqlXAConnection.java:608)

          at com.mysql.jdbc.jdbc2.optional.MysqlXAConnection.dispatchCommand(MysqlXAConnection.java:587)

          at com.mysql.jdbc.jdbc2.optional.MysqlXAConnection.end(MysqlXAConnection.java:482)

          at org.jboss.jca.adapters.jdbc.xa.XAManagedConnection.end(XAManagedConnection.java:295)

          at org.jboss.jca.core.tx.jbossts.XAResourceWrapperImpl.end(XAResourceWrapperImpl.java:114)

          at com.arjuna.ats.internal.jta.resources.arjunacore.XAResourceRecord.topLevelAbort(XAResourceRecord.java:309)

          at com.arjuna.ats.arjuna.coordinator.BasicAction.doAbort(BasicAction.java:2939)

          at com.arjuna.ats.arjuna.coordinator.BasicAction.doAbort(BasicAction.java:2918)

          at com.arjuna.ats.arjuna.coordinator.BasicAction.Abort(BasicAction.java:1632)

          at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.cancel(TwoPhaseCoordinator.java:116)

          at com.arjuna.ats.arjuna.AtomicAction.abort(AtomicAction.java:186)

          at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.rollbackAndDisassociate(TransactionImple.java:1248)

          at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.rollback(BaseTransaction.java:143)

          at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.rollback(BaseTransactionManagerDelegate.java:114)

          at org.jboss.as.ejb3.inflow.MessageEndpointInvocationHandler.afterDelivery(MessageEndpointInvocationHandler.java:69)

       

      Configuration file Wildfly:

      ................

      <subsystem xmlns="urn:jboss:domain:datasources:2.0">

                  <datasources>

                      <datasource jndi-name="java:jboss/datasources/ExampleDS" pool-name="ExampleDS" enabled="true" use-java-context="true">

                          <connection-url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE</connection-url>

                          <driver>h2</driver>

                          <security>

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

                              <password>sa</password>

                          </security>

                      </datasource>

                      <xa-datasource jndi-name="java:jboss/datasources/topevent" pool-name="topevent" enabled="true" use-java-context="true" use-ccm="true">

                          <xa-datasource-property name="URL">

                              jdbc:mysql://10.30.154.105:3306/topevent?characterEncoding=UTF-8

                          </xa-datasource-property>

                          <driver>mysql</driver>

                          <transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>

                          <xa-pool>

                              <min-pool-size>10</min-pool-size>

                              <max-pool-size>50</max-pool-size>

                              <prefill>true</prefill>

                              <use-strict-min>false</use-strict-min>

                              <flush-strategy>FailingConnectionOnly</flush-strategy>

                              <pad-xid>true</pad-xid>

                              <wrap-xa-resource>true</wrap-xa-resource>

                          </xa-pool>

                          <security>

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

                              <password>ktaaaaaafsfd</password>

                          </security>

                          <timeout>

                              <blocking-timeout-millis>120000</blocking-timeout-millis>

                              <idle-timeout-minutes>50</idle-timeout-minutes>

                              <allocation-retry>3</allocation-retry>

                              <allocation-retry-wait-millis>10000</allocation-retry-wait-millis>

                          </timeout>

                          <statement>

                              <prepared-statement-cache-size>50</prepared-statement-cache-size>

                          </statement>

                      </xa-datasource>

                      <drivers>

                          <driver name="mysql" module="com.mysql">

                              <xa-datasource-class>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</xa-datasource-class>

                          </driver>

                          <driver name="h2" module="com.h2database.h2">

                              <xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>

                          </driver>

                      </drivers>

                  </datasources>

              </subsystem>

      .................

      I don't understand why it had error. Please, you help me!!!