[jboss-user] [EJB/JBoss] - Re: ClassLoader Mess Up
do-not-reply at jboss.com
Mon Sep 15 15:01:41 EDT 2008
Hi everyone, i think my problem is related to this:
anonymous wrote :
| Q: I'am getting a ClassCastException? when I try to cast a Session Bean to it's interface after I successfully obtained the Session Bean over InitialContext? lookup. Whats going on?
| A: You are probably dealing with scoped Beans, remote interfaces and trying to run everything in the same VM while package multiple copies of your interface classes into the different parts of your application(s). Solve this by either:
| * eliminate multiple copies of interfaces, package everything into the same ear
| * run your application in different VMs
| * if required to let different EARs interact with one another in the same VM:
| o enable CallByValue for JNDI in server/xxx/conf/jboss-service.xml or server/xxx/deploy/naming-service.xml
| o upgrade to EJB 3.0 RC4-PFD -- CallByValue is broken in RC3
| A: Maybe you forgot that as of RC4 - the default jndi naming convention is changed (its in the migration notes) - if a quick getClass().getName() on your ic.lookup() says org.jnp.interfaces.NamingContext? and not $Proxy0 - you need to think: APP/BeanName/remote or APP/BeanName/local have a look in the jndi tree with http://localhost:8080 at your global jndi namespace.
But im not really sure about two things:
1.- Which version of EJB3 comes with JBoss 4.2.2GA Vanilla.
2.- The information on the QUOTE seems old.
Please i appreciate any help, im really stuck here, thx.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4176600#4176600
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4176600
More information about the jboss-user