Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 22:10 Go to next message
Missing name Mising name is currently offline Missing name Mising nameFriend
Messages: 105
Registered: December 2010
Senior Member
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 23:23 Go to previous messageGo to next message
Missing name Mising name is currently offline Missing name Mising nameFriend
Messages: 105
Registered: December 2010
Senior Member
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] Mon, 09 December 2019 04:18 Go to previous messageGo to next message
Jay Arthanareeswaran is currently offline Jay ArthanareeswaranFriend
Messages: 128
Registered: July 2009
Senior Member
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 07:40 Go to previous messageGo to next message
Bhondawe Patil is currently offline Bhondawe PatilFriend
Messages: 23
Registered: October 2019
Junior Member
How can solve bug?
Re: Eclipse on Java 13 vs Annotations [message #1818733 is a reply to message #1818730] Wed, 25 December 2019 12:40 Go to previous messageGo to next message
Eitan Rosenberg is currently offline Eitan RosenbergFriend
Messages: 141
Registered: October 2018
Senior Member
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 12:52 Go to previous messageGo to next message
Eitan Rosenberg is currently offline Eitan RosenbergFriend
Messages: 141
Registered: October 2018
Senior Member
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 06:52 Go to previous message
Bhondawe Patil is currently offline Bhondawe PatilFriend
Messages: 23
Registered: October 2019
Junior Member
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: Thu Apr 25 19:12:01 GMT 2024

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

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

Back to the top