[jboss-user] [EJB 3.0] - java.lang.ClassCastException: org.jnp.interfaces.NamingConte

toplink do-not-reply at jboss.com
Tue Sep 11 22:54:31 EDT 2007


I have an ejb2.0 sessionbean and ejb3.0 pojos, the sessionbean is defined in ejb-jar.xml along with persistence-context-ref and persistence-unit-ref. 

In the client, it will look up the sessionbean by jndi look up "test-client/ejb/TestRunner" to create the sessionbean to operate entity. Now I have a problem in the jndi look up, "test-client" is the "display-name" in application-client.xml, "ejb/TestRunner" is the "ejb-ref-name" in application-client.xml, and I see "Global JNDI Namingspace" in jmx-console is:

+- test-client (class: org.jnp.interfaces.NamingContext)
  |   +- ejb (class: org.jnp.interfaces.NamingContext)
  |   |   +- TestRunner[link -> TestRunnerBean] (class: javax.naming.LinkRef)

See the look up string is exactly matching the one displayed in Global JNDI Namingspace, but I got exception. I saw bunch of posts talking about the ClassCastException, but it seems none of them is related to my case, does anyone have idea about this?


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4083246#4083246

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4083246

More information about the jboss-user mailing list