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

Most upvoted comments

@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:

(with Quarkus being bleeding edge, there’s a good chance people will play with it with the latest JDKs)

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 ClassFactory abstraction 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.22

The 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?