>>You say that you're "packaging" Saxon, and from the evidence you've given
me so far,
I would say that you've packaged it incorrectly.<<
Poor choice of words. All I meant to say is I put the saxon jar with my
database jars in the WEB-INF/lib folder and the database jars are getting
found properly. Eclipse generates and publishes a war for me. This is how
I've successfully run saxon in (several) earlier versions of eclipse.
Fortunately I can reliably reproduce the problem and can catch the exception
at runtime using an eclipse debugger.
Here is part of the stack trace when ClassNotFoundException is thrown:
Launcher$ExtClassLoader(ClassLoader).findBootstrapClass0(String) line: 891
Launcher$ExtClassLoader(ClassLoader).loadClass(String, boolean) line: 301
Launcher$AppClassLoader(ClassLoader).loadClass(String, boolean) line: 299
Launcher$AppClassLoader.loadClass(String, boolean) line: 276
Launcher$AppClassLoader(ClassLoader).loadClass(String) line: 251
WebappClassLoader.loadClass(String, boolean) line: 1275
WebappClassLoader.loadClass(String) line: 1206
WebappClassLoader(ClassLoader).loadClassInternal(String) line: 319
GcStatusUtils.readStatus(String, String, Document, UserRequest) line: 141
GcStatusUtils.readStatus() is my class and has the following code - this is
where the debugger is positioned for a call to WebappClassLoader with a
param of "net.sf.saxon.s9api.SaxonApiException".
Node statusNode = XpathXsltUtils.xpathToFirstNode(
name,
gcdoc.getDocumentElement(),
null,
logger);
The method xpathToFirstNode() does not explicitly reference
SaxonApiException, but SaxonApiException is referenced within an internal
method and is in the class imports.
Note that if I use intellisense to locate a class in the source code editor
net.sf.saxon is not available.
Interestingly, if I inspect the WebappClassLoader instance it does contain a
reference to the saxon jar, as part of a list of all jars in the jarPath
"/WEB-INF/lib". Although I can't confirm it in the debugger, the class
loader appears to be a tomcat class:
http://tomcat.apache.org/tomcat-6.0-doc/api/org/apache/catalina/loader/WebappClassLoader.html
This is from the inspector:
this WebappClassLoader (id=76)
acc AccessControlContext (id=3281)
allPermission AllPermission (id=3282)
antiJARLocking false
classAssertionStatus null
classes Vector<E> (id=3285)
defaultAssertionStatus false
defaultDomain null
delegate false
domains HashSet<E> (id=3292)
files File[1] (id=3293)
hasExternalRepositories false
initialized true
initialized true
jarFiles JarFile[53] (id=3295)
jarNames String[53] (id=3300)
jarPath "/WEB-INF/lib" (id=3301)
jarRealFiles File[53] (id=3302)
lastJarAccessed 1283144670478
lastModifiedDates (id=3361)
loaderDir File (id=3362)
loaderPC HashMap<K,V> (id=3363)
nativeLibraries Vector<E> (id=3364)
needConvert false
nocerts Certificate[0] (id=3365)
notFoundResources HashMap<K,V> (id=3367)
package2certs Hashtable<K,V> (id=3369)
packageAssertionStatus null
packages HashMap<K,V> (id=3370)
parent StandardClassLoader (id=77)
parent StandardClassLoader (id=77)
paths String[54] (id=3373)
pdcache HashMap<K,V> (id=3374)
permissionList ArrayList<E> (id=3375)
repositories String[1] (id=3376)
repositoryURLs URL[54] (id=3377)
resourceEntries HashMap<K,V> (id=3378)
resources ProxyDirContext (id=3379)
securityManager null
started true
system Launcher$AppClassLoader (id=3267)
ucp URLClassPath (id=3382)
arg0 "net.sf.saxon.s9api.SaxonApiException" (id=3273)
At position 44 of jarRealFiles there is a File instance that looks ok like
all the others, which has a path of
"/env/tomcat/webapps/BCW/WEB-INF/lib/saxon9he.jar.jar"
Also interesting is the notFoundResources field, which has 60 entries, b/c
one is for saxon. Here is a copy of all the keys in that map:
{com/sun/org/apache/xml/internal/serializer/Encodings.properties=com/sun/org/apache/xml/internal/serializer/Encodings.properties,
org/apache/derby/loc/m25_en_US.properties=org/apache/derby/loc/m25_en_US.properties,
org/apache/derby/loc/m16_en_US.properties=org/apache/derby/loc/m16_en_US.properties,
org.apache.log4j.LayoutBeanInfo=org.apache.log4j.LayoutBeanInfo,
org/apache/derby/loc/m2.properties=org/apache/derby/loc/m2.properties,
org.apache.derby.loc.m22_en_US=org.apache.derby.loc.m22_en_US,
org/apache/derby/loc/m22_en_US.properties=org/apache/derby/loc/m22_en_US.properties,
net.sf.saxon.s9api.SaxonApiException=net.sf.saxon.s9api.SaxonApiException,
org.apache.derby.loc.m25_en_US=org.apache.derby.loc.m25_en_US,
org.apache.derby.loc.m16_en_US=org.apache.derby.loc.m16_en_US,
org.apache.derby.loc.m25_en=org.apache.derby.loc.m25_en,
org.apache.derby.loc.m16=org.apache.derby.loc.m16,
org/apache/derby/loc/m26_en_US.properties=org/apache/derby/loc/m26_en_US.properties,
javax.servlet.http.HttpServletRequest=javax.servlet.http.HttpServletRequest,
org.apache.derby.loc.m18=org.apache.derby.loc.m18,
org.apache.derby.loc.m2_en=org.apache.derby.loc.m2_en,
org.apache.derby.loc.m13=org.apache.derby.loc.m13,
org/apache/derby/loc/m16.properties=org/apache/derby/loc/m16.properties,
org/apache/derby/loc/m25.properties=org/apache/derby/loc/m25.properties,
org.apache.derby.loc.m26_en=org.apache.derby.loc.m26_en,
org.apache.log4j.PatternLayoutBeanInfo=org.apache.log4j.PatternLayoutBeanInfo,
org/apache/derby/loc/m13.properties=org/apache/derby/loc/m13.properties,
org.apache.derby.loc.m2_en_US=org.apache.derby.loc.m2_en_US,
org.apache.derby.loc.m34_en=org.apache.derby.loc.m34_en,
org.apache.derby.loc.m26_en_US=org.apache.derby.loc.m26_en_US,
logging.properties=logging.properties,
org.apache.derby.loc.m2=org.apache.derby.loc.m2,
org.apache.catalina.servlets.DefaultServlet=org.apache.catalina.servlets.DefaultServlet,
org/apache/derby/loc/m34_en_US.properties=org/apache/derby/loc/m34_en_US.properties,
META-INF/services/org.apache.xerces.xni.parser.XMLParserConfiguration=META-INF/services/org.apache.xerces.xni.parser.XMLParserConfiguration,
org.apache.derby.loc.m25=org.apache.derby.loc.m25,
org.apache.derby.loc.m26=org.apache.derby.loc.m26,
org/apache/derby/loc/m22.properties=org/apache/derby/loc/m22.properties,
org/apache/derby/loc/m13_en_US.properties=org/apache/derby/loc/m13_en_US.properties,
org.apache.derby.loc.m22=org.apache.derby.loc.m22,
org.apache.jasper.servlet.JspServlet=org.apache.jasper.servlet.JspServlet,
javax.servlet.ServletException=javax.servlet.ServletException,
org.apache.derby.loc.m22_en=org.apache.derby.loc.m22_en,
javax.servlet.http.HttpServlet=javax.servlet.http.HttpServlet,
org.apache.log4j.AppenderSkeletonBeanInfo=org.apache.log4j.AppenderSkeletonBeanInfo,
org.apache.derby.loc.m34_en_US=org.apache.derby.loc.m34_en_US,
org.apache.derby.loc.m13_en=org.apache.derby.loc.m13_en,
org/apache/derby/loc/m18.properties=org/apache/derby/loc/m18.properties,
org/apache/derby/loc/m2_en_US.properties=org/apache/derby/loc/m2_en_US.properties,
org/apache/derby/loc/m18_en_US.properties=org/apache/derby/loc/m18_en_US.properties,
org.apache.derby.loc.m34=org.apache.derby.loc.m34,
javax.servlet.http.HttpSession=javax.servlet.http.HttpSession,
com.ibm.uvm.tools.DebugSupport=com.ibm.uvm.tools.DebugSupport,
org.apache.derby.loc.m16_en=org.apache.derby.loc.m16_en,
org.apache.log4j.WriterAppenderBeanInfo=org.apache.log4j.WriterAppenderBeanInfo,
org.apache.log4j.FileAppenderBeanInfo=org.apache.log4j.FileAppenderBeanInfo,
org/apache/derby/loc/m34.properties=org/apache/derby/loc/m34.properties,
META-INF/services/javax.xml.transform.TransformerFactory=META-INF/services/javax.xml.transform.TransformerFactory,
javax.servlet.http.HttpServletResponse=javax.servlet.http.HttpServletResponse,
javax.servlet.ServletInputStream=javax.servlet.ServletInputStream,
org.apache.derby.loc.m18_en_US=org.apache.derby.loc.m18_en_US,
org/apache/derby/loc/m26.properties=org/apache/derby/loc/m26.properties,
META-INF/services/com.sun.org.apache.xalan.internal.xsltc.dom.XSLTCDTMManager=META-INF/services/com.sun.org.apache.xalan.internal.xsltc.dom.XSLTCDTMManager,
org.apache.derby.loc.m18_en=org.apache.derby.loc.m18_en,
org.apache.derby.loc.m13_en_US=org.apache.derby.loc.m13_en_US}
Can you think of anything else I can test?
--
View this message in context: http://old.nabble.com/Using-saxon-with-latest-Eclipse-%28Helios%29-tp29557174p29569703.html
Sent from the saxon-help mailing list archive at Nabble.com.
|