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

narayana native mode ObjectStoreEnvironmentBean no-parameter constructor #5145

Closed
JohT opened this issue Nov 3, 2019 · 5 comments · Fixed by #5149
Closed

narayana native mode ObjectStoreEnvironmentBean no-parameter constructor #5145

JohT opened this issue Nov 3, 2019 · 5 comments · Fixed by #5149
Labels
kind/bug Something isn't working
Milestone

Comments

@JohT
Copy link
Contributor

JohT commented Nov 3, 2019

Since quarkus version 0.27.0 (not in 0.26.1) i get the following exception using native image, when a transaction is committed:

Stacktrace
java.lang.InstantiationException: Type com.arjuna.ats.arjuna.common.ObjectStoreEnvironmentBean can not be instantiated reflectively as it does not have a no-parameter constructor or the no-parameter constructor has not been added explicitly to the native image.

at com.arjuna.common.internal.util.propertyservice.BeanPopulator.getNamedInstance(BeanPopulator.java:90)
at com.arjuna.common.internal.util.propertyservice.BeanPopulator.getNamedInstance(BeanPopulator.java:66)
at com.arjuna.ats.arjuna.objectstore.StoreManager.initStore(StoreManager.java:146)
at com.arjuna.ats.arjuna.objectstore.StoreManager.getActionStore(StoreManager.java:111)
at com.arjuna.ats.arjuna.objectstore.StoreManager.getParticipantStore(StoreManager.java:81)
at com.arjuna.ats.arjuna.coordinator.BasicAction.getStore(BasicAction.java:403)
at com.arjuna.ats.arjuna.coordinator.BasicAction.prepare(BasicAction.java:2116)
at com.arjuna.ats.arjuna.coordinator.BasicAction.End(BasicAction.java:1503)
at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:96)
at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:162)
at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1287)
at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:126)
at io.quarkus.narayana.jta.runtime.CDIDelegatingTransactionManager.commit(CDIDelegatingTransactionManager.java:97)
at io.quarkus.narayana.jta.runtime.interceptor.TransactionalInterceptorBase.endTransaction(TransactionalInterceptorBase.java:305)
at io.quarkus.narayana.jta.runtime.interceptor.TransactionalInterceptorBase.invokeInOurTx(TransactionalInterceptorBase.java:152)
at io.quarkus.narayana.jta.runtime.interceptor.TransactionalInterceptorBase.invokeInOurTx(TransactionalInterceptorBase.java:92)
at io.quarkus.narayana.jta.runtime.interceptor.TransactionalInterceptorRequired.doIntercept(TransactionalInterceptorRequired.java:32)
at io.quarkus.narayana.jta.runtime.interceptor.TransactionalInterceptorBase.intercept(TransactionalInterceptorBase.java:53)
at io.quarkus.narayana.jta.runtime.interceptor.TransactionalInterceptorRequired.intercept(TransactionalInterceptorRequired.java:26)
at io.quarkus.narayana.jta.runtime.interceptor.TransactionalInterceptorRequired_Bean.intercept(TransactionalInterceptorRequired_Bean.zig:315)
at io.quarkus.arc.impl.InterceptorInvocation.invoke(InterceptorInvocation.java:41)
at io.quarkus.arc.impl.AroundInvokeInvocationContext.perform(AroundInvokeInvocationContext.java:41)
at io.quarkus.arc.impl.InvocationContexts.performAroundInvoke(InvocationContexts.java:32)

Follow up Stacktrace
When i put the missing class into "reflection-config.json" i get this exception after it:

java.lang.ClassNotFoundException: com.arjuna.ats.internal.arjuna.objectstore.ShadowNoFileLockStore

at com.oracle.svm.core.hub.ClassForNameSupport.forName(ClassForNameSupport.java:60)
at java.lang.Class.forName(DynamicHub.java:1161)
at com.arjuna.common.internal.util.ClassloadingUtility.loadClass(ClassloadingUtility.java:57)
at com.arjuna.common.internal.util.ClassloadingUtility.loadClass(ClassloadingUtility.java:85)
at com.arjuna.common.internal.util.ClassloadingUtility.loadAndInstantiateClass(ClassloadingUtility.java:117)
at com.arjuna.ats.arjuna.objectstore.StoreManager.initStore(StoreManager.java:152)
at com.arjuna.ats.arjuna.objectstore.StoreManager.getActionStore(StoreManager.java:111)
at com.arjuna.ats.arjuna.objectstore.StoreManager.getParticipantStore(StoreManager.java:81)
at com.arjuna.ats.arjuna.coordinator.BasicAction.getStore(BasicAction.java:403)
at com.arjuna.ats.arjuna.coordinator.BasicAction.prepare(BasicAction.java:2116)
at com.arjuna.ats.arjuna.coordinator.BasicAction.End(BasicAction.java:1503)
at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:96)
at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:162)
at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1287)

To Reproduce
Steps to reproduce the behavior:

  1. Clone showcase-quarkus-eventsourcing
  2. Change quarkus.version in pom.xml to 0.27.0
  3. Build the native image using mvn clean package -Dnative
  4. Have a look at "Getting started" inside the "ReadMe.md" to start the H2 database
  5. Create a account using the contained postman collection

Configuration
application.properties

Environment (please complete the following information):

  • Output of uname -a or ver: MacBook-Air.local 17.7.0 Darwin Kernel Version 17.7.0: Sun Jun 2 20:31:42 PDT 2019; root:xnu-4570.71.46~1/RELEASE_X86_64 x86_64
  • Output of java -version: OpenJDK 64-Bit GraalVM CE 19.2.1 (build 25.232-b07-jvmci-19.2-b03, mixed mode)
  • Quarkus version or git rev: 0.27.0
@JohT JohT added the kind/bug Something isn't working label Nov 3, 2019
@gsmet
Copy link
Member

gsmet commented Nov 3, 2019

What happens if you remove quarkus.datasource.transactions=xa from your config file?

@gsmet
Copy link
Member

gsmet commented Nov 3, 2019

@JohT what do you mean by Create a account using the contained postman collection?

@gsmet
Copy link
Member

gsmet commented Nov 3, 2019

OK, got it.

@gsmet
Copy link
Member

gsmet commented Nov 3, 2019

I fixed your initial issue but I still have this error when running the postman file:

2019-11-03 22:21:05,350 ERROR [io.qua.ver.htt.run.QuarkusErrorHandler] (vert.x-worker-thread-2) HTTP Request to /accounts/3a8b3dbc-9a05-4e15-838f-94d0460eb6a5/nickname failed, error id: 398df3aa-17d6-4e06-98b4-21668588e178-1: org.jboss.resteasy.spi.UnhandledException: org.axonframework.modelling.command.AggregateNotFoundException: The aggregate was not found in the event store
	at org.jboss.resteasy.core.ExceptionHandler.handleApplicationException(ExceptionHandler.java:106)
	at org.jboss.resteasy.core.ExceptionHandler.handleException(ExceptionHandler.java:372)
	at org.jboss.resteasy.core.SynchronousDispatcher.writeException(SynchronousDispatcher.java:209)
	at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:496)
	at org.jboss.resteasy.core.SynchronousDispatcher.lambda$invoke$4(SynchronousDispatcher.java:252)
	at org.jboss.resteasy.core.SynchronousDispatcher.lambda$preprocess$0(SynchronousDispatcher.java:153)
	at org.jboss.resteasy.core.interception.jaxrs.PreMatchContainerRequestContext.filter(PreMatchContainerRequestContext.java:363)
	at org.jboss.resteasy.core.SynchronousDispatcher.preprocess(SynchronousDispatcher.java:156)
	at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:238)
	at io.quarkus.resteasy.runtime.standalone.RequestDispatcher.service(RequestDispatcher.java:73)
	at io.quarkus.resteasy.runtime.standalone.VertxRequestHandler.dispatch(VertxRequestHandler.java:109)
	at io.quarkus.resteasy.runtime.standalone.VertxRequestHandler.dispatchRequestContext(VertxRequestHandler.java:84)
	at io.quarkus.resteasy.runtime.standalone.VertxRequestHandler.lambda$handle$0(VertxRequestHandler.java:71)
	at io.vertx.core.impl.ContextImpl.lambda$executeBlocking$2(ContextImpl.java:316)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.lang.Thread.run(Thread.java:748)
	at com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:460)
	at com.oracle.svm.core.posix.thread.PosixJavaThreads.pthreadStartRoutine(PosixJavaThreads.java:193)

But it doesn't seem related to Quarkus.

gsmet added a commit to gsmet/quarkus that referenced this issue Nov 3, 2019
Disabling the TransactionStatusManager apparently caused a few classes
to not be included anymore whereas they are necessary at least in some
XA scenarios.

Fixes quarkusio#5145
@gsmet gsmet added this to the 0.28.0 milestone Nov 3, 2019
@JohT
Copy link
Contributor Author

JohT commented Nov 4, 2019

Awesome! Thanks! And yes, the last exception looks like something on my side.
BTW, removing quarkus.datasource.transactions=xadidn't change the exception.
Maybe it's because i directly use javax.transaction api for the adapting JtaTransactionManager, that is needed to connect transaction management to axon.

aureamunoz pushed a commit to aureamunoz/quarkus that referenced this issue Nov 5, 2019
Disabling the TransactionStatusManager apparently caused a few classes
to not be included anymore whereas they are necessary at least in some
XA scenarios.

Fixes quarkusio#5145
mmusgrov pushed a commit to mmusgrov/quarkus that referenced this issue Dec 13, 2019
Disabling the TransactionStatusManager apparently caused a few classes
to not be included anymore whereas they are necessary at least in some
XA scenarios.

Fixes quarkusio#5145
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants