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

Upgrade to 1.13.0.Final and above causes Cannot transform java.util.concurrent.ThreadPoolExecutor as its containing application archive could not be found #18477

Closed
mfatbmw opened this issue Jul 7, 2021 · 3 comments · Fixed by #18480
Labels
kind/bug Something isn't working
Milestone

Comments

@mfatbmw
Copy link

mfatbmw commented Jul 7, 2021

Describe the bug

After increasing version from 1.12.2.Final to 1.13.0.Final and higher the application will not startup correctly.
WARN [io.qua.dep.ste.ClassTransformingBuildStep] (build-54) Cannot transform java.util.concurrent.ThreadPoolExecutor as its containing application archive could not be found.

We use Quartz (cluster mode) for scheduling tasks among pods and java.util.concurrent.ScheduledThreadPoolExecutor to execute tasks for every pod.

Expected behavior

App starts correctly and schedules and executes first task.

Actual behavior

Application starts up and throws warning
WARN [io.qua.dep.ste.ClassTransformingBuildStep] (build-54) Cannot transform java.util.concurrent.ThreadPoolExecutor as its containing application archive could not be found.
Flyway Migration continues successfully. Then the first task is to be scheduled and application crashes showing below stack trace.

To Reproduce

  1. Download reproducer.zip
  2. run mvn clean quarkus:dev
  3. will produce error as described
  4. Modify POM.XML <quarkus.platform.version>1.12.2.Final</quarkus.platform.version>
  5. run mvn clean quarkus:dev
  6. Task is executed and new task is scheduled

Configuration

# Add your application.properties here, if applicable.

Screenshots

(If applicable, add screenshots to help explain your problem.)

Environment (please complete the following information):

Output of uname -a or ver

Darwin XXXXX 20.5.0 Darwin Kernel Version 20.5.0: Sat May 8 05:10:33 PDT 2021; root:xnu-7195.121.3~9/RELEASE_X86_64 x86_64

Output of java -version

openjdk version "11.0.7" 2020-04-14 LTS OpenJDK Runtime Environment Zulu11.39+15-CA (build 11.0.7+10-LTS) OpenJDK 64-Bit Server VM Zulu11.39+15-CA (build 11.0.7+10-LTS, mixed mode)

GraalVM version (if different from Java)

Quarkus version or git rev

Working: up to and incl. 1.12.2.Final
Not Working starting with 1.13.0.Final up to 2.0.0.Final

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

Apache Maven 3.8.1 (05c21c65bdfed0f71a2f2ada8b84da59348c4c5d) Maven home: /usr/local/Cellar/maven/3.8.1/libexec Java version: 11.0.7, vendor: Azul Systems, Inc., runtime: /Library/Java/JavaVirtualMachines/zulu-11.jdk/Contents/Home Default locale: de_DE, platform encoding: UTF-8 OS name: "mac os x", version: "10.16", arch: "x86_64", family: "mac"

Additional context

Stacktrace:
ERROR [io.qua.run.Application] (Quarkus Main Thread) Failed to start application (with profile dev): java.lang.IllegalAccessError: failed to access class java.util.concurrent.ThreadPoolExecutor$Worker from class com.bmw.MyThreadExecutor_Subclass (java.util.concurrent.ThreadPoolExecutor$Worker is in module java.base of loader 'bootstrap'; com.bmw.MyThreadExecutor_Subclass is in unnamed module of loader io.quarkus.bootstrap.classloading.QuarkusClassLoader @36361ddb) at com.bmw.MyThreadExecutor_Subclass.<init>(MyThreadExecutor_Subclass.zig:860) at com.bmw.MyThreadExecutor_Bean.create(MyThreadExecutor_Bean.zig:236) at com.bmw.MyThreadExecutor_Bean.create(MyThreadExecutor_Bean.zig:297) at io.quarkus.arc.impl.AbstractSharedContext.createInstanceHandle(AbstractSharedContext.java:96) at io.quarkus.arc.impl.AbstractSharedContext.access$000(AbstractSharedContext.java:14) at io.quarkus.arc.impl.AbstractSharedContext$1.get(AbstractSharedContext.java:29) at io.quarkus.arc.impl.AbstractSharedContext$1.get(AbstractSharedContext.java:26) at io.quarkus.arc.impl.LazyValue.get(LazyValue.java:26) at io.quarkus.arc.impl.ComputingCache.computeIfAbsent(ComputingCache.java:69) at io.quarkus.arc.impl.AbstractSharedContext.get(AbstractSharedContext.java:26) at io.quarkus.arc.impl.ClientProxies.getApplicationScopedDelegate(ClientProxies.java:17) at com.bmw.MyThreadExecutor_ClientProxy.arc$delegate(MyThreadExecutor_ClientProxy.zig:67) at com.bmw.MyThreadExecutor_ClientProxy.scheduleDataFileTask(MyThreadExecutor_ClientProxy.zig:2056) at com.bmw.AppLifecycleBean.onStart(AppLifecycleBean.java:26) at com.bmw.AppLifecycleBean_Subclass.onStart$$superaccessor2(AppLifecycleBean_Subclass.zig:340) at com.bmw.AppLifecycleBean_Subclass$$function$$2.apply(AppLifecycleBean_Subclass$$function$$2.zig:33) at io.quarkus.arc.impl.AroundInvokeInvocationContext.proceed(AroundInvokeInvocationContext.java:54) at io.quarkus.arc.runtime.devconsole.InvocationInterceptor.proceed(InvocationInterceptor.java:63) at io.quarkus.arc.runtime.devconsole.InvocationInterceptor.monitor(InvocationInterceptor.java:49) at io.quarkus.arc.runtime.devconsole.InvocationInterceptor_Bean.intercept(InvocationInterceptor_Bean.zig:521) 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) at com.bmw.AppLifecycleBean_Subclass.onStart(AppLifecycleBean_Subclass.zig:297) at com.bmw.AppLifecycleBean_Observer_onStart_fd71b5e0b207b7d1ef838b94eaeff75e52b8f463.notify(AppLifecycleBean_Observer_onStart_fd71b5e0b207b7d1ef838b94eaeff75e52b8f463.zig:147) at io.quarkus.arc.impl.EventImpl$Notifier.notifyObservers(EventImpl.java:283) at io.quarkus.arc.impl.EventImpl$Notifier.notify(EventImpl.java:268) at io.quarkus.arc.impl.EventImpl.fire(EventImpl.java:70) at io.quarkus.arc.runtime.ArcRecorder.fireLifecycleEvent(ArcRecorder.java:128) at io.quarkus.arc.runtime.ArcRecorder.handleLifecycleEvents(ArcRecorder.java:97) at io.quarkus.deployment.steps.LifecycleEventsBuildStep$startupEvent1144526294.deploy_0(LifecycleEventsBuildStep$startupEvent1144526294.zig:87) at io.quarkus.deployment.steps.LifecycleEventsBuildStep$startupEvent1144526294.deploy(LifecycleEventsBuildStep$startupEvent1144526294.zig:40) at io.quarkus.runner.ApplicationImpl.doStart(ApplicationImpl.zig:1092) at io.quarkus.runtime.Application.start(Application.java:90) at io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:100) at io.quarkus.runtime.Quarkus.run(Quarkus.java:66) at io.quarkus.runtime.Quarkus.run(Quarkus.java:42) at io.quarkus.runtime.Quarkus.run(Quarkus.java:119) at io.quarkus.runner.GeneratedMain.main(GeneratedMain.zig:29) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at io.quarkus.runner.bootstrap.StartupActionImpl$3.run(StartupActionImpl.java:134) at java.base/java.lang.Thread.run(Thread.java:834)

@mfatbmw mfatbmw added the kind/bug Something isn't working label Jul 7, 2021
@geoand
Copy link
Contributor

geoand commented Jul 7, 2021

Can you please attach a sample project that reproduces this behavior?
It will be immensely useful in tracking down what is causing this

@geoand geoand added triage/needs-reproducer We are waiting for a reproducer. and removed triage/needs-triage labels Jul 7, 2021
@mfatbmw
Copy link
Author

mfatbmw commented Jul 7, 2021

I added a reproducer.zip file to the main issue.
Using <quarkus.platform.version>1.12.2.Final</quarkus.platform.version> will work
Every later version of quarkus causes the reported warning and application fail

@geoand
Copy link
Contributor

geoand commented Jul 7, 2021

This is definitely a bug that we need to fix on our side, but you can get around it for the time being by using quarkus.arc.dev-mode.monitoring-enabled=false.
#18480 should provide a proper fix

geoand added a commit to geoand/quarkus that referenced this issue Jul 7, 2021
geoand added a commit to geoand/quarkus that referenced this issue Jul 8, 2021
geoand added a commit to geoand/quarkus that referenced this issue Jul 9, 2021
geoand added a commit that referenced this issue Jul 12, 2021
Prevent non-public classes of method params from breaking interceptor handling
@quarkus-bot quarkus-bot bot added this to the 2.1 - main milestone Jul 12, 2021
@gsmet gsmet modified the milestones: 2.1 - main, 2.0.2.Final Jul 12, 2021
gsmet pushed a commit to gsmet/quarkus that referenced this issue Jul 12, 2021
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.

3 participants