Menu

#181 using system classloader to access resources

Release 2.0.1
open
nobody
5
2004-07-07
2004-07-07
No

I am attempting to use MX4J in JBoss and the
HTTPAdaptor cannot find its xsl files. The jboss
console displays the following error...

16:04:43,372 INFO [STDOUT] Exception during http request
16:04:43,372 INFO [STDOUT]
mx4j.tools.adaptor.http.HttpException:
Path /favicon.ico not found
16:04:43,372 INFO [STDOUT] at
mx4j.tools.adaptor.http.DefaultProcessor.notFoundElement(DefaultP
rocessor.java:91)
16:04:43,372 INFO [STDOUT] at
mx4j.tools.adaptor.http.HttpAdaptor.findUnknownElement(HttpAdapto
r.java:804)
16:04:43,372 INFO [STDOUT] at
mx4j.tools.adaptor.http.HttpAdaptor$HttpClient.run(HttpAdaptor.ja
va:975)

And you only get xml displayed in the browser.
Instead of using the system classloader it should
instead call the following in the constructor of class
XSLTProcessor...

targetClassLoader = this.getClass().getClassLoader();

This will then use the classloader specific to the
application that loaded the MX4J classes.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB