kamranzafar / JCL

Jar Class Loader, a configurable and dynamic custom classloader designed to create, manage and manipulate isolated Java classloaders in IoC frameworks and web applications.
http://kamranzafar.github.com/
582 stars 162 forks source link

getResources() does not return all resources in all jars of a given classloader #59

Open jpbelang opened 6 years ago

jpbelang commented 6 years ago

I'm using JCL in a simple manner, I think. I create a classloader and add() a bunch of jars.

Some of these jars have identically named resources. From this class loader I try getResources() expecting the enumeration to find all the resources. Unfortunately, I only get the first resource.

I debugged the code and it seems that every classloader only returns one resource through findResource(), I think..

Am I doing something really wrong ?

olegsom commented 5 years ago

Same thing :( How did you solve this problem? WBR

jpbelang commented 5 years ago

We used this to simplify our classloaders for an application server (in a commercial setting). Once we got into problems with it and got no feedback, we dropped it and rolled our own (less flexible but got the job done).

Sorry.

olegsom commented 5 years ago

I didn't have an alternative loader. So I had to extend this source code myself. Thanks for the reply. WBR