NullPointerException in XSLTProcessor and JDK1.5
Luc Vidal <[email protected]>
| Newsgroups | gmane.comp.java.mx4j.devel |
|---|---|
| Message-ID | <[email protected]> |
Hello,
I get NPE within XSLTProcessor :
javax.management.RuntimeMBeanException: RuntimeException thrown in operation writeResponse
at com.sun.jmx.mbeanserver.StandardMetaDataImpl.wrapRuntimeException(StandardMetaDataImpl.java:994)
at com.sun.jmx.mbeanserver.StandardMetaDataImpl.invoke(StandardMetaDataImpl.java:430)
at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:220)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:815)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:784)
at mx4j.tools.adaptor.http.HttpAdaptor.postProcess(HttpAdaptor.java:752)
at mx4j.tools.adaptor.http.HttpAdaptor$HttpClient.run(HttpAdaptor.java:981)
Caused by: java.lang.NullPointerException
at mx4j.tools.adaptor.http.XSLTProcessor.getInputStream(XSLTProcessor.java:363)
at mx4j.tools.adaptor.http.XSLTProcessor.createTransformer(XSLTProcessor.java:176)
at mx4j.tools.adaptor.http.XSLTProcessor.writeResponse(XSLTProcessor.java:115)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.sun.jmx.mbeanserver.StandardMetaDataImpl.invoke(StandardMetaDataImpl.java:414)
... 5 more
I got the sources, it seems there is a bug in XSLTProcessor.java line 354 to 363 :
ClassLoader cl = getClass().getClassLoader();
if (cl == null)
{
file = ClassLoader.getSystemClassLoader().getResourceAsStream(targetFile);
}
else
{
file = getClass().getClassLoader().getResourceAsStream(targetFile);
}
file = getClass().getClassLoader().getResourceAsStream(targetFile);
The last line should not be there, isn't it ?
Regards
Luc VIDAL
-------------------------------------------------------
SF.Net email is sponsored by: Tell us your software development plans!
Take this survey and enter to win a one-year sub to SourceForge.net
Plus IDC's 2005 look-ahead and a copy of this survey
Click here to start! http://www.idcswdc.com/cgi-bin/survey?id=105hix