Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Eclipse on Java 13 vs Annotations(Running Eclipse on Java 13)
Eclipse on Java 13 vs Annotations [message #1818132] Fri, 06 December 2019 17:10 Go to next message
Eclipse UserFriend
We are trying to switch all our work to be done on Java 13.
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.

Any ideas for a workaround? I haven't seen a good way to add the jaxb-api-2.3.1.jar file to the eclipse classpath.
Re: Eclipse on Java 13 vs Annotations [message #1818134 is a reply to message #1818132] Fri, 06 December 2019 18:23 Go to previous messageGo to next message
Eclipse UserFriend
I'm beginning to suspect that something is broken in Eclipse 2019-03 Annotation processing.
I've switch Eclipse back to Java 8, and our project, and out 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.
Re: Eclipse on Java 13 vs Annotations [message #1818152 is a reply to message #1818134] Sun, 08 December 2019 23:18 Go to previous messageGo to next message
Eclipse UserFriend
Looks like a bug to me.. Can you raise bug please?
Re: Eclipse on Java 13 vs Annotations [message #1818730 is a reply to message #1818152] Wed, 25 December 2019 02:40 Go to previous messageGo to next message
Eclipse UserFriend
How can solve bug?
Re: Eclipse on Java 13 vs Annotations [message #1818733 is a reply to message #1818730] Wed, 25 December 2019 07:40 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

Have you tried Eclipse 2019-12 (this release supports Java 13 ).

Regards.
Re: Eclipse on Java 13 vs Annotations [message #1818734 is a reply to message #1818132] Wed, 25 December 2019 07:52 Go to previous messageGo to next message
Eclipse UserFriend
If you are using Apache Maven

Add this to the pom:

<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.1</version>
</dependency>

Re: Eclipse on Java 13 vs Annotations [message #1818779 is a reply to message #1818733] Sat, 28 December 2019 01:52 Go to previous message
Eclipse UserFriend
Thanks for sharing the article link, It will be helpful for me.
Previous Topic:ClassNotFoundException
Next Topic:Text disappears in editor as it is being written
Goto Forum:
  


Current Time: Mon Jul 07 14:02:42 EDT 2025

Powered by FUDForum. Page generated in 0.33544 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top