users@jaxb.java.net

JAXB 2.1.8 XJCTask issue with source="1.0"

From: Philip A. Culver <pculver_at_bostonatlantic.net>
Date: Thu, 11 Sep 2008 21:10:20 -0400

Hello,

 

I am attempting to migrate to JAXB 2.1.8 from JAXB 1.0. I initially need
to compile and run the code using the 1.0 source/target attributes of jaxb.
However I can not compile my schema in this manner. I get the error at the
bottom of this email while using JDK 1.6.0_07 and jaxb 2.1.8:

 

I thought this might be a problem in my code so I modified the build.xml for
the sample project: datatypeconverter so that the xjc execution had the
attributes source="1.0" and target="1.0" and received the same error as
earlier. I don't know if I am doing something run. Some web searches seem
to indicate this was a bug in 2.1.3 but was supposedly fixed. FYI: My
schema compiles correctly in jaxb 2.0.5 with the source="1.0" attribute.

 

java.lang.NoClassDefFoundError: com/sun/xml/bind/JAXBAssertionError

        at java.lang.Class.forName0(Native Method)

        at java.lang.Class.forName(Class.java:169)

        at com.sun.tools.xjc.Options.class$(Options.java:154)

        at com.sun.tools.xjc.Options.findServices(Options.java:482)

        at com.sun.tools.xjc.Options.<clinit>(Options.java:154)

        at com.sun.tools.xjc.XJCTask.<init>(XJCTask.java:49)

        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)

        at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcces
sorImpl.java:39)

        at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstruc
torAccessorImpl.java:27)

        at java.lang.reflect.Constructor.newInstance(Constructor.java:513)

        at java.lang.Class.newInstance0(Class.java:355)

        at java.lang.Class.newInstance(Class.java:308)

        at com.sun.istack.tools.ProtectedTask.execute(ProtectedTask.java:49)

        at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)

        at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)

        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)

        at java.lang.reflect.Method.invoke(Method.java:597)

        at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)

        at org.apache.tools.ant.Task.perform(Task.java:348)

        at org.apache.tools.ant.Target.execute(Target.java:357)

        at org.apache.tools.ant.Target.performTasks(Target.java:385)

        at
org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)

        at org.apache.tools.ant.Project.executeTarget(Project.java:1306)

        at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.j
ava:41)

        at org.apache.tools.ant.Project.executeTargets(Project.java:1189)

        at org.apache.tools.ant.Main.runBuild(Main.java:758)

        at org.apache.tools.ant.Main.startAnt(Main.java:217)

        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)

        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)

Caused by: java.lang.ClassNotFoundException:
com.sun.xml.bind.JAXBAssertionError

        at
com.sun.istack.tools.ParallelWorldClassLoader.findClass(ParallelWorldClassLo
ader.java:71)

        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)

        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)

        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)

 

 

Thanks,

Phil