You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by bu...@apache.org on 2002/04/16 02:49:32 UTC
DO NOT REPLY [Bug 8139] New: -
Can't use translets with custom ClassLoader
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8139>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8139
Can't use translets with custom ClassLoader
Summary: Can't use translets with custom ClassLoader
Product: XalanJ2
Version: CurrentCVS
Platform: All
OS/Version: All
Status: NEW
Severity: Major
Priority: Other
Component: org.apache.xalan.xsltc
AssignedTo: xalan-dev@xml.apache.org
ReportedBy: ms53@inf.tu-dresden.de
If translets are instantiated using a custom ClassLoader (one that is different
from the bootstrap ClassLoader) transformations fail with a
java.lang.ClassNotFoundException. Inner classes of the translet class are not
found. The reason for that is that the compiled translets do not use the custom
ClassLoader to instantiate classes like
org.apache.xalan.xsltc.dom.NodeSortRecordFactory. This appears e.g. when using
a <xsl:sort> instruction.
The result of :
myTranslet.getClass().getClassLoader()
should be the same as gained when executing
this.getClass().getClassLoader() inside of NodeSortRecordFactory.loadTranslet
(String)
but it isn't. The first call returns the custom ClassLoader, but the second
returns the bootstrap ClassLoader.
Is class loading handled different for the NodeSortRecordFactory? I've been
using the custom ClassLoader for a while and it works fine instead if the
<xsl:sort> instruction is used in stylesheets.