Open glassfishrobot opened 7 years ago
@amykang2020 Commented From @glassfishrobot on March 11, 2015 18:8
stephanbauer7 said: Hi, I have the same problem with Queues in Glassfish 4.1. I am also using XA-Transactions.
Information: 11 Mrz 2015 10:55:53,039 [p: thread-pool-1; w: 3] DEBUG org.apache.ibatis.logging.jdbc.BaseJdbcLogger:132 - ==> Preparing: delete from ACT_RU_EVENT_SUBSCR where ID_ = ? and REV_ = ?
Information: 11 Mrz 2015 10:55:53,039 [pool-22-thread-3] DEBUG org.activiti.engine.impl.db.DbSqlSession:828 - executing: delete JobEntity [id=42532]
Information: 11 Mrz 2015 10:55:53,039 [pool-22-thread-3] DEBUG org.apache.ibatis.logging.jdbc.BaseJdbcLogger:132 - ooo Using Connection [com.sun.gjc.spi.jdbc40.ConnectionWrapper40@4e70cf77]
Schwerwiegend: commitTransaction (XA) on JMSService:jmsdirect failed for connectionId:6980944495603333120 and onePhase:true due to Unknown JMSService server error ERROR: com.sun.messaging.jmq.jmsserver.util.BrokerException: Transaction XID mismatch 6D75686861676C2C7365727665722C50333730302C000C000000660039086D75686861676C2C7365727665722C5033373030, expected 6D75686861676C2C7365727665722C50333730302C000B000000660039086D75686861676C2C7365727665722C5033373030 for transaction 6980944495768780544
Information: 11 Mrz 2015 10:55:53,039 [p: thread-pool-1; w: 3] DEBUG org.apache.ibatis.logging.jdbc.BaseJdbcLogger:132 - ==> Parameters: 40068(String), 1(Integer)
Information: 11 Mrz 2015 10:55:53,039 [pool-22-thread-3] DEBUG org.apache.ibatis.logging.jdbc.BaseJdbcLogger:132 - ==> Preparing: delete from ACT_RU_JOB where ID_ = ? and REV_ = ?
Schwerwiegend: rollbackTransaction (XA) on JMSService:jmsdirect failed for connectionId:6980944495603333120:transactionId=6980944495768780544 due to Unknown JMSService server error ERROR: com.sun.messaging.jmq.jmsserver.util.BrokerException: Transaction XID mismatch 6D75686861676C2C7365727665722C50333730302C000C000000660039086D75686861676C2C7365727665722C5033373030, expected 6D75686861676C2C7365727665722C50333730302C000B000000660039086D75686861676C2C7365727665722C5033373030 for transaction 6980944495768780544
Information: 11 Mrz 2015 10:55:53,040 [p: thread-pool-1; w: 3] DEBUG org.apache.ibatis.logging.jdbc.BaseJdbcLogger:132 - <== Updates: 1
@amykang2020 Commented From @glassfishrobot on March 11, 2015 18:20
@amykang2020 said: Assuming the test case follows the JMS and Java EE spec (haven't looked at it myself) in using transaction, JMS Session, JMSContext etc., I suspect this is likely an issue with jms-service DIRECT (or EMBEDDED) mode for it uses a completely different path in JMSRA to interact with broker. I'd suggest first check the test case to ensure spec compliance, then try jms-service LOCAL mode.
@amykang2020 Commented From @glassfishrobot on April 21, 2017 8:42
This issue was imported from java.net JIRA GLASSFISH-21289
@amykang2020 Commented From @glassfishrobot on January 17, 2015 22:15
Reported by jiggster
@amykang2020 Commented This appears to be an issue in JMSRA direct mode. A further evaluation is needed although not a must fix for GlassFish 5.0 RI
@nigeldeakin Commented
Nice test case. I ran it repeatedly (using mvn clean test
) and it passed every time. Here's an example of the test output: test.out.txt
I'm evaluating this issue for GlassFish 5.0 (MQ 5.1.1). Since this is a RI release, I need to consider whether or not this issue prevents GlassFish functioning as a RI. The fact that the issue was not seen when running the test case here suggests that the issue is intermittent and does not prevent it being used as a RI. I am therefore excluding it from 5.0.
I'll leave the issue open for now; if @jiggster or anyone would like to provide an updated test case this will be considered for a later release.
Same problem in Glassfish 5.1 with MQ 5.1.3
Same problem in Glassfish 5.1 with MQ 5.1.3
@hberton please provide reproducer (or update https://github.com/jigga/xid-mismatch from original report, which is not runnable/got outdated).
From @glassfishrobot on January 17, 2015 22:15
When multiple threads write to single JMS topic (only tested with topic, but that might be true for the queues also), each in its own distributed transaction, the broker fails with an error like the one below:
I've created a test case that reproduces the issue quite repeatedly - it's available on github.
The test case consists of a batch job that contains a single chunk-style step with partition mapper (step's partitioned as the problem occurs in a concurrent environment). ItemReader creates random number (between MIN and MAX as defined in SimplePartitionMapper) of entity instances of type Subscriber. ItemProcessor does nothing, but sleeps for 50 ms. Item writer persists entities created by the reader and then publishes the collection of items to JMS topic (in a single distributed transaction) and here's where the problem occurs. Will try to provide the more detailed description of the test case in the README.md file on github.
Environment
Tested with glass fish-embedded on Windows 7 & Mac OSX 10.10.1
Affected Versions
[4.1]
Copied from original issue: javaee/glassfish#21289