-
1. Re: Problem with jboss class loading when launched by jboss
rob.stryker Oct 29, 2008 9:02 PM (in response to gpioli)Hey! =D
This sounds like a real issue. It'd be great if you could open a JIRA for me (https://jira.jboss.org/jira/secure/CreateIssue!default.jspa) and post a quick example project of how you'd try to access these jars.
I'm not as familiar with the app-server itself as I should be, so just make a quick jar with 1 class in it (something simple, a POJO) and then an example war / ejb jar / ear that tries to access it. If you can do that for me I can try to make sure it's solved in the JBossTools 3.0 CR release sometime before the end of the year.
Thanks for all your help!
- Rob Stryker -
2. Re: Problem with jboss class loading when launched by jboss
gpioli Oct 30, 2008 5:03 AM (in response to gpioli)Hi Rob,
obviously I have missed the most important thing!
I am running eclipse and jboss on Ubuntu 8.04.1.
In my environement I have two jvm: eclipse uses java-1.5.0-sun-1.5.0.15 and I have configured jboss to be launched by jboss tools with the same jvm;
the rest of the environment, specifically the shell, is configured to use java-6-sun-1.6.0.07.
So when the app-server is launched with 1.5.0.15 cannot find the class but when its' launched with 1.6.0.07 the class if found and loaded fine.
Changing eclipse configuration and jboss tools confiuration to use the newest jvm everything runs fine.
I think that's still an issue but probably is not related with jboss tools, right?
What did you suggest me to do to further investigate this issue an, in case, report this issue to the right group?
Thank you.
Giancarlo -
3. Re: Problem with jboss class loading when launched by jboss
maxandersen Oct 30, 2008 8:48 AM (in response to gpioli)So isn't this caused by you having compiled code for java6 and the java5 vm won't be able to load these classes ?
-
4. Re: Problem with jboss class loading when launched by jboss
gpioli Oct 30, 2008 8:57 AM (in response to gpioli)Maybe I am wrong but I do not think so because the eclipse environement is set up tu use the same vm used by jboss, when started from jboss tools.
-
5. Re: Problem with jboss class loading when launched by jboss
maxandersen Oct 30, 2008 9:10 AM (in response to gpioli)does the project that compiles your class also set to compile to Java5 or is it set to Java6 ?
Project prefs > Java > Compiler
If it works with Java6 it should also work with Java5 (unless the setting above is used or you are compiling against a java6 library) -
6. Re: Problem with jboss class loading when launched by jboss
gpioli Oct 30, 2008 9:21 AM (in response to gpioli)First of all, thank you for your interest in my problem.
I have checked the Compile Compliance Level for th property and it is set to 5.0. -
7. Re: Problem with jboss class loading when launched by jboss
maxandersen Oct 30, 2008 10:00 AM (in response to gpioli)so are you getting any error messages when starting ?
-
8. Re: Problem with jboss class loading when launched by jboss
gpioli Oct 30, 2008 10:18 AM (in response to gpioli)The only error i got is when I try to create an object of the class defined in the jar: NoClassDefFoundError
-
9. Re: Problem with jboss class loading when launched by jboss
maxandersen Oct 30, 2008 10:52 AM (in response to gpioli)stacktrace ?
Have you looked in the server logs ? NoClassDefFoundError is *not* ClassNotFound thus *something* is wrong in the dependencies... -
10. Re: Problem with jboss class loading when launched by jboss
gpioli Oct 30, 2008 11:03 AM (in response to gpioli)Yes I have looked in the log and yes i understand that they are not the same error. I do not understand why this kind of problem was solved changing the jvm. Am I missing something?
At the moment I have not the stacktrace at hand. As soon as I can get them I will hand them here.
What has driven me nut is that I have another machine on which the same application and the same jar, in the same relative path worked fine.