Hi,
I am getting following error when i am compiling xsd using xjs in JAXB.
parsing a schema...
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.commons.launcher.ChildMain.run(ChildMain.java:269)
Caused by: java.lang.NoClassDefFoundError: com/sun/xml/util/XmlChars
at com.sun.tools.xjc.reader.internalizer.WhitespaceStripper.processPendi
ngText(WhitespaceStripper.java:91)
at com.sun.tools.xjc.reader.internalizer.WhitespaceStripper.startElement
(WhitespaceStripper.java:72)
at org.xml.sax.helpers.XMLFilterImpl.startElement(Unknown Source)
at com.sun.tools.xjc.reader.internalizer.VersionChecker.startElement(Ver
sionChecker.java:54)
at org.xml.sax.helpers.XMLFilterImpl.startElement(Unknown Source)
at com.sun.tools.xjc.reader.internalizer.AbstractReferenceFinderImpl.sta
rtElement(AbstractReferenceFinderImpl.java:49)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startEle
ment(AbstractSAXParser.java:485)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scan
StartElement(XMLNSDocumentScannerImpl.java:326)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImp
l$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1563)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImp
l.scanDocument(XMLDocumentFragmentScannerImpl.java:341)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(X
ML11Configuration.java:828)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(X
ML11Configuration.java:758)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.
java:148)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Ab
stractSAXParser.java:1178)
at org.xml.sax.helpers.XMLFilterImpl.parse(Unknown Source)
at org.xml.sax.helpers.XMLFilterImpl.parse(Unknown Source)
at org.xml.sax.helpers.XMLFilterImpl.parse(Unknown Source)
at com.sun.tools.xjc.reader.internalizer.DOMForest.parse(DOMForest.java:
173)
at com.sun.tools.xjc.reader.internalizer.DOMForest.parse(DOMForest.java:
125)
at com.sun.tools.xjc.GrammarLoader.buildDOMForest(GrammarLoader.java:291
)
at com.sun.tools.xjc.GrammarLoader.loadXMLSchema(GrammarLoader.java:356)
at com.sun.tools.xjc.GrammarLoader.load(GrammarLoader.java:127)
at com.sun.tools.xjc.GrammarLoader.load(GrammarLoader.java:76)
at com.sun.tools.xjc.Driver.run(Driver.java:181)
at com.sun.tools.xjc.Driver._main(Driver.java:80)
at com.sun.tools.xjc.Driver.access$000(Driver.java:46)
at com.sun.tools.xjc.Driver$1.run(Driver.java:60)
can anybody tell me what is then problem. Let me tell you i have kept all the jar files in the classpath.
Thanks in advance
Regards
Chintan
-
xjc compilation error in JAXB (4 messages)
- Posted by: chintan Parekh
- Posted on: June 16 2005 06:27 EDT
Threaded Messages (4)
- Check the error message by Sowmya Sridhar on June 17 2005 11:07 EDT
- xjc compilation error in JAXB by chintan Parekh on June 21 2005 08:19 EDT
-
xjc compilation error in JAXB (Solution) by Java Developer on October 18 2005 08:57 EDT
- xjc compilation error in JAXB (Solution) by chintan Parekh on December 30 2005 03:41 EST
-
xjc compilation error in JAXB (Solution) by Java Developer on October 18 2005 08:57 EDT
- xjc compilation error in JAXB by chintan Parekh on June 21 2005 08:19 EDT
-
Check the error message[ Go to top ]
- Posted by: Sowmya Sridhar
- Posted on: June 17 2005 11:07 EDT
- in response to chintan Parekh
java.lang.NoClassDefFoundError: com/sun/xml/util/XmlChars
There are some jars you need from jaxb/jaxp and common libraries. I presume u are using the java web service developer pack.
Just including all jars from jaxb alone will not help! -
xjc compilation error in JAXB[ Go to top ]
- Posted by: chintan Parekh
- Posted on: June 21 2005 08:19 EDT
- in response to Sowmya Sridhar
Hi Sowmya,
I am using latest web service dev. pack (1.5) and i have included all jar files. com/sun/xml/util/XmlChars class resides in xsdlib.jar which I kept in the classpath but still I am facing error.
In between I have also downloaded new xsdllib.jar file but still same problem
Regards
Chintan -
xjc compilation error in JAXB (Solution)[ Go to top ]
- Posted by: Java Developer
- Posted on: October 18 2005 08:57 EDT
- in response to chintan Parekh
Copy jwsdp-shared\lib\xsdlib.jar and jwsdp-shared\lib\relaxngDatatype.jar to jaxp\lib\endorsed directory
Make sure you use this in your xjc command -Djava.endorsed.dirs=%JAXP_LIB%;%JAXP_LIB%\endorsed -
xjc compilation error in JAXB (Solution)[ Go to top ]
- Posted by: chintan Parekh
- Posted on: December 30 2005 03:41 EST
- in response to Java Developer
I tried the way you suggested but i m getting
Caused by: java.lang.IllegalArgumentException
Can you please guide me what to do ?
Thanks
Chintan