Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hazelcast code sample for XA transactions no longer works with current Atomikos version (5.0.9) #553

Open
kgignatyev opened this issue Nov 14, 2022 · 4 comments

Comments

@kgignatyev
Copy link

hazelcast-code-samples/transactions/xa-transactions/pom.xml

When the sample updated with version 5.0.9 of atomikos it no longer works with exception

    <atomikos-version>5.0.9</atomikos-version>

WARNING: There is no registered resource that can recover the given XAResource instance.
Please register a corresponding resource first.
Exception in thread "main" javax.transaction.SystemException: There is no registered resource that can recover the given XAResource instance.
Please register a corresponding resource first.
at com.atomikos.icatch.jta.TransactionImp.enlistResource(TransactionImp.java:277)
at XATransaction.main(XATransaction.java:42)
Nov 14, 2022 1:20:35 PM com.atomikos.logging.JULLogger logWarning
WARNING: Transaction 192.168.1.104.tm166846082560400001 has timed out and will rollback.

hazelcast version used 4.2.5

@ansh9455
Copy link

Hi team,
is there any solution for that, We are also facing the same issue.

@GuyPardon
Copy link

@ansh9455
Copy link

ansh9455 commented Jan 2, 2024

[main] INFO com.atomikos.icatch.provider.imp.AssemblerImp - Loaded jar:file:/C:/Repository/com/atomikos/transactions/5.0.9/transactions-5.0.9.jar!/transactions-defaults.properties
[main] INFO com.atomikos.icatch.provider.imp.AssemblerImp - Loaded file:/C:/GITLAB/Hazelcast_Resources/examples-5.0.9-project/examples-5.0.9/examples-jta/target/test-classes/jta.properties
[main] INFO com.atomikos.icatch.provider.imp.AssemblerImp - USING core version: 5.0.9
[main] INFO com.atomikos.icatch.provider.imp.AssemblerImp - USING: com.atomikos.icatch.default_max_wait_time_on_shutdown = 9223372036854775807
[main] INFO com.atomikos.icatch.provider.imp.AssemblerImp - USING: com.atomikos.icatch.allow_subtransactions = true
[main] INFO com.atomikos.icatch.provider.imp.AssemblerImp - USING: com.atomikos.icatch.recovery_delay = 10000
[main] INFO com.atomikos.icatch.provider.imp.AssemblerImp - USING: com.atomikos.icatch.oltp_max_retries = 5
[main] INFO com.atomikos.icatch.provider.imp.AssemblerImp - USING: com.atomikos.icatch.throw_on_heuristic = false
[main] INFO com.atomikos.icatch.provider.imp.AssemblerImp - USING: com.atomikos.icatch.logcloud_datasource_name = logCloudDS
[main] INFO com.atomikos.icatch.provider.imp.AssemblerImp - USING: com.atomikos.icatch.serial_jta_transactions = true
[main] INFO com.atomikos.icatch.provider.imp.AssemblerImp - USING: com.atomikos.icatch.jvm_id = 14320@lov2p2mimctx170
[main] INFO com.atomikos.icatch.provider.imp.AssemblerImp - USING: com.atomikos.icatch.log_base_dir = ./
[main] INFO com.atomikos.icatch.provider.imp.AssemblerImp - USING: com.atomikos.icatch.registered = true
[main] INFO com.atomikos.icatch.provider.imp.AssemblerImp - USING: com.atomikos.icatch.max_actives = 50
[main] INFO com.atomikos.icatch.provider.imp.AssemblerImp - USING: com.atomikos.icatch.checkpoint_interval = 500
[main] INFO com.atomikos.icatch.provider.imp.AssemblerImp - USING: com.atomikos.icatch.enable_logging = true
[main] INFO com.atomikos.icatch.provider.imp.AssemblerImp - USING: com.atomikos.icatch.log_base_name = tmlog
[main] INFO com.atomikos.icatch.provider.imp.AssemblerImp - USING: com.atomikos.icatch.max_timeout = 300000
[main] INFO com.atomikos.icatch.provider.imp.AssemblerImp - USING: com.atomikos.icatch.tm_unique_name = 10.181.53.19.tm
[main] INFO com.atomikos.icatch.provider.imp.AssemblerImp - USING: com.atomikos.icatch.forget_orphaned_log_entries_delay = 86400000
[main] INFO com.atomikos.icatch.provider.imp.AssemblerImp - USING: com.atomikos.icatch.oltp_retry_interval = 10000
[main] INFO com.atomikos.icatch.provider.imp.AssemblerImp - USING: com.atomikos.icatch.force_shutdown_on_vm_exit = false
[main] INFO com.atomikos.icatch.provider.imp.AssemblerImp - USING: com.atomikos.icatch.default_jta_timeout = 10000
[main] INFO com.atomikos.icatch.provider.imp.AssemblerImp - Using default (local) logging and recovery...
Jan 02, 2024 11:39:31 AM com.hazelcast.internal.config.AbstractConfigLocator
INFO: Loading 'hazelcast-default.xml' from the classpath.
Jan 02, 2024 11:39:31 AM com.hazelcast.system
INFO: [10.181.53.19]:5701 [dev] [4.2.8] Hazelcast 4.2.8 (20230529 - 90df6cd) starting at [10.181.53.19]:5701
Jan 02, 2024 11:39:32 AM com.hazelcast.spi.discovery.integration.DiscoveryService
INFO: [10.181.53.19]:5701 [dev] [4.2.8] No discovery strategy is applicable for auto-detection
Jan 02, 2024 11:39:32 AM com.hazelcast.instance.impl.Node
INFO: [10.181.53.19]:5701 [dev] [4.2.8] Using Multicast discovery
Jan 02, 2024 11:39:32 AM com.hazelcast.cp.CPSubsystem
WARNING: [10.181.53.19]:5701 [dev] [4.2.8] CP Subsystem is not enabled. CP data structures will operate in UNSAFE mode! Please note that UNSAFE mode will not provide strong consistency guarantees.
Jan 02, 2024 11:39:32 AM com.hazelcast.internal.diagnostics.Diagnostics
INFO: [10.181.53.19]:5701 [dev] [4.2.8] Diagnostics disabled. To enable add -Dhazelcast.diagnostics.enabled=true to the JVM arguments.
Jan 02, 2024 11:39:32 AM com.hazelcast.core.LifecycleService
INFO: [10.181.53.19]:5701 [dev] [4.2.8] [10.181.53.19]:5701 is STARTING
Jan 02, 2024 11:39:35 AM com.hazelcast.internal.cluster.ClusterService
INFO: [10.181.53.19]:5701 [dev] [4.2.8]

Members {size:1, ver:1} [
Member [10.181.53.19]:5701 - bccb2405-46b0-4638-82d9-891f1f4b9364 this
]

Jan 02, 2024 11:39:35 AM com.hazelcast.core.LifecycleService
INFO: [10.181.53.19]:5701 [dev] [4.2.8] [10.181.53.19]:5701 is STARTED
Jan 02, 2024 11:40:47 AM com.hazelcast.spi.impl.operationservice.impl.InvocationMonitor
WARNING: [10.181.53.19]:5701 [dev] [4.2.8] MonitorInvocationsTask delayed 38550 ms
Jan 02, 2024 11:40:47 AM com.hazelcast.spi.impl.operationservice.impl.InvocationMonitor
WARNING: [10.181.53.19]:5701 [dev] [4.2.8] BroadcastOperationControlTask delayed 26496 ms
Jan 02, 2024 11:40:47 AM com.hazelcast.internal.cluster.impl.ClusterHeartbeatManager
WARNING: [10.181.53.19]:5701 [dev] [4.2.8] Resetting heartbeat timestamps because of huge system clock jump! Clock-Jump: 35352 ms, Heartbeat-Timeout: 60000 ms
[main] WARN com.atomikos.icatch.jta.TransactionImp - There is no registered resource that can recover the given XAResource instance.
Please register a corresponding resource first.

javax.transaction.SystemException: There is no registered resource that can recover the given XAResource instance.
Please register a corresponding resource first.

at com.atomikos.icatch.jta.TransactionImp.enlistResource(TransactionImp.java:277)
at jms.JMSUtil.sendMessageInTransaction(JMSUtil.java:79)
at jms.JmsIntegrationTest.sendMessage(JmsIntegrationTest.java:46)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
at org.junit.runners.Suite.runChild(Suite.java:128)
at org.junit.runners.Suite.runChild(Suite.java:24)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)

@GuyPardon We have tried to run with the same location(example-jta) that you have provided but still, we are getting the same issue and previously we have tried with 6.0.0 as well but we were getting this issue.

@nite31
Copy link

nite31 commented Jan 2, 2024

Atomikos Version (Transaction Essentials) - 6.0.0
Hazelcast Version - 4.2.8

Tried these examples and facing same issue in elisting HazelCast XA Resource with Atomikos Transactions in springboot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants