Project

Profile

Help

NoClassDefFoundError: XMLStreamReader

Added by Anonymous over 17 years ago

Legacy ID: #4045169 Legacy Poster: Monte Hansen (monte-hansen)

I'm using Saxon-B 8.8 jars inside a container running a 1.4.2 jvm and get a java.lang.NoClassDefFoundError: javax.xml.stream.XMLStreamReader exception when attempting to bind an XQuery variable like so: XQExpression exp = connection.createExpression(); XQItemType type = connection.createAtomicItemType( XQItemType.XQITEMKIND_DOCUMENT_ELEMENT ); exp.bindNode( new QName("d"), document, type ); What dependency am I missing? Thanks in advance.


Replies (2)

RE: NoClassDefFoundError: XMLStreamReader - Added by Anonymous over 17 years ago

Legacy ID: #4045430 Legacy Poster: Michael Kay (mhkay)

XQJ has links to XMLStreamReader, which is part of the StAX pull API. It looks as if I need to document this better, or ideally to remove the dependency unless you are actually using the Stax API. To get rid of this problem you will need to install the StAX API. The easiest way of getting hold of the relevant JAR file (my version is called stax-api-1.0.jar) is probably from: http://dist.codehaus.org/stax/jars/

RE: NoClassDefFoundError: XMLStreamReader - Added by Anonymous over 17 years ago

Legacy ID: #4047276 Legacy Poster: Monte Hansen (monte-hansen)

Thanks Michael, that worked just fine. I would have known that if I worked with the SAX/StAX libraries, but I don't. Not sure how I managed that one given the amount of xml related work that I do =). Cheers, Monte

    (1-2/2)

    Please register to reply