quarkus: Java 12 build fails: Could not initialize class org.jboss.classfilewriter.DefaultClassFactory
This issue looks very similar to #819, but it is a different class (from probably the same library):
Running our build with Quarkus 0.11.0 on JDK 12 fails:
Could not initialize class org.jboss.classfilewriter.DefaultClassFactory
java.lang.RuntimeException:
org.jboss.builder.BuildException: Build failure: Build failed due to errors
[error]: Build step io.quarkus.deployment.logging.LoggingResourceProcessor#setupLoggingRuntimeInit threw an exception: java.lang.Error: java.lang.NoSuchFieldException: override
[error]: Build step io.quarkus.deployment.logging.LoggingResourceProcessor#setupLoggingStaticInit threw an exception: java.lang.NoClassDefFoundError: Could not initialize class org.jboss.classfilewriter.DefaultClassFactory
Caused by: org.jboss.builder.BuildException:
Build failure: Build failed due to errors
[error]: Build step io.quarkus.deployment.logging.LoggingResourceProcessor#setupLoggingRuntimeInit threw an exception: java.lang.Error: java.lang.NoSuchFieldException: override
[error]: Build step io.quarkus.deployment.logging.LoggingResourceProcessor#setupLoggingStaticInit threw an exception: java.lang.NoClassDefFoundError: Could not initialize class org.jboss.classfilewriter.DefaultClassFactory
Caused by: java.lang.Error: java.lang.NoSuchFieldException: override
Caused by: java.lang.NoSuchFieldException: override
You will find the full build-output here: https://travis-ci.org/mapstruct/mapstruct-examples/jobs/506375906 (I am not sure if these logs will be discarded after time).
Java version details:
openjdk version “12” 2019-03-19 OpenJDK Runtime Environment (build 12+33) OpenJDK 64-Bit Server VM (build 12+33, mixed mode, sharing)
In case you need more information please let me know.
(nevertheless, thank you very much for Quarkus - just did a few tests with the library and it looks gorgeous!)
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 3
- Comments: 18 (15 by maintainers)
Commits related to this issue
- Replace jboss-invocation with Gizmo based ProxyFactory This is first step to allow the project to build on JDK 12+ Relates to: #1534 — committed to geoand/quarkus by geoand 5 years ago
- Use custom ClassLoader with visible defineClass when generating proxies This makes sense for Quarkus where the ClassLoader is under our control. The benefit is that proxy classes can be generated no ... — committed to geoand/quarkus by geoand 5 years ago
- Use custom ClassLoader with visible defineClass when generating proxies This makes sense for Quarkus where the ClassLoader is under our control. The benefit is that proxy classes can be generated no ... — committed to geoand/quarkus by geoand 5 years ago
- Bump quarkus version when required - quarkusio/quarkus#1534 - quarkusio/quarkus#4151 — committed to nmasse-itix/rhforum-2019-quotegame by nmasse-itix 4 years ago
@dmlloyd @stuartwdouglas any plans to make Quarkus run on java 12 and java 13 ?
I just want to support what was written in https://github.com/quarkusio/quarkus/issues/1534#issuecomment-476261148:
I use JDK 12 (with
--enable-preview- it would be good to test if preview features also work with byte code generator you are using) and plan to test out JDK 13 before it is released. And I also wanted to give Quarkus a chance, but lack of latest Java version support for a bleeding edge is quite sad.#3906 should take care of the issue for good
@stuartwdouglas @dmlloyd I see there is now a
ClassFactoryabstraction in jboss-classfilewriter but AFAICS the only implementation in the jar is one not suitable for JDK 12.Is there any plan to fix that?
(with Quarkus being bleeding edge, there’s a good chance people will play with it with the latest JDKs)
Thanks for the info. I’ll take a look at a Gizmo based solution, hopefully I can have it in time for
0.22The problem stil exists in 0.21.1 version
Just running into this with JDK 13; reading the discussion in #819, would it perhaps make sense to use ByteBuddy for that proxy generation?