我将两个XA数据源用于EAP7和MySQL。应用程序正在运行,但在调用驾驶舱后会抛出很多异常。 7.5版的Camunda
两者的配置相同。 (由Red Hat EAP Docker 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.jboss.jca.core.connectionmanager.listener.TxConnectionListener@6de438d4[state=NORMAL managed connection=org.jboss.jca.adapters.jdbc.xa.XAManagedConnection@53389a35 connection handles=0 lastReturned=1487744241500 lastValidated=1487744110263 lastCheckedOut=1487744241705 trackByTx=true pool=org.jboss.jca.core.connectionmanager.pool.strategy.OnePool@3de504bf mcp=SemaphoreConcurrentLinkedQueueManagedConnectionPool@199913f6[pool=eap_app_mysql-DB] xaResource=XAResourceWrapperImpl@4da0c70d[xaResource=org.jboss.jca.adapters.jdbc.xa.XAManagedConnection@53389a35 pad=false overrideRmValue=null productName=MySQL productVersion=5.7.16 jndiName=java:jboss/datasources/ProcessEngine] txSync=TransactionSynchronization@1199406255{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.jboss.jca.core.connectionmanager.listener.TxConnectionListener@6de438d4[state=DESTROYED managed connection=org.jboss.jca.adapters.jdbc.xa.XAManagedConnection@53389a35 connection handles=0 lastReturned=1487744241500 lastValidated=1487744110263 lastCheckedOut=1487744241705 trackByTx=false pool=org.jboss.jca.core.connectionmanager.pool.strategy.OnePool@3de504bf mcp=SemaphoreConcurrentLinkedQueueManagedConnectionPool@199913f6[pool=eap_app_mysql-DB] xaResource=XAResourceWrapperImpl@4da0c70d[xaResource=org.jboss.jca.adapters.jdbc.xa.XAManagedConnection@53389a35 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.jboss.jca.core.connectionmanager.listener.TxConnectionListener@6de438d4[state=DESTROYED managed connection=org.jboss.jca.adapters.jdbc.xa.XAManagedConnection@53389a35 connection handles=0 lastReturned=1487744241500 lastValidated=1487744110263 lastCheckedOut=1487744241705 trackByTx=false pool=org.jboss.jca.core.connectionmanager.pool.strategy.OnePool@3de504bf mcp=SemaphoreConcurrentLinkedQueueManagedConnectionPool@199913f6[pool=eap_app_mysql-DB] xaResource=XAResourceWrapperImpl@4da0c70d[xaResource=org.jboss.jca.adapters.jdbc.xa.XAManagedConnection@53389a35 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.connectionmanager.listener.TxConnectionListener@6de438d4[state=DESTROYED managed connection=org.jboss.jca.adapters.jdbc.xa.XAManagedConnection@53389a35 connection handles=0 lastReturned=1487744241500 lastValidated=1487744110263 lastCheckedOut=1487744241705 trackByTx=false pool=org.jboss.jca.core.connectionmanager.pool.strategy.OnePool@3de504bf mcp=SemaphoreConcurrentLinkedQueueManagedConnectionPool@199913f6[pool=eap_app_mysql-DB] xaResource=XAResourceWrapperImpl@4da0c70d[xaResource=org.jboss.jca.adapters.jdbc.xa.XAManagedConnection@53389a35 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.jboss.jca.core.connectionmanager.listener.TxConnectionListener@6de438d4[state=DESTROYED managed connection=org.jboss.jca.adapters.jdbc.xa.XAManagedConnection@53389a35 connection handles=0 lastReturned=1487744241500 lastValidated=1487744110263 lastCheckedOut=1487744241705 trackByTx=false pool=org.jboss.jca.core.connectionmanager.pool.strategy.OnePool@3de504bf mcp=SemaphoreConcurrentLinkedQueueManagedConnectionPool@199913f6[pool=eap_app_mysql-DB] xaResource=XAResourceWrapperImpl@4da0c70d[xaResource=org.jboss.jca.adapters.jdbc.xa.XAManagedConnection@53389a35 pad=false overrideRmValue=null productName=MySQL productVersion=5.7.16 jndiName=java:jboss/datasources/ProcessEngine] txSync=null]
答案 0 :(得分:1)
我更改了数据源工厂,结果没有问题:
library(ggplot2)
# my data
df <- data.frame(genus=c("Prevotella","Streptococcus","YRC22","Phascolarctobacterium","SMB53","Epulopiscium",
"CF231","Anaerovibrio","Paludibacter","Parabacteroides","Desulfovibrio","Sutterella",
"Roseburia","Others__0_5_","Akkermansia","Bifidobacterium","Campylobacter","Fibrobacter",
"Coprobacillus","Bulleidia","f_02d06","Dorea","Blautia","Enterococcus","Eubacterium",
"p_75_a5","Clostridium","Coprococcus","Oscillospira","Escherichia","Lactobacillus"),
class=c(rep("groupA",18),rep("groupB",13)),
value=c(4.497311,4.082377,3.578472,3.567310,3.410453,3.390026,
3.363542,3.354532,3.335634,3.284165,3.280838,3.218053,
3.071454,3.026663,3.021749,3.004152,2.917656,2.811455,
-2.997631,-3.074314,-3.117659,-3.151276,-3.170631,-3.194323,
-3.225207,-3.274281,-3.299712,-3.299875,-3.689051,-3.692055,
-4.733154)
)
ggplot(df, aes(reorder(genus, -value), value, fill = class)) +
geom_bar(stat = "identity") +
coord_flip() +
xlab("genus")