-
1. Re: ClassLoaders drive me nuts!
adrian.brock Oct 17, 2002 10:22 AM (in response to javajohnson)What do you get for the following output?
If should include the url for classes' location.
System.out.println(getClass().getClassLoader());
Object o = new SecurityKeyImpl();
System.out.println(o.getClass().getClassLoader());
Regards,
Adrian -
2. Re: ClassLoaders drive me nuts!
javajohnson Oct 21, 2002 2:00 PM (in response to javajohnson)I placed the code you provided into my code and get the following: (the formatting is awful, sorry)
13:11:45,031 INFO [STDOUT] org.jboss.mx.loading.UnifiedClassLoader@7cd15d{ url=
file:/C:/jboss-3.0.3/server/default/tmp/deploy/server/default/deploy/TNTDIR.ear/Security.jar/65.Security.jar }
13:11:45,031 INFO [STDOUT] org.jboss.mx.loading.UnifiedClassLoader@7cd15d{ url=
file:/C:/jboss-3.0.3/server/default/tmp/deploy/server/default/deploy/TNTDIR.ear/Security.jar/65.Security.jar }
My file exists in Security.jar
I am doing this with an exploaded EAR file. But it shouldn't matter, right? My ear file is exploaded, but the EJB jar files are not. I only exploaded the .EAR and my .WAR files.
Thank you for any assistance.
--Mark -
3. Re: ClassLoaders drive me nuts!
javajohnson Oct 21, 2002 4:35 PM (in response to javajohnson)Hmm....
This is getting even stranger. I decided to explicitly state my classpath in the manifest file.
The printout of the ClassLoader was:
15:41:57,202 INFO [STDOUT] org.jboss.mx.loading.UnifiedClassLoader@41b635{ url=file:/C:/jboss-3.0.3/server/default/tmp/deploy/server/default/deploy/TNTDIR.ear/Security.jar/70.Security.jar }
It was essentially the same. However, this time it works. I pointed the manifest classpath to a jar file that contains every single one of the .class files in my application.
I verified that this was what was going on by deleting the manifest file, and it went back to the old behavior.
But, now that I have it working, I want to know why.
1. Why does the printout for the UnifiedClassLoader show the same classpath regardless of the manifest file, yet it finds classes in different places?
2. What should the classpath be in a .mf file?
Thanks agian,
Mark J.