-
1. Re: ClassCastException upon jndi lookup after upgrade from 3
jaikiran Mar 6, 2007 10:41 AM (in response to hgsdc)Have a look at http://wiki.jboss.org/wiki/Wiki.jsp?page=ClassCastExceptions especially the jmx-console method mentioned over there.
-
2. Re: ClassCastException upon jndi lookup after upgrade from 3
hgsdc Mar 6, 2007 5:22 PM (in response to hgsdc)Hi jaikiran
Thanks for the link. Exactly that link did not catch my attention as I was searching the wiki :-(
But as I am diving into this issue I guess I know what to do to resolve. Repackage the ear. I have already done so and it is bringing me further.
With respect of this beeing the JNDI forum:
I have classes that really are shared among the two jars: app-web.war and app-ejb.jar. Would it be approriate to let those classes to into one single jar, say app-shared.jar, that is then put into the ear? This would give them a "unique identity" with respect of the class loader right?
Thanks in advance. You helped me alot already.
Regards
Henrik -
3. Re: ClassCastException upon jndi lookup after upgrade from 3
jaikiran Mar 6, 2007 5:29 PM (in response to hgsdc)If the class is meant to be used by both the war and the ejb-jar, the way i package it is - i create a separate jar (common-util.jar maybe) and make it available to both the war and ejb modules by specifying the common-util.jar as java module in the application.xml file of the ear. You can find more details about the same at:
http://jaitechwriteups.blogspot.com/2006/10/how-to-package-application-into-ear.html
The common-util.jar will be loaded by a single classloader and will be made available to both the war and the ejb-jar. -
4. Re: ClassCastException upon jndi lookup after upgrade from 3
hgsdc Mar 6, 2007 5:52 PM (in response to hgsdc)Hi jaikiran
Yup, exactly what I would suspect to happen. Thanks for link. It was exactly what I was trying to do. No more classloading problems whatsoever. Simple put: GREAT. Thanx
Best wishes and regards
Henrik