[xquery-talk] Use Saxon Proccessor to Process XQuery (withoutexternal variables)

Michael Kay mike at saxonica.com
Mon Dec 31 18:30:28 PST 2007


> 
> java -classpath ./saxon8.jar net.sf.Query question_1_1.xquery 
> > query_1.xml Exception in thread "main" 
> java.lang.NoClassDefFoundError: net/sf/Query

I'm having trouble seeing how you can read this error message and fail to
spot your mistake. 

java.lang.NoClassDefFoundError is the name of a Java exception class, and a
quick Google shows its meaning: "A NoClassDefFoundError is thrown when a
classloader or the Java Virtual Machine tries to load a class and no
definition of the class can be found."

So I would expect you to check that you have typed the class name correctly,
and then to spot that net.sf.Query should have been net.sf.saxon.Query.

I suspect that you're dismissing the error message as cryptic and
incomprehensible without really trying to read it and understand it. I'd
suggest you make the effort to try and understand such messages: with a bit
of practice, they will start to make sense, and you will then save us all a
lot of trouble.

This message comes from Java rather than from Saxon, incidentally, so
there's no point suggesting improved wording here.

Michael Kay
http://www.saxonica.com/



More information about the talk mailing list