[jboss-user] [Installation, Configuration & DEPLOYMENT] - Re: Overriding universal classloader, JBoss 4.2.1GA
jimpo
do-not-reply at jboss.com
Thu Oct 25 09:15:04 EDT 2007
"jaikiran" wrote :
|
| Makes sense?
|
|
Beautiful explanation of the issue. To recap, my understanding of the issue
- AnnotationConfiguration class (from hibernate-annotations, included in WEB-INF/lib) references Interface A and, if one exists, class B implementing interface A
- AnnotationConfiguration works even if class B does not exist
- interface A is loaded by the application classloader
- class B does not exist in the war. AnnotationConfiguration causes class B to be loaded using the parent classloader, which also loads interface A
- interface A is therefore loaded by two different classloaders -> classcastexception
It seems that the problem is not related to JBoss classloading, after all. The reason that the same war works in other servers, is that those servers do not have the same hibernate jars loaded by their "parent" classloaders.
So nice to finally understand what is going on here. Thanks a lot, I will sleep better now ;)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4098812#4098812
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4098812
More information about the jboss-user
mailing list