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

No recovery system in which to register XAResourceRecovery instance #33727

Closed
zhfeng opened this issue May 31, 2023 · 1 comment
Closed

No recovery system in which to register XAResourceRecovery instance #33727

zhfeng opened this issue May 31, 2023 · 1 comment
Labels
area/narayana Transactions / Narayana kind/bug Something isn't working

Comments

@zhfeng
Copy link
Contributor

zhfeng commented May 31, 2023

Describe the bug

This comes across apache/camel-quarkus#4945

When it have a xa datasource in the application.properties, just like

quarkus.datasource.test.db-kin=h2
quarkus.datasource.test.jdbc.url=jdbc:h2:mem
quarkus.datasource.test.jdbc.transactions=xa

And transaction recovery is enabled

quarkus.transaction-manager.enable-recovery=true

The application throws Exception

Caused by: java.lang.IllegalStateException: ARJUNA032012: No recovery system in which to register XAResourceRecovery instance
	at com.arjuna.ats.jbossatx.jta.RecoveryManagerService.addXAResourceRecovery(RecoveryManagerService.java:93)
	at io.agroal.narayana.NarayanaTransactionIntegration.addResourceRecoveryFactory(NarayanaTransactionIntegration.java:132)
	at io.agroal.pool.ConnectionPool.init(ConnectionPool.java:133)
	at io.agroal.pool.DataSource.<init>(DataSource.java:42)
	at io.quarkus.agroal.runtime.DataSources.doCreateDataSource(DataSources.java:246)
	at io.quarkus.agroal.runtime.DataSources$1.apply(DataSources.java:129)
	at io.quarkus.agroal.runtime.DataSources$1.apply(DataSources.java:126)
	at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1708)
	at io.quarkus.agroal.runtime.DataSources.getDataSource(DataSources.java:126)
	at io.quarkus.agroal.runtime.DataSources.fromName(DataSources.java:122)
	at io.quarkus.agroal.runtime.AgroalRecorder.agroalDataSourceSupplier(AgroalRecorder.java:23)
	at io.quarkus.deployment.steps.AgroalProcessor$generateDataSourceBeans109901991.deploy_0(Unknown Source)
	at io.quarkus.deployment.steps.AgroalProcessor$generateDataSourceBeans109901991.deploy(Unknown Source)
	... 53 more

Expected behavior

The application starts normaly.

Actual behavior

The exception is throwing.

How to Reproduce?

Add the above datasource and transaction manager configurations in the description.

Output of uname -a or ver

Linux localhost 6.2.14-100.fc36.x86_64 #1 SMP PREEMPT_DYNAMIC Mon May 1 00:54:35 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

Output of java -version

openjdk version "17.0.6" 2023-01-17 OpenJDK Runtime Environment (Red_Hat-17.0.6.0.10-1.fc36) (build 17.0.6+10) OpenJDK 64-Bit Server VM (Red_Hat-17.0.6.0.10-1.fc36) (build 17.0.6+10, mixed mode, sharing)

GraalVM version (if different from Java)

No response

Quarkus version or git rev

999-SNAPSHOT

Build tool (ie. output of mvnw --version or gradlew --version)

Apache Maven 3.8.8 (4c87b05d9aedce574290d1acc98575ed5eb6cd39) Maven home: /home/zhfeng/.m2/wrapper/dists/apache-maven-3.8.8-bin/67c30f74/apache-maven-3.8.8 Java version: 17.0.6, vendor: Red Hat, Inc., runtime: /usr/lib/jvm/java-17-openjdk-17.0.6.0.10-1.fc36.x86_64 Default locale: en_US, platform encoding: ANSI_X3.4-1968 OS name: "linux", version: "6.2.14-100.fc36.x86_64", arch: "amd64", family: "unix"

Additional information

I think this is an issue when we introduce the JDBC Object Store in c2546e7 and we have to find a way to defer the regstration of XARecoveryResource after the recovery manager service is started.

@zhfeng zhfeng added the kind/bug Something isn't working label May 31, 2023
@geoand geoand added area/narayana Transactions / Narayana and removed triage/needs-triage labels May 31, 2023
@quarkus-bot
Copy link

quarkus-bot bot commented May 31, 2023

/cc @mmusgrov (narayana)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/narayana Transactions / Narayana kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants