hilla icon indicating copy to clipboard operation
hilla copied to clipboard

java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlElement when generating Hilla OpenAPI bindings using Gradle Plugin

Open kjordan2001 opened this issue 1 year ago • 1 comments

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 avatar Oct 22 '24 14:10 kjordan2001

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.

platosha avatar Oct 24 '24 11:10 platosha