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 2003/07/03 15:40:34 UTC
DO NOT REPLY [Bug 21309] New: -
NullPointerException in CacheHandler
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=21309>.
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=21309
NullPointerException in CacheHandler
Summary: NullPointerException in CacheHandler
Product: XalanJ2
Version: 2.5
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: Other
Component: Xalan
AssignedTo: xalan-dev@xml.apache.org
ReportedBy: mstephenson@openworld.co.uk
Hi,
I'm sorry I'm not quite sure what was going on to cause this, but the (nested)
exception I recieved was:
java.lang.NullPointerException
at java.util.Hashtable.put(Hashtable.java:380)
at org.apache.xml.serializer.Utils.ClassForName(Utils.java:110)
at
org.apache.xml.serializer.SerializerFactory.getSerializer(SerializerFactory.java:127)
at
org.apache.xalan.transformer.TransformerIdentityImpl.createResultContentHandler(TransformerIdentityImpl.java:250)
at
org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:314)
[snip non xalan related stack trace]
The problem is the line:
CacheHolder.cache.put(classname, null);
cache is a Hashtable and Hashtable's cannot contain null values.
Some parts of xalan (in particular xsltc) seem to use jdk1.2 features, so it can
probably be replaced with a synchronized HashMap.
If you can't use jdk1.2 features then you can only improve the performance of
xalan by not caching unfindable classes.
Thanks for your time.