[jboss-user] [Beginners Corner] - Re: Entity Bean: $Proxy<nn> cannot be cast to ...
do-not-reply at jboss.com
Sat Jan 24 17:54:34 EST 2009
Sounds like you are including the interface definition in your WAR file, remove it.
The problem is that if both your EJB JAR file and the WAR file contain the interface definition, each has its own classloader. Then the interface in the EJB JAR will be used to create the $Proxy126, but then in the WAR file the cast will be attempted with the interface in the WAT file, which is in the other classloader, and thus not the same.
I'm not sure what steps you would have to take in Eclipse to get it to not package the interface in the WAR file (I do all my packaging using Ant or Maven).
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4204555#4204555
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4204555
More information about the jboss-user