in urlset class it does:
private static List<URL> getUrls(ClassLoader classLoader) throws
IOException {
List<URL> list = new ArrayList<URL>();
ArrayList<URL> urls =
Collections.list(classLoader.getResources("META-INF"));
for (URL url : urls) {
String externalForm = url.toExternalForm();
int i = externalForm.lastIndexOf("META-INF");
externalForm = externalForm.substring(0, i);
url = new URL(externalForm);
list.add(url);
}
list.addAll(Collections.list(classLoader.getResources("")));
return list;
}
so all jar containing META-INF will be added twice no? did i read too fast?
- Romain
2012/1/31 Romain Manni-Bucau <[email protected]>
> here i got the app classloader. Is it the same for you?
>
> - Romain
>
>
>
> 2012/1/31 AndyG <[email protected]>
>
>> I am getting pretty close to the cause in
>> DeploymentsResolver.loadFromClasspath
>>
>> UrlSet urlSet = new UrlSet(classLoader); <-- Contains duplicate urls.
>>
>> ...filter etc.
>>
>> Still contains duplicate urls with different drive letters after all
>> filters
>> have been applied.
>>
>> [62] = {java.util.HashMap$Entry@4579}
>> jar:file:/D:/OrproVisionServer/openejb/lib/ehcache-core-2.4.6.jar!/ ->
>> jar:file:/D:/OrproVisionServer/openejb/lib/ehcache-core-2.4.6.jar!/
>> [63] = {java.util.HashMap$Entry@4570}
>> jar:file:/d:/OrproVisionServer/openejb/lib/ehcache-core-2.4.6.jar!/ ->
>> jar:file:/d:/OrproVisionServer/openejb/lib/ehcache-core-2.4.6.jar!/
>>
>> So duplicate modules are discovered in duplicate jars.
>> Now no idea why UrlSet would get duplicate urls in the first place? - The
>> supplied classloader definitely looks fine to me!
>>
>> The simple solution is to filter out duplicate urls in the urlSet.
>> Probably
>> in a platform specific manner.
>>
>> --
>> View this message in context:
>> http://openejb.979440.n4.nabble.com/Trunk-classloading-is-broken-with-case-sensitive-paths-tp4344116p4344892.html
>> Sent from the OpenEJB Dev mailing list archive at Nabble.com.
>>
>
>