weird tomcat5.0.30 behaviour with jar in WEB-INF/classes

2004-12-01 Thread Simone Pierazzini
Hi, I use URLClassLoader to create class loaders that manage jars in WEB-INF/classes In WEB-INF/classes I have many jars that are incompatible each other (they have different classes with the same name inside). Suppose I want to load the following files as resources from a classLoader: -

RE: weird tomcat5.0.30 behaviour with jar in WEB-INF/classes

2004-12-01 Thread Shapira, Yoav
Hi, I use URLClassLoader to create class loaders that manage jars in WEB- INF/classes In WEB-INF/classes I have many jars that are incompatible each other (they have different classes with the same name inside). I comment on the actual problem below, but if you don't mind me asking: why? This

Re: weird tomcat5.0.30 behaviour with jar in WEB-INF/classes

2004-12-01 Thread Wade Chandler
Simone Pierazzini wrote: Hi, I use URLClassLoader to create class loaders that manage jars in WEB-INF/classes In WEB-INF/classes I have many jars that are incompatible each other (they have different classes with the same name inside). Suppose I want to load the following files as resources from a

Re: weird tomcat5.0.30 behaviour with jar in WEB-INF/classes

2004-12-01 Thread Simone Pierazzini
On Wed, 1 Dec 2004 09:47:12 -0500, Shapira, Yoav [EMAIL PROTECTED] wrote: Hi, I use URLClassLoader to create class loaders that manage jars in WEB- INF/classes In WEB-INF/classes I have many jars that are incompatible each other (they have different classes with the same name inside).

RE: weird tomcat5.0.30 behaviour with jar in WEB-INF/classes

2004-12-01 Thread Shapira, Yoav
Hi, yes, I know, but I've to use those jars, and I didn't developed them :( OK ;) Unfortunate, but that happens... it should be but it isn't because tomcat does not make a copy, and the returned url is unresolvable. So you're saying the jar in $CATALINA_HOME/work is physically different than

Re: weird tomcat5.0.30 behaviour with jar in WEB-INF/classes

2004-12-01 Thread Simone Pierazzini
On Wed, 01 Dec 2004 09:49:33 -0500, Wade Chandler [EMAIL PROTECTED] wrote: I never try to use relative paths in getResource. I always do this getResource(/pippo.jar); Also, I usually pick a class in my package that I know will certainly be in my web-app classes folder or one of it's jars.

RE: weird tomcat5.0.30 behaviour with jar in WEB-INF/classes

2004-12-01 Thread Cox, Charlie
-Original Message- From: Simone Pierazzini [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 01, 2004 9:37 AM To: [EMAIL PROTECTED] Subject: weird tomcat5.0.30 behaviour with jar in WEB-INF/classes Hi, I use URLClassLoader to create class loaders that manage jars in WEB- INF

Re: weird tomcat5.0.30 behaviour with jar in WEB-INF/classes

2004-12-01 Thread Simone Pierazzini
On Wed, 1 Dec 2004 10:11:49 -0500, Shapira, Yoav [EMAIL PROTECTED] wrote: Hi, it should be but it isn't because tomcat does not make a copy, and the returned url is unresolvable. So you're saying the jar in $CATALINA_HOME/work is physically different than the one in your WEB-INF/lib

Re: weird tomcat5.0.30 behaviour with jar in WEB-INF/classes

2004-12-01 Thread Simone Pierazzini
Hi, I use URLClassLoader to create class loaders that manage jars in WEB- INF/classes In WEB-INF/classes I have many jars that are incompatible each other (they have different classes with the same name inside). Wouldn't it be much easier to unjar and re-jar with only the classes

RE: weird tomcat5.0.30 behaviour with jar in WEB-INF/classes

2004-12-01 Thread Shapira, Yoav
Hi, yes... and no. when you ask for non-jar resources, the returned url points to the correct path (inside context directory, and tomcat doens't need to copy them). When you ask for jar resources, the returned url points to a directory inside $CATALINA_HOME/work, but Tomcat does not copy

Re: weird tomcat5.0.30 behaviour with jar in WEB-INF/classes

2004-12-01 Thread Wade Chandler
Simone Pierazzini wrote: On Wed, 01 Dec 2004 09:49:33 -0500, Wade Chandler [EMAIL PROTECTED] wrote: I never try to use relative paths in getResource. I always do this getResource(/pippo.jar); Also, I usually pick a class in my package that I know will certainly be in my web-app classes folder

Re: weird tomcat5.0.30 behaviour with jar in WEB-INF/classes

2004-12-01 Thread Simone Pierazzini
Right, thought you were creating your own URLClassLoader instance to locate your jars dynamically (not getting the current). Barring that and looking at your post and then looking at one of Yoavs, then my guess is the ClassLoader in tomcat is for what ever reason doing something like: if(

RE: weird tomcat5.0.30 behaviour with jar in WEB-INF/classes

2004-12-01 Thread Shapira, Yoav
Hi, regardless of the directory being lib or classesseems like a bug to me as any file in the classpath should just be a file as a jar file should have to be added to the classpath like it's a directory. I agree That's overly simplified. Unlike the classpath for a normal console

Re: weird tomcat5.0.30 behaviour with jar in WEB-INF/classes

2004-12-01 Thread Simone Pierazzini
On Wed, 1 Dec 2004 11:27:01 -0500, Shapira, Yoav [EMAIL PROTECTED] wrote: Hi, regardless of the directory being lib or classesseems like a bug to me as any file in the classpath should just be a file as a jar file should have to be added to the classpath like it's a directory. I