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 with jackson annotated classes #28912

Closed
pahjbo opened this issue Oct 28, 2022 · 1 comment · Fixed by #28937
Closed

Build fails with jackson annotated classes #28912

pahjbo opened this issue Oct 28, 2022 · 1 comment · Fixed by #28937
Labels
area/jackson Issues related to Jackson (JSON library) kind/bug Something isn't working
Milestone

Comments

@pahjbo
Copy link

pahjbo commented Oct 28, 2022

Describe the bug

quarkus dev fails to complete successfully when dealing with resteasy-reactive-jackson and some jackson annotated classes

Expected behavior

build should not fail

Actual behavior

A snippet of where the build fails - sorry I do not know how to get into the debugger during the build to give more information

[INFO] Compiling 2 source files to /Users/pharriso/Downloads/code-with-quarkus-2/target/test-classes
Listening for transport dt_socket at address: 5005
2022-10-28 20:42:30,950 INFO  [io.qua.dep.dev.IsolatedDevModeMain] (main) Attempting to start live reload endpoint to recover from previous Quarkus startup failure
2022-10-28 20:42:31,331 ERROR [io.qua.dep.dev.IsolatedDevModeMain] (main) Failed to start quarkus: java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
	[error]: Build step io.quarkus.jackson.deployment.JacksonProcessor#register threw an exception: java.lang.IllegalArgumentException: Not a class
	at org.jboss.jandex.FieldInfo.asClass(FieldInfo.java:216)
	at io.quarkus.jackson.deployment.JacksonProcessor.register(JacksonProcessor.java:209)
	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.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:909)
	at io.quarkus.builder.BuildContext.run(BuildContext.java:281)
	at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
	at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
	at java.base/java.lang.Thread.run(Thread.java:834)
	at org.jboss.threads.JBossThread.run(JBossThread.java:501)

	at io.quarkus.runner.bootstrap.AugmentActionImpl.runAugment(AugmentActionImpl.java:335)
	at io.quarkus.runner.bootstrap.AugmentActionImpl.createInitialRuntimeApplication(AugmentActionImpl.java:252)
	at io.quarkus.runner.bootstrap.AugmentActionImpl.createInitialRuntimeApplication(AugmentActionImpl.java:60)
	at io.quarkus.deployment.dev.IsolatedDevModeMain.firstStart(IsolatedDevModeMain.java:86)
	at io.quarkus.deployment.dev.IsolatedDevModeMain.accept(IsolatedDevModeMain.java:447)
	at io.quarkus.deployment.dev.IsolatedDevModeMain.accept(IsolatedDevModeMain.java:59)
	at io.quarkus.bootstrap.app.CuratedApplication.runInCl(CuratedApplication.java:149)
	at io.quarkus.bootstrap.app.CuratedApplication.runInAugmentClassLoader(CuratedApplication.java:104)
	at io.quarkus.deployment.dev.DevModeMain.start(DevModeMain.java:131)
	at io.quarkus.deployment.dev.DevModeMain.main(DevModeMain.java:62)
Caused by: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
	[error]: Build step io.quarkus.jackson.deployment.JacksonProcessor#register threw an exception: java.lang.IllegalArgumentException: Not a class
	at org.jboss.jandex.FieldInfo.asClass(FieldInfo.java:216)
	at io.quarkus.jackson.deployment.JacksonProcessor.register(JacksonProcessor.java:209)
	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.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:909)
	at io.quarkus.builder.BuildContext.run(BuildContext.java:281)
	at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
	at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
	at java.base/java.lang.Thread.run(Thread.java:834)
	at org.jboss.threads.JBossThread.run(JBossThread.java:501)

	at io.quarkus.builder.Execution.run(Execution.java:123)
	at io.quarkus.builder.BuildExecutionBuilder.execute(BuildExecutionBuilder.java:79)
	at io.quarkus.deployment.QuarkusAugmentor.run(QuarkusAugmentor.java:160)
	at io.quarkus.runner.bootstrap.AugmentActionImpl.runAugment(AugmentActionImpl.java:331)
	... 9 more
Caused by: java.lang.IllegalArgumentException: Not a class
	at org.jboss.jandex.FieldInfo.asClass(FieldInfo.java:216)
	at io.quarkus.jackson.deployment.JacksonProcessor.register(JacksonProcessor.java:209)
	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.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:909)
	at io.quarkus.builder.BuildContext.run(BuildContext.java:281)
	at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
	at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
	at java.base/java.lang.Thread.run(Thread.java:834)
	at org.jboss.threads.JBossThread.run(JBossThread.java:501)



--
Tests paused

How to Reproduce?

This is an example of what fails
code-with-quarkus-2.zip
The jackson annotated code that it tries to use as a dependency is not published to a repository yet, but can be generated by checking out https://github.com/ivoa/ProposalDM and running
gradle publishToMavenLocal

Output of uname -a or ver

Darwin Paul-Harrisons-MacBook-Pro.local 21.6.0 Darwin Kernel Version 21.6.0: Thu Sep 29 20:12:57 PDT 2022; root:xnu-8020.240.7~1/RELEASE_X86_64 x86_64

Output of java -version

java version "11.0.14" 2022-01-18 LTS Java(TM) SE Runtime Environment 18.9 (build 11.0.14+8-LTS-263) Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.14+8-LTS-263, mixed mode)

GraalVM version (if different from Java)

No response

Quarkus version or git rev

2.13.3.Final

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

same behaviour with gradle and maven

Additional information

No response

@pahjbo pahjbo added the kind/bug Something isn't working label Oct 28, 2022
@quarkus-bot
Copy link

quarkus-bot bot commented Oct 28, 2022

/cc @geoand, @gsmet

@quarkus-bot quarkus-bot bot added the area/jackson Issues related to Jackson (JSON library) label Oct 28, 2022
geoand added a commit to geoand/quarkus that referenced this issue Oct 31, 2022
pahjbo added a commit to ivoa/ProposalDM that referenced this issue Oct 31, 2022
ok to use the main branch again when quarkusio/quarkus#28912 has been fixed in quarkus release.
gsmet added a commit that referenced this issue Oct 31, 2022
Properly handle @JsonTypeIdResolver
@quarkus-bot quarkus-bot bot added this to the 2.15 - main milestone Oct 31, 2022
@gsmet gsmet modified the milestones: 2.15 - main, 2.14.0.Final Nov 1, 2022
gsmet pushed a commit to gsmet/quarkus that referenced this issue Nov 1, 2022
@gsmet gsmet modified the milestones: 2.14.0.Final, 2.13.4.Final Nov 2, 2022
gsmet pushed a commit to gsmet/quarkus that referenced this issue Nov 2, 2022
zakkak pushed a commit to zakkak/quarkus that referenced this issue Nov 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/jackson Issues related to Jackson (JSON library) kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants