You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Great work on this. I'm using it to create an isolated container for running scheduled tasks.
However, I found an issue when using the JarClassLoader to load a spring configuration file.
During the rather convoluted jaxp/xerces validation sequence that occurs at one point the xerces code attempts to load a configuration setting which may or may not exist 'META-INF/services/org.apache.xerces.xni.parser.XMLParserConfiguration'.
The calling xerces code is not expecting an exception to be thrown if the resource does not exist rather it is simply checking for a null value to be returned. Due to the exception the whole sequence fails etc.
I was able to get around it by subclassing the JarClassLoader and simply overriding the getResourceAsStream method to swallow the exception and throw null. But it took some time to figure out this is what was causing the issue.
You may want to consider not throwing the exception so it is more consistent with the standard ClassLoader.( The current java 6 ClassLoader also does not throw an exception but simply returns null).
Thanks.
The text was updated successfully, but these errors were encountered:
Great work on this. I'm using it to create an isolated container for running scheduled tasks.
However, I found an issue when using the JarClassLoader to load a spring configuration file.
During the rather convoluted jaxp/xerces validation sequence that occurs at one point the xerces code attempts to load a configuration setting which may or may not exist 'META-INF/services/org.apache.xerces.xni.parser.XMLParserConfiguration'.
The calling xerces code is not expecting an exception to be thrown if the resource does not exist rather it is simply checking for a null value to be returned. Due to the exception the whole sequence fails etc.
I was able to get around it by subclassing the JarClassLoader and simply overriding the getResourceAsStream method to swallow the exception and throw null. But it took some time to figure out this is what was causing the issue.
You may want to consider not throwing the exception so it is more consistent with the standard ClassLoader.( The current java 6 ClassLoader also does not throw an exception but simply returns null).
Thanks.
The text was updated successfully, but these errors were encountered: