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

Build fails on Java 12 due to classfilewriter #819

Closed
dmlloyd opened this issue Feb 8, 2019 · 4 comments
Closed

Build fails on Java 12 due to classfilewriter #819

dmlloyd opened this issue Feb 8, 2019 · 4 comments
Labels
kind/bug Something isn't working
Milestone

Comments

@dmlloyd
Copy link
Member

dmlloyd commented Feb 8, 2019

Here's the mushroom cloud:

java.lang.RuntimeException: 
org.jboss.builder.BuildException: Build failure: Build failed due to errors
	[error]: Build step org.jboss.shamrock.deployment.logging.LoggingResourceProcessor#setupLoggingRuntimeInit threw an exception: java.lang.Error: java.lang.NoSuchFieldException: override
	[error]: Build step org.jboss.shamrock.deployment.logging.LoggingResourceProcessor#setupLoggingStaticInit threw an exception: java.lang.NoClassDefFoundError: Could not initialize class org.jboss.classfilewriter.ClassFile
	at org.jboss.shamrock.runner.RuntimeRunner.run(RuntimeRunner.java:120)
	at org.jboss.shamrock.test.junit.ShamrockTestExtension.doJavaStart(ShamrockTestExtension.java:62)
	at org.jboss.shamrock.test.junit.ShamrockTestExtension.beforeAll(ShamrockTestExtension.java:49)
	at org.junit.jupiter.engine.descriptor.ClassTestDescriptor.lambda$invokeBeforeAllCallbacks$7(ClassTestDescriptor.java:358)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:72)
	at org.junit.jupiter.engine.descriptor.ClassTestDescriptor.invokeBeforeAllCallbacks(ClassTestDescriptor.java:358)
	at org.junit.jupiter.engine.descriptor.ClassTestDescriptor.before(ClassTestDescriptor.java:197)
	at org.junit.jupiter.engine.descriptor.ClassTestDescriptor.before(ClassTestDescriptor.java:74)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$4(NodeTestTask.java:105)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:72)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:98)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:74)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1540)
	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$4(NodeTestTask.java:112)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:72)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:98)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:74)
	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:32)
	at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
	at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:51)
	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:170)
	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:154)
	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:90)
	at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invokeAllTests(JUnitPlatformProvider.java:142)
	at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invoke(JUnitPlatformProvider.java:117)
	at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:383)
	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:344)
	at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:125)
	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:417)
Caused by: org.jboss.builder.BuildException: Build failure: Build failed due to errors
	[error]: Build step org.jboss.shamrock.deployment.logging.LoggingResourceProcessor#setupLoggingRuntimeInit threw an exception: java.lang.Error: java.lang.NoSuchFieldException: override
	[error]: Build step org.jboss.shamrock.deployment.logging.LoggingResourceProcessor#setupLoggingStaticInit threw an exception: java.lang.NoClassDefFoundError: Could not initialize class org.jboss.classfilewriter.ClassFile
	at org.jboss.builder.Execution.run(Execution.java:116)
	at org.jboss.builder.BuildExecutionBuilder.execute(BuildExecutionBuilder.java:136)
	at org.jboss.shamrock.deployment.ShamrockAugmentor.run(ShamrockAugmentor.java:95)
	at org.jboss.shamrock.runner.RuntimeRunner.run(RuntimeRunner.java:87)
	... 29 more
	Suppressed: java.lang.NoClassDefFoundError: Could not initialize class org.jboss.classfilewriter.ClassFile
		at org.jboss.invocation.proxy.AbstractClassFactory.<init>(AbstractClassFactory.java:97)
		at org.jboss.invocation.proxy.AbstractSubclassFactory.<init>(AbstractSubclassFactory.java:87)
		at org.jboss.invocation.proxy.AbstractProxyFactory.<init>(AbstractProxyFactory.java:69)
		at org.jboss.invocation.proxy.ProxyFactory.<init>(ProxyFactory.java:256)
		at org.jboss.shamrock.deployment.recording.BytecodeRecorderImpl$MethodRecorder.getRecordingProxy(BytecodeRecorderImpl.java:175)
		at org.jboss.shamrock.deployment.recording.BytecodeRecorderImpl.getRecordingProxy(BytecodeRecorderImpl.java:137)
		at org.jboss.shamrock.deployment.ExtensionLoader.lambda$loadStepsFrom$58(ExtensionLoader.java:315)
		at org.jboss.shamrock.deployment.ExtensionLoader$1.execute(ExtensionLoader.java:379)
		at org.jboss.builder.BuildContext.run(BuildContext.java:402)
		at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
		at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1998)
		at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1525)
		at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1416)
		at java.base/java.lang.Thread.run(Thread.java:835)
		at org.jboss.threads.JBossThread.run(JBossThread.java:479)
Caused by: java.lang.Error: java.lang.NoSuchFieldException: override
	at org.jboss.classfilewriter.ClassFile$1.run(ClassFile.java:394)
	at org.jboss.classfilewriter.ClassFile$1.run(ClassFile.java:385)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:551)
	at org.jboss.classfilewriter.ClassFile.<clinit>(ClassFile.java:385)
	at org.jboss.invocation.proxy.AbstractClassFactory.<init>(AbstractClassFactory.java:97)
	at org.jboss.invocation.proxy.AbstractSubclassFactory.<init>(AbstractSubclassFactory.java:87)
	at org.jboss.invocation.proxy.AbstractProxyFactory.<init>(AbstractProxyFactory.java:69)
	at org.jboss.invocation.proxy.ProxyFactory.<init>(ProxyFactory.java:256)
	at org.jboss.shamrock.deployment.recording.BytecodeRecorderImpl$MethodRecorder.getRecordingProxy(BytecodeRecorderImpl.java:175)
	at org.jboss.shamrock.deployment.recording.BytecodeRecorderImpl.getRecordingProxy(BytecodeRecorderImpl.java:137)
	at org.jboss.shamrock.deployment.ExtensionLoader.lambda$loadStepsFrom$58(ExtensionLoader.java:315)
	at org.jboss.shamrock.deployment.ExtensionLoader$1.execute(ExtensionLoader.java:379)
	at org.jboss.builder.BuildContext.run(BuildContext.java:402)
	at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
	at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1998)
	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1525)
	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1416)
	at java.base/java.lang.Thread.run(Thread.java:835)
	at org.jboss.threads.JBossThread.run(JBossThread.java:479)
Caused by: java.lang.NoSuchFieldException: override
	at java.base/java.lang.Class.getDeclaredField(Class.java:2417)
	at org.jboss.classfilewriter.ClassFile$1.run(ClassFile.java:392)
	... 18 more

Not sure why we're bringing in jboss-invocation.

@stuartwdouglas
Copy link
Member

I want to get rid of classfilewriter. Once gizmo is public I will change jboss-invocation to use this instead.

@dmlloyd
Copy link
Member Author

dmlloyd commented Feb 11, 2019

Is jboss-invocation just being used for the proxy stuff? Maybe we should pull the proxy thing into Gizmo instead, and ditch jboss-invocation.

@stuartwdouglas
Copy link
Member

yea, I pulled it in right at the start when I was prototyping all this and never revisited it. I think a proxy library based on Gizmo makes sense, but I don't know if it should be in gizmo core.

@stuartwdouglas
Copy link
Member

For now I am just going to update the classfilewriter version.

@Sanne Sanne closed this as completed in 5b4e734 Feb 12, 2019
Sanne added a commit that referenced this issue Feb 12, 2019
Fixes #819 classfilewriter 1.2.4.Final
@cescoffier cescoffier added the kind/bug Something isn't working label Feb 14, 2019
@cescoffier cescoffier added this to the 0.9.0 milestone Feb 14, 2019
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

No branches or pull requests

3 participants