Community
Participate
Working Groups
I've run into a problem while running Eclipse on Java 13. We use the Velocity Annotation processor to generate code. When Eclipse runs the plugin, it is throwing a: java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException ... at org.eclipse.jdt.apt.core.internal.ClassServiceFactory.newInstance(ClassServiceFactory.java:30) at org.eclipse.jdt.internal.apt.pluggable.core.dispatch.IdeAnnotationProcessorManager.discoverNextProcessor(IdeAnnotationProcessorManager.java:96) 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:171) at org.eclipse.jdt.internal.apt.pluggable.core.dispatch.IdeAnnotationProcessorManager.processAnnotations(IdeAnnotationProcessorManager.java:138) at org.eclipse.jdt.internal.compiler.Compiler.processAnnotations(Compiler.java:934) Since the java 13 runtime no longer includes the JAXB classes, it appears that Eclipse will need to be updated to include the relevant .jar. The .jar is already in our Plugin project, but it appears that Eclipse is referencing it outside of our project. Then I switched Eclipse back to Java 8, and our project, and our annotation plugin - and it still fails, though with a different exception: java.lang.Exception: java.lang.NoClassDefFoundError: org/apache/velocity/context/Context at org.eclipse.jdt.internal.compiler.apt.dispatch.RoundDispatcher.handleProcessor(RoundDispatcher.java:172) at org.eclipse.jdt.internal.compiler.apt.dispatch.RoundDispatcher.round(RoundDispatcher.java:124) at org.eclipse.jdt.internal.compiler.apt.dispatch.BaseAnnotationProcessorManager.processAnnotations(BaseAnnotationProcessorManager.java:171) at org.eclipse.jdt.internal.apt.pluggable.core.dispatch.IdeAnnotationProcessorManager.processAnnotations(IdeAnnotationProcessorManager.java:138) at org.eclipse.jdt.internal.compiler.Compiler.processAnnotations(Compiler.java:934) That class is in one of the .jar files our annotation plugin uses. This all worked fine with Eclipse 4.7.3a on Java 8.
Something seems to be wrong with the way the Annotation processing finds the needed .jar files. In our app that uses Annotations, the Build path was referencing the "velocity-engine-core-2.0.jar" in the AnnotationPlugin project. So the .jar was in the project classpath. Since the error appeared to indicate that it couldn't find that .jar, I copied it to the project lib directory, and updated the Build path to the new location. Now it can find it. Note that in the previous version of Eclipse I was using, 4.7.3a, it was working fine with the .jar in the other project.
I should note that eclipse definitely DOES have the issue where it can't run under Java 13, as it is missing the jaxb support. I'm having to run Eclipse 4.13 under Java 8 in order to get the annotation support to work.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.