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
When my test app calls getResource("META-INF/someResource.txt") on the web app's classloader, it fails to find anything - even though the file exists in a JAR file in the WEB-INF/lib directory. When I search for the same resource using getResources, the returned set of URLs includes the URL to the resource in the WEB-INF/lib JAR file.
Expected Behaviour
The getResource method should search JAR files in the WEB-INF/lib directory after searching the WEB-INF/classes directory.
Current Behaviour
The getResource method only searches the WEB-INF/classes directory.
Steps To Reproduce
Deploy a WAR file that contains a WEB-INF/lib JAR file that contains a text files called META-INF/someResource.txt.
From another test case, obtain the WAR's classloader and invoke loader.getResources("META-INF/someResource.txt") - this will return an Enumeration with a URL to the resource - all good so far.
From another test case, obtain the WAR's classloader and invoke loader.getResource("META-INF/someResource.txt") - this will fail.
Unlike the getResources method, this method just adjusts the name for searching the WEB-INF/classes directory and then delegates to the super class. I think it should follow the same pattern as getResources and search the JAR files in the WEB-INF/lib directory.
The text was updated successfully, but these errors were encountered:
Issue Overview
When my test app calls
getResource("META-INF/someResource.txt")
on the web app's classloader, it fails to find anything - even though the file exists in a JAR file in the WEB-INF/lib directory. When I search for the same resource usinggetResources
, the returned set of URLs includes the URL to the resource in the WEB-INF/lib JAR file.Expected Behaviour
The
getResource
method should search JAR files in the WEB-INF/lib directory after searching the WEB-INF/classes directory.Current Behaviour
The
getResource
method only searches the WEB-INF/classes directory.Steps To Reproduce
loader.getResources("META-INF/someResource.txt")
- this will return an Enumeration with a URL to the resource - all good so far.loader.getResource("META-INF/someResource.txt")
- this will fail.Additional Information
I think the problem is here:
arquillian-container-weld/impl/src/main/java/org/jboss/arquillian/container/weld/embedded/WebArchiveClassLoader.java
Line 74 in 96b67cb
Unlike the
getResources
method, this method just adjusts the name for searching the WEB-INF/classes directory and then delegates to the super class. I think it should follow the same pattern asgetResources
and search the JAR files in the WEB-INF/lib directory.The text was updated successfully, but these errors were encountered: