2017-02-22 31 views
1

Я использую два источника данных XA в EAP7 и MySQL. Приложение запущено, но после вызова кабины выкидывается множество исключений. Camunda в версии 7.5XA Datasource и кокпит

Конфигурация такая же для обоих. (Порожденных Red Hat EAP Докер Image)

<xa-datasource jndi-name="java:jboss/datasources/ProcessEngine" 
    pool-name="eap_app_mysql-DB" use-java-context="true" enabled="true"> 
    <xa-datasource-property name="ServerName">12.345.678.90</xa-datasource-property> 
    <xa-datasource-property name="Port">3306</xa-datasource-property> 
    <xa-datasource-property name="DatabaseName">processengine</xa-datasource-property> 
     <driver>mysql</driver> 
     <security> 
      <user-name>username</user-name> 
      <password>password</password> 
     </security> 
     <validation> 
      <validate-on-match>true</validate-on-match> 
      <valid-connection-checker 
       class-name="org.jboss.jca.adapters.jdbc.extensions.mysql.MySQLValidConnectionChecker"></valid-connection-checker> 
      <exception-sorter 
       class-name="org.jboss.jca.adapters.jdbc.extensions.mysql.MySQLExceptionSorter"></exception-sorter> 
     </validation> 
</xa-datasource> 

Я попытался сократить журнал и вставить полный здесь https://hastebin.com/safegezoxo.hs

[org.jboss.jca.core.connectionmanager.listener.TxConnectionListener] (default task-91) IJ000305: Connection error occured: org[email protected]6de438d4[state=NORMAL managed [email protected]389a35 connection handles=0 lastReturned=1487744241500 lastValidated=1487744110263 lastCheckedOut=1487744241705 trackByTx=true [email protected]3de504bf [email protected][pool=eap_app_mysql-DB] [email protected][[email protected]389a35 pad=false overrideRmValue=null productName=MySQL productVersion=5.7.16 jndiName=java:jboss/datasources/ProcessEngine] [email protected]{tx=TransactionImple < ac, BasicAction: 0:ffff0ac006d8:-7ec69b48:58ac47a3:84f52 status: ActionStatus.RUNNING > wasTrackByTx=true enlisted=false cancel=false}]: com.mysql.jdbc.jdbc2.optional.MysqlXAException: XAER_OUTSIDE: Some work is done outside global transaction 
... 
Caused by: java.sql.SQLException: XAER_OUTSIDE: Some work is done outside global transaction 
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:964) 
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3970) 
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3906) 
    at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2524) 
    at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2677) 
    at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2545) 
    at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2503) 
    at com.mysql.jdbc.StatementImpl.executeInternal(StatementImpl.java:839) 
    at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:739) 
    at com.mysql.jdbc.jdbc2.optional.MysqlXAConnection.dispatchCommand(MysqlXAConnection.java:562) 
    ... 99 more 
[com.arjuna.ats.jta] (default task-91) ARJUNA016061: TransactionImple.enlistResource - XAResource.start returned: XAException.XAER_OUTSIDE for < formatId=131077, gtrid_length=43, bqual_length=36, tx_uid=0:ffff0ac006d8:-7ec69b48:58ac47a3:84f52, node_name=eap-app-4-wxyq3, branch_uid=0:ffff0ac006d8:-7ec69b48:58ac47a3:84f54, subordinatenodename=null, eis_name=java:jboss/datasources/ProcessEngine >: com.mysql.jdbc.jdbc2.optional.MysqlXAException: XAER_OUTSIDE: Some work is done outside global transaction 
### Error querying database. Cause: java.sql.SQLException: javax.resource.ResourceException: IJ000457: Unchecked throwable in managedConnectionReconnected() cl=org[email protected]6de438d4[state=DESTROYED managed [email protected]389a35 connection handles=0 lastReturned=1487744241500 lastValidated=1487744110263 lastCheckedOut=1487744241705 trackByTx=false [email protected]3de504bf [email protected][pool=eap_app_mysql-DB] [email protected][[email protected]389a35 pad=false overrideRmValue=null productName=MySQL productVersion=5.7.16 jndiName=java:jboss/datasources/ProcessEngine] txSync=null] 
### The error may exist in org/camunda/bpm/engine/impl/mapping/entity/ProcessDefinition.xml 
### The error may involve org.camunda.bpm.engine.impl.persistence.entity.ProcessDefinitionEntity.selectProcessDefinition 
### The error occurred while executing a query 
### Cause: java.sql.SQLException: javax.resource.ResourceException: IJ000457: Unchecked throwable in managedConnectionReconnected() cl=org[email protected]6de438d4[state=DESTROYED managed [email protected]389a35 connection handles=0 lastReturned=1487744241500 lastValidated=1487744110263 lastCheckedOut=1487744241705 trackByTx=false [email protected]3de504bf [email protected][pool=eap_app_mysql-DB] [email protected][[email protected]389a35 pad=false overrideRmValue=null productName=MySQL productVersion=5.7.16 jndiName=java:jboss/datasources/ProcessEngine] txSync=null]: org.apache.ibatis.exceptions.PersistenceException: 
### Error querying database. Cause: java.sql.SQLException: javax.resource.ResourceException: IJ000457: Unchecked throwable in managedConnectionReconnected() cl=org.jboss.jca.core.connectio[email protected][state=DESTROYED managed [email protected]389a35 connection handles=0 lastReturned=1487744241500 lastValidated=1487744110263 lastCheckedOut=1487744241705 trackByTx=false [email protected]3de504bf [email protected][pool=eap_app_mysql-DB] [email protected][[email protected]389a35 pad=false overrideRmValue=null productName=MySQL productVersion=5.7.16 jndiName=java:jboss/datasources/ProcessEngine] txSync=null] 
### The error may exist in org/camunda/bpm/engine/impl/mapping/entity/ProcessDefinition.xml 
### The error may involve org.camunda.bpm.engine.impl.persistence.entity.ProcessDefinitionEntity.selectProcessDefinition 
### The error occurred while executing a query 
### Cause: java.sql.SQLException: javax.resource.ResourceException: IJ000457: Unchecked throwable in managedConnectionReconnected() cl=org[email protected]6de438d4[state=DESTROYED managed [email protected]389a35 connection handles=0 lastReturned=1487744241500 lastValidated=1487744110263 lastCheckedOut=1487744241705 trackByTx=false [email protected]3de504bf [email protected][pool=eap_app_mysql-DB] [email protected][[email protected]389a35 pad=false overrideRmValue=null productName=MySQL productVersion=5.7.16 jndiName=java:jboss/datasources/ProcessEngine] txSync=null] 
+0

Какую версию драйвера Mysql JDBC вы используете? – Zelldon

+0

mysql-connector-java-5.1.25-3.el7.noarch от Red hat repo.I также пробовал самое последнее из сайта MySQL. – jklee

ответ

1

Я изменил источник данных завода и результат работы без проблем:

<xa-datasource jndi-name="java:jboss/datasources/ProcessEngine" 
    pool-name="eap_app_mysql-DB" use-java-context="true" enabled="true"> 
    <xa-datasource-property name="ServerName">IP</xa-datasource-property> 
    <xa-datasource-property name="Port">PORT</xa-datasource-property> 
    <xa-datasource-property name="DatabaseName">processengine</xa-datasource-property> 
     <driver>mysql</driver> 
     <security> 
      <user-name>username</user-name> 
      <password>password</password> 
     </security> 
     <transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation> 
     <xa-pool> 
      <min-pool-size>1</min-pool-size> 
      <max-pool-size>60</max-pool-size> 
      <prefill>false</prefill> 
      <use-strict-min>false</use-strict-min> 
      <flush-strategy>FailingConnectionOnly</flush-strategy> 
      <no-tx-separate-pools>true</no-tx-separate-pools> 
      <pad-xid>false</pad-xid> 
      <wrap-xa-resource>true</wrap-xa-resource> 
     </xa-pool> 
     <validation> 
      <valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.mysql.MySQLValidConnectionChecker"/> 
      <validate-on-match>false</validate-on-match> 
      <background-validation>false</background-validation> 
      <exception-sorter class-name="org.jboss.jca.adapters.jdbc.extensions.mysql.MySQLExceptionSorter"/> 
     </validation> 
</xa-datasource>