question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Narayana STM failing to build in Native

See original GitHub issue

Describe the bug When building a Quarkus application with the Narayana STM and also using any other extension that also brings the narayana JTA extension (hibernate orm, agroal, etc), the build fails in Native with:

[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildStep] docker run -v /home/jcarvaja/Downloads/tmp/code-with-quarkus/target/code-with-quarkus-1.0.0-SNAPSHOT-native-image-source-jar:/project:z --env LANG=C --user 1000:1000 --rm quay.io/quarkus/ubi-quarkus-native-image:21.0.0-java11 -J-DCoordinatorEnvironmentBean.transactionStatusManagerEnable=false -J-Dsun.nio.ch.maxUpdateArraySize=100 -J-Djava.util.logging.manager=org.jboss.logmanager.LogManager -J-Dvertx.logger-delegate-factory-class-name=io.quarkus.vertx.core.runtime.VertxLogDelegateFactory -J-Dvertx.disableDnsResolver=true -J-Dio.netty.leakDetection.level=DISABLED -J-Dio.netty.allocator.maxOrder=1 -J-DCoordinatorEnvironmentBean.transactionStatusManagerEnable=false -J-Duser.language=es -J-Duser.country=ES -J-Dfile.encoding=UTF-8 --initialize-at-build-time= -H:InitialCollectionPolicy=com.oracle.svm.core.genscavenge.CollectionPolicy\$BySpaceAndTime -H:+JNI -H:+AllowFoldMethods -jar code-with-quarkus-1.0.0-SNAPSHOT-runner.jar -H:FallbackThreshold=0 -H:+ReportExceptionStackTraces -J-Xmx4g -H:-AddAllCharsets -H:EnableURLProtocols=http --no-server -H:-UseServiceLoaderFeature -H:+StackTrace code-with-quarkus-1.0.0-SNAPSHOT-runner
[code-with-quarkus-1.0.0-SNAPSHOT-runner:24]    classlist:   4.198,77 ms,  1,19 GB
[code-with-quarkus-1.0.0-SNAPSHOT-runner:24]        (cap):     815,95 ms,  1,19 GB
[code-with-quarkus-1.0.0-SNAPSHOT-runner:24]        setup:   2.879,19 ms,  1,19 GB
15:13:59,636 INFO  [org.jbo.threads] JBoss Threads version 3.2.0.Final
To see how the classes got initialized, use --trace-class-initialization=com.arjuna.ats.internal.arjuna.utils.SocketProcessId
[code-with-quarkus-1.0.0-SNAPSHOT-runner:24]     analysis:  37.311,65 ms,  1,87 GB
Error: Classes that should be initialized at run time got initialized during image building:
 com.arjuna.ats.internal.arjuna.utils.SocketProcessId the class was requested to be initialized at run time (from feature io.quarkus.runner.AutoFeature.beforeAnalysis). To see why com.arjuna.ats.internal.arjuna.utils.SocketProcessId got initialized use --trace-class-initialization=com.arjuna.ats.internal.arjuna.utils.SocketProcessId

com.oracle.svm.core.util.UserError$UserException: Classes that should be initialized at run time got initialized during image building:
 com.arjuna.ats.internal.arjuna.utils.SocketProcessId the class was requested to be initialized at run time (from feature io.quarkus.runner.AutoFeature.beforeAnalysis). To see why com.arjuna.ats.internal.arjuna.utils.SocketProcessId got initialized use --trace-class-initialization=com.arjuna.ats.internal.arjuna.utils.SocketProcessId

	at com.oracle.svm.core.util.UserError.abort(UserError.java:68)
	at com.oracle.svm.hosted.classinitialization.ConfigurableClassInitialization.checkDelayedInitialization(ConfigurableClassInitialization.java:539)
	at com.oracle.svm.hosted.classinitialization.ClassInitializationFeature.duringAnalysis(ClassInitializationFeature.java:226)
	at com.oracle.svm.hosted.NativeImageGenerator.lambda$runPointsToAnalysis$8(NativeImageGenerator.java:740)
	at com.oracle.svm.hosted.FeatureHandler.forEachFeature(FeatureHandler.java:70)
	at com.oracle.svm.hosted.NativeImageGenerator.runPointsToAnalysis(NativeImageGenerator.java:740)
	at com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:563)
	at com.oracle.svm.hosted.NativeImageGenerator.lambda$run$0(NativeImageGenerator.java:476)
	at java.base/java.util.concurrent.ForkJoinTask$AdaptedRunnableAction.exec(ForkJoinTask.java:1407)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
Error: Image build request failed with exit status 1

Expected behavior It should work as in JVM.

Actual behavior It fails when building, see exception above.

To Reproduce Steps to reproduce the behavior:

  1. Go to code.quarkus.io
  2. Select Narayana STM extension and Agroal (or directly Narayana JTA)
  3. Download the ZIP and try to build the application using:
 mvn clean install -Dnative -Dquarkus.native.container-build=true 

Environment (please complete the following information):

  • Quarkus version or git rev: 1.12.0.Final and 999-SNAPSHOT

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
mayankkunwarcommented, Mar 19, 2021

Hi @famod I have raised a PR as fix for this issue.

0reactions
famodcommented, Mar 17, 2021

@mmusgrov alright, if you tell me his GH name I can assign this issue to him.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Narayana Project Documentation
The Narayana Project Documentation contains information on how to use Narayana to develop applications that use transaction technology to manage business ...
Read more >
LRA application with Narayana on Quarkus - Google Groups
Final:build (default) on project lra-app-q: Failed to build quarkus ... but we found issues in native mode which required a new release of...
Read more >
Narayana team blog - RSSing.com
"Using multiple session factories in a logical transaction imposes challenging issues concerning transaction management... We quickly abandoned [JTA transaction ...
Read more >
Home of Quarkus Cheat-Sheet - GitHub Pages
Quarkus is a Kubernetes Native Java stack tailored for GraalVM & OpenJDK HotSpot, crafted from the best of breed Java libraries and standards....
Read more >
Chapter 4. Technology Previews for the Red Hat JBoss Web Server ...
Narayana on Red Hat JBoss Web Server 5.0 is a Technology Preview feature only. ... JBPM-7347 - Tests failing due to DBCP integration....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found