Yes it is. Some additional information I have found: The code compiles
and generated correctly with Java 1.5 and Jaxb 2.1.8 with source="1.0". I
think the problem is Java 1.6. I am using JDK 1.6.0_07 which comes with
Jaxb 2.1.3 albeit with class packages renamed. Was the XJCTask class
package renamed in that JDK? I am guessing not because I saw a mail message
in the archive from Kohsuke that the problem I am experiencing was a bug in
2.1.3. Is there any way to force the JDK to use the XJCTask instance from
the classpath and not the JDK itself?
Thanks,
Phil
_____
From: Wolfgang Laun [mailto:wolfgang.laun_at_gmail.com]
Sent: Friday, September 12, 2008 4:16 AM
To: users_at_jaxb.dev.java.net
Subject: Re: JAXB 2.1.8 XJCTask issue with source="1.0"
Is the jaxb1-impl.jar that comes with JAXB 2.x in your classpath?
-W
On Fri, Sep 12, 2008 at 3:10 AM, Philip A. Culver
<pculver_at_bostonatlantic.net> wrote:
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