We're updating the issue view to help you get more done. 

Document JAXB dependencies should be added for using hibernate-jpamodelgen in Eclipse IDE

Description

The hibernate-jpamodelgen usage within Eclipse IDE does not work on java 11 due to missing jaxb-api dependency.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 !ENTRY org.eclipse.jdt.apt.pluggable.core 4 1 2018-11-29 11:18:14.839 !MESSAGE Unable to create instance of annotation processor org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor !STACK 0 java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException at org.hibernate.jpamodelgen.xml.JpaDescriptorParser.<init>(JpaDescriptorParser.java:60) at org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor.init(JPAMetaModelEntityProcessor.java:99) at org.eclipse.jdt.internal.apt.pluggable.core.dispatch.IdeAnnotationProcessorManager.discoverNextProcessor(IdeAnnotationProcessorManager.java:97) at org.eclipse.jdt.internal.compiler.apt.dispatch.RoundDispatcher.round(RoundDispatcher.java:119) at org.eclipse.jdt.internal.compiler.apt.dispatch.BaseAnnotationProcessorManager.processAnnotations(BaseAnnotationProcessorManager.java:162) at org.eclipse.jdt.internal.apt.pluggable.core.dispatch.IdeAnnotationProcessorManager.processAnnotations(IdeAnnotationProcessorManager.java:138) at org.eclipse.jdt.internal.compiler.Compiler.processAnnotations(Compiler.java:940) at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:450) at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:426) at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:386) at org.eclipse.jdt.internal.core.builder.IncrementalImageBuilder.compile(IncrementalImageBuilder.java:371) at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:318) at org.eclipse.jdt.internal.core.builder.IncrementalImageBuilder.incrementalBuildLoop(IncrementalImageBuilder.java:186) at org.eclipse.jdt.internal.core.builder.IncrementalImageBuilder.build(IncrementalImageBuilder.java:143) at org.eclipse.jdt.internal.core.builder.JavaBuilder.buildDeltas(JavaBuilder.java:279) at org.eclipse.jdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:200) at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:798) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:219) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:262) at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:315) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:318) at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:370) at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:391) at org.eclipse.core.internal.resources.Workspace.buildInternal(Workspace.java:504) at org.eclipse.core.internal.resources.Workspace.build(Workspace.java:404) at org.eclipse.jdt.internal.ui.util.CoreUtility$BuildJob.run(CoreUtility.java:163) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63) Caused by: java.lang.ClassNotFoundException: javax.xml.bind.JAXBException at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:471) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521) ... 29 more

Currently, the workaround is to manually add the jaxb-api.jar in the factory path.

Note that the maven-processor-plugin is working fine without additional dependency.

Environment

java11

Status

Assignee

Guillaume Smet

Reporter

Max Huang

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

5.4.0.CR1

Priority

Major