Hi,
we're very keen to see the improved Schema validation
and of course the performance enhancements, but it looks
like all Xerces 1.4.x's seem to share a common classloader
problem when used from within the local WEB-INF/lib
in a web application. Simply using Xerces as a parser
in conjunctions with SAXON under Resin I end up with
this Exception
java.lang.AbstractMethodError
at
com.icl.saxon.TransformerFactoryImpl.getStyleParser(TransformerFactoryImpl.j
ava:500)
at
com.icl.saxon.TransformerFactoryImpl.getSAXSource(TransformerFactoryImpl.jav
a:184)
at
com.icl.saxon.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.jav
a:124)
at
de.coi.xml.xslt.FileTransformerPool$TransformerPool.obtainTemplates(FileTran
sformerPool.java:335)
at
de.coi.xml.xslt.FileTransformerPool$TransformerPool.<init>(FileTransformerPo
ol.java:286)
at
de.coi.xml.xslt.FileTransformerPool.getBusy(FileTransformerPool.java:108)
at
de.coi.xml.xslt.FileTransformerPool.get(FileTransformerPool.java:82)
at de.coi.servlet.XMLServlet.getLastModified(XMLServlet.java:549)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:100)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:83)
at com.caucho.server.http.Invocation.service(Invocation.java:325)
at
com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:121)
at
com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:239)
at
com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:157)
at com.caucho.server.TcpConnection.run(TcpConnection.java:140)
at java.lang.Thread.run(Thread.java:484)
This does however not happen when I use Xerces 1.3.1 (by
simply replacing the jar) and leave everything else as it was.
I figure this might have something
to do with the way how objects are created. In a servlet container
one should use the the context classloader, but unfortunately to
be JDK1.1 compatible one has to fall back to Class.newInstance()
in case there is no context classloader.
Class clazz = null;
try {
ClassLoader loader =
Thread.currentThread().getContextClassLoader();
clazz = Class.forName(className, false, loader);
} catch (MethodNotFoundException ignore) { }
if (clazz == null)
clazz = Class.forName(className);
Unfortunately this kind of code has to be compiled by a JDK1.2
but afterwards runs under JDK1.1. I have no idea about performance
in various environments.
Is this problem resolvable?
Frank
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]