My JBoss client lookup return me org.jnp.interfaces.NamingContext type instead of my Bean remote type, I could not figure out anything wrong with the client. Please have a look.
Remote Interface
Bean Class
Client Class
Exception on the invocation of client. The loojup return me a type of org.jnp.interfaces.NamingContext, it shoud have been my remote type.
Exception in thread "main" java.lang.ClassCastException: org.jnp.interfaces.NamingContext
at mine.test.ejb.client.EjbClient.main(EjbClient.java:18)
Hi Peter, Thanks for the reply. I am using jboss-5.0.1.GA.
Sanju Thomas
Ranch Hand
Joined: Dec 29, 2004
Posts: 243
posted
0
Thanks Peter its worked. This is what shown in the console.
12:22:50,131 INFO [SessionSpecContainer] Starting jboss.j2ee:jar=mybean.jar,nam
e=MyBean,service=EJB3
12:22:50,131 INFO [EJBContainer] STARTED EJB: mine.test.ejb.MyBean ejbName: MyB
ean
12:22:50,209 INFO [JndiSessionRegistrarBase] Binding the following Entries in G
lobal JNDI:
MyBean/remote - EJB3.x Default Remote Business Interface
MyBean/remote-mine.test.ejb.IBean - EJB3.x Remote Business Interface
"/remote" with the bean name is something new I think. It was not there in JBoss 4, isn't it ?
Based on this code, the remote interface of the bean should have been bound to "MyBean"
MyBean/remote - EJB3.x Default Remote Business Interface
Looks wrong. It should not have bound to MyBean/remote since you have overridden it in the code. Are you sure the jar that you are deploying, contains exactly this piece of code? And do you have any ejb-jar.xml or jboss.xml for this EJB app?