I have an application that tries to load a resource on a given Jar, by the following way:
getClass().getClassLoader().getResourceAsStream("Resources/someresource.xml");
When working with an instrumented version of the Jar by Cobertura, null is returned.
When Working with the the un-instrumented version of the same Jar, the resource stream returned as requested.
Can someone help?
Well, I didn’t find the cause of this, but ignoring the resource file on instrumentation did help. Actually, because I’m working with Jetty – I copied “Resources/someresource.xml” under the /class directory of the WEB-INF and it worked.