AnnotationReader exception

41 views
Skip to first unread message

Hannah R

unread,
Jan 12, 2021, 2:04:52 PM1/12/21
to CodenameOne Discussions
I am trying to run Android build, but I get this exception in build.xml:  java.lang.NoClassDefFoundError: com/sun/xml/bind/v2/model/annotation/AnnotationReader

Also, I don't know if it's relevant but I get this in log too:
Processing GUI builder file: C:\Users\.....\Form.java
Attempting to generate GUI sources for C:\Users\......\res\guibuilder\com\......\Form.gui with System JAXB
Failed to generate Gui Source with System JAXB.  Will attempt using bundled JAXB.

How can I fix this problem?  

Thank you. 

Shai Almog

unread,
Jan 12, 2021, 10:21:02 PM1/12/21
to CodenameOne Discussions
Which version of the JDK are you using the run the IDE?
Try explicitly adding jaxb to your JDK path. The removal of that library caused a lot of pain here. We hope to remove the dependency on that in the near future.

Hannah R

unread,
Jan 13, 2021, 10:52:04 AM1/13/21
to CodenameOne Discussions
Hi Shai,

Runtime version is 11.0.9.1
Project SDK was 11.0.3, I changed it to 1.8 (I got a hint from this question https://stackoverflow.com/questions/63766151/codenameone-failed-to-generate-gui-source-with-system-jaxb
I don't know if that's the solution (I also fixed some other errors), but now Android build worked successfully.

Thank you! 
Reply all
Reply to author
Forward
0 new messages