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.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlElement when generating Hilla OpenAPI bindings using Gradle Plugin #2860

Open
kjordan2001 opened this issue Oct 22, 2024 · 1 comment
Labels
bug Something isn't working hilla Issues related to Hilla Impact: Low investigation Severity: Minor

Comments

@kjordan2001
Copy link
Contributor

kjordan2001 commented Oct 22, 2024

Describe the bug

I just upgraded to Vaadin 24.5 and am getting this error when I try to build my Gradle project that has a Hilla Endpoint in it:

[09:22:23]W: [Gradle failure report] Caused by: java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlElement
[09:22:23]W: [Gradle failure report] at com.fasterxml.jackson.module.jaxb.JaxbAnnotationIntrospector.(JaxbAnnotationIntrospector.java:137)
[09:22:23]W: [Gradle failure report] at com.fasterxml.jackson.module.jaxb.JaxbAnnotationIntrospector.(JaxbAnnotationIntrospector.java:124)
[09:22:23]W: [Gradle failure report] at com.fasterxml.jackson.module.jaxb.JaxbAnnotationModule.setupModule(JaxbAnnotationModule.java:98)
[09:22:23]W: [Gradle failure report] at com.fasterxml.jackson.databind.ObjectMapper.registerModule(ObjectMapper.java:908)
[09:22:23]W: [Gradle failure report] at com.fasterxml.jackson.databind.ObjectMapper.registerModules(ObjectMapper.java:1110)
[09:22:23]W: [Gradle failure report] at com.fasterxml.jackson.databind.ObjectMapper.findAndRegisterModules(ObjectMapper.java:1194)
[09:22:23]W: [Gradle failure report] at com.vaadin.hilla.parser.utils.JsonPrinter.(JsonPrinter.java:16)
[09:22:23]W: [Gradle failure report] at com.vaadin.hilla.engine.ParserProcessor.createOpenAPI(ParserProcessor.java:62)
[09:22:23]W: [Gradle failure report] at com.vaadin.hilla.engine.ParserProcessor.process(ParserProcessor.java:70)
[09:22:23]W: [Gradle failure report] at com.vaadin.gradle.plugin.EngineGenerateTask.engineGenerate(EngineGenerateTask.kt:78)

Expected-behavior

No response

Reproduction

Update Vaadin project to 24.5 that has a Hilla Endpoint in it and generation will fail.

System Info

OS X and Linux.
Vaadin and Hilla 24.5

@kjordan2001 kjordan2001 added bug Something isn't working hilla Issues related to Hilla labels Oct 22, 2024
@platosha
Copy link
Contributor

Hi, could you, please, specify which version you're upgrading from? Also, would be great to know what adds Jaxb dependencies on the class path. AFAIK Hilla should not bring those.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working hilla Issues related to Hilla Impact: Low investigation Severity: Minor
Projects
None yet
Development

No branches or pull requests

2 participants