Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Jaxb java.lang.NoSuchMethodError com.sun.xml.bind.util.AttributesImpl.getIndexFast

Reply
Thread Tools

Jaxb java.lang.NoSuchMethodError com.sun.xml.bind.util.AttributesImpl.getIndexFast

 
 
Anna
Guest
Posts: n/a
 
      06-04-2006
I am trying to use JAXB to unmarshall and marshall xml documents. I've
written a simple test class with a main method that I'm executing via
eclipse which takes an xml file from my c drive and unmarshalls the
data. Everything works great.

I'm now taking the same code and implementing it within an application
I'm developing. The application server I'm using is ATG.

I have added the following classes from the java web services developer
pack to my classpath

JAXB jar files -- jaxb-api.jar, jaxb-xjc.jar, jaxb-impl.jar,
jaxb-libs.jar
JAXP jar files -- jaxp-api.jar, sax.jar, dom.jar, xercesImpl.jar,
xalan.jar,
jwsdp-1.5/jwsdp-shared/lib -- jax-qname.jar, namespace.jar, xsdlib.jar,
relaxngDatatype.jar

When running my application I keep getting the following error.
java.lang.NoSuchMethodError:
com.sun.xml.bind.util.AttributesImpl.getIndexFast( Ljava/lang/String;Ljava/lang/String

I know the class AttributesImpl exists within jaxb-impl.jar. i also
know the method getIndexFast exists because I can call it within a test
java class. I've also modified my classpath to make sure that
jaxb-impl.jar is the first jar in the classpath. I did this to make
sure that if the class exists anywhere else its called from this jar.

I hav eno idea why i'm getting this error. Any thoughts from anyone
would be greatly appreciated. I've pasted the complete stack trace
below.


javax.servlet.ServletException:
com.sun.xml.bind.util.AttributesImpl.getIndexFast( Ljava/lang/String;Ljava/lang/StringI
at
atg.servlet.container.WebApplication.dispatchServl etException(WebApplication.java:1072)
at
atg.servlet.container.WebApplication.dispatchReque st(WebApplication.java:831)
at
atg.servlet.container.WebApplication.dispatchReque st(WebApplication.java:626)
at
atg.servlet.pipeline.WebApplicationDispatcherPipel ineServlet.service(WebApplicationDispatcherPipelin eServlet.java:69)
at
atg.servlet.pipeline.PipelineableServletImpl.passR equest(PipelineableServletImpl.java:116)
at
atg.servlet.security.ThreadUserBinderServlet.servi ce(ThreadUserBinderServlet.java:91)
at
atg.servlet.pipeline.PipelineableServletImpl.passR equest(PipelineableServletImpl.java:116)
at
atg.servlet.security.FormLoginPipelineServlet.serv ice(FormLoginPipelineServlet.java:159)
at
atg.servlet.pipeline.PipelineableServletImpl.passR equest(PipelineableServletImpl.java:116)
.....stack trace CROPPED after 10 lines.

Caused by :java.lang.NoSuchMethodError:
com.sun.xml.bind.util.AttributesImpl.getIndexFast( Ljava/lang/String;Ljava/lang/StringI
at
com.ota.OTA_CancelRQ.impl.runtime.SAXUnmarshallerH andlerImpl.getAttribute(SAXUnmarshallerHandlerImpl .java:455)
at
com.ota.OTA_CancelRQ.impl.OTACancelRQImpl$Unmarsha ller.enterElement(OTACancelRQImpl.java:244)
at
com.ota.OTA_CancelRQ.impl.runtime.SAXUnmarshallerH andlerImpl.startElement(SAXUnmarshallerHandlerImpl .java:125)
at
org.xml.sax.helpers.XMLFilterImpl.startElement(XML FilterImpl.java:575)
at
com.sun.xml.bind.unmarshaller.InterningXMLReader.s tartElement(InterningXMLReader.java:74)
at
org.apache.xerces.parsers.SAXParser.startElement(S AXParser.java:1376)
at
org.apache.xerces.validators.common.XMLValidator.c allStartElement(XMLValidator.java:1284)
at
org.apache.xerces.framework.XMLDocumentScanner.sca nElement(XMLDocumentScanner.java:1806)
at
org.apache.xerces.framework.XMLDocumentScanner$Con tentDispatcher.dispatch(XMLDocumentScanner.java:11 82)
.....stack trace CROPPED after 10 lines.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
JAXB generates incorrect xml content!!! Marcello Marangio Java 4 10-23-2003 03:04 PM
JAXB creating Nested Interface from XSD Definition Brett Selleck Java 0 09-03-2003 07:16 PM
XML to java using JAXB ? Petterson Mikael Java 0 09-02-2003 01:50 PM
JAXB and Arabic encoding Brahim Machkour Java 3 07-27-2003 03:21 AM
JAXB, XSLT comparison Sony Antony Java 1 07-18-2003 05:57 AM



Advertisments