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

java 17 only extensions fails quarkus create app on java 11 #30541

Closed
maxandersen opened this issue Jan 23, 2023 · 2 comments
Closed

java 17 only extensions fails quarkus create app on java 11 #30541

maxandersen opened this issue Jan 23, 2023 · 2 comments
Labels
area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins kind/enhancement New feature or request

Comments

@maxandersen
Copy link
Member

Describe the bug

since neo4j latest update (quarkiverse/quarkus-neo4j@dd0f7f1) that targets java 17 quarkus create app -x neo4j (with or without --java 11) fails to build.

[ERROR] Failed to execute goal io.quarkus.platform:quarkus-maven-plugin:2.15.3.Final:build (default) on project code-with-quarkus: Failed to build quarkus application: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
[ERROR] 	[error]: Build step io.quarkus.neo4j.deployment.Neo4jDriverProcessor#configureDriverProducer threw an exception: java.lang.UnsupportedClassVersionError: org/neo4j/driver/Config$ConfigBuilder has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0
[ERROR] 	at java.base/java.lang.ClassLoader.defineClass1(Native Method)
[ERROR] 	at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1017)
[ERROR] 	at io.quarkus.bootstrap.classloading.QuarkusClassLoader.loadClass(QuarkusClassLoader.java:497)
[ERROR] 	at io.quarkus.bootstrap.classloading.QuarkusClassLoader.loadClass(QuarkusClassLoader.java:457)
[ERROR] 	at java.base/java.lang.Class.getDeclaredMethods0(Native Method)
[ERROR] 	at java.base/java.lang.Class.privateGetDeclaredMethods(Class.java:3166)
[ERROR] 	at java.base/java.lang.Class.getDeclaredMethods(Class.java:2309)
[ERROR] 	at io.quarkus.deployment.proxy.ProxyFactory.addMethodsOfClass(ProxyFactory.java:118)
[ERROR] 	at io.quarkus.deployment.proxy.ProxyFactory.addMethodsOfClass(ProxyFactory.java:114)
[ERROR] 	at io.quarkus.deployment.proxy.ProxyFactory.<init>(ProxyFactory.java:67)
[ERROR] 	at io.quarkus.deployment.recording.BytecodeRecorderImpl.getRecordingProxy(BytecodeRecorderImpl.java:377)
[ERROR] 	at io.quarkus.deployment.ExtensionLoader.lambda$loadStepsFromClass$57(ExtensionLoader.java:663)
[ERROR] 	at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:905)
[ERROR] 	at io.quarkus.builder.BuildContext.run(BuildContext.java:281)
[ERROR] 	at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
[ERROR] 	at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
[ERROR] 	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
[ERROR] 	at java.base/java.lang.Thread.run(Thread.java:829)
[ERROR] 	at org.jboss.threads.JBossThread.run(JBossThread.java:501)
[ERROR]
[ERROR] 	[error]: Build step io.quarkus.neo4j.deployment.Neo4jDriverProcessor#metrics threw an exception: java.lang.UnsupportedClassVersionError: org/neo4j/driver/Config$ConfigBuilder has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0
[ERROR] 	at java.base/java.lang.ClassLoader.defineClass1(Native Method)
[ERROR] 	at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1017)

Question is how we deal with this since neo4j does have a quarkus-neo4j 1.x version available that works with Java 11.

Feels like we at least could warn or error on it not being possible to use java 11

Expected behavior

No response

Actual behavior

No response

How to Reproduce?

No response

Output of uname -a or ver

No response

Output of java -version

No response

GraalVM version (if different from Java)

No response

Quarkus version or git rev

No response

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

No response

Additional information

No response

@maxandersen maxandersen added the kind/enhancement New feature or request label Jan 23, 2023
@maxandersen maxandersen added the area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins label Jan 23, 2023
@gastaldi
Copy link
Contributor

It would be interesting if extensions could provide the minimum Java info in the extension metadata:

@geoand
Copy link
Contributor

geoand commented Mar 5, 2024

This is now out of date as we use Java 17 as the baseline

@geoand geoand closed this as not planned Won't fix, can't repro, duplicate, stale Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins kind/enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants