For others who might be looking for the same thing ...
I found a jar with the StAX interfaces (jsr173_1.0_api.jar)
at this URL - https://sjsxp.dev.java.net/


From: Michael Kay [mailto:mike@saxonica.com]
Sent: Monday, December 15, 2008 1:22 PM
To: 'Mailing list for the SAXON XSLT and XQuery processor'
Subject: Re: [saxon] XQuery jdk1.5 XMLStreamReader

The dependency probably arises because you're calling a method that calls a method that on one of its branches has a reference to XMLStreamReader. For example, StandardObjectConverter.convertToItem(). I should probably try to get rid of the dependency, but in the meantime, you will have to make sure that the Stax interfaces are on your classpath. You don't actually need a Stax parser, just the interface definitions.
 
I agree there's no particular benefit in using Stax interfaces for parsing, but XQJ offers Stax parsing as an option for those who want it.
 
Michael Kay
http://www.saxonica.com/


From: Copeland, Paul [mailto:pcopeland@ebay.com]
Sent: 15 December 2008 21:04
To: saxon-help@lists.sourceforge.net
Subject: [saxon] XQuery jdk1.5 XMLStreamReader

Hi - I'm just starting with saxon on a project that is going to invoke XQuery via XQJ in java programs.
 
My first go at this encounters this exception -
 
      java.lang.NoClassDefFoundError: javax.xml.stream.XMLStreamReader
 
This happens on an XExpression.bindString (...) call.
 
I see in the install instructions that I should expect saxon to work with Java 1.5.  I also see in archives of this list some discussion that Stax is bundled with Java 1.6 so you need to get another jar (woodstox preferably?) to use Stax before Java 1.6. Further there is some discussion doubting that Stax is much advantage over SAX for this application.  I did not do anything to request use of Stax.
 
Is Stax required for XQuery?  What should I do to resolve this exception?
 
Thanks - Paul Copeland