NAG Kum [
http://community.jboss.org/people/nk_2010] replied to the discussion
"EJB3: cannot be cast"
To view the discussion, visit:
http://community.jboss.org/message/539932#539932
--------------------------------------------------------------
Hi Jaikiran,
I do have same problem, Pls see below -
java.lang.ClassCastException: org.jnp.interfaces.NamingContext cannot be cast to
com.tarangtech.mtg.authentication.AuthenticationRemote
com.tarangtech.framework.ejb.clients.util.CommonPaymentAction.getAuthentication(CommonPaymentAction.java:34)
com.tarangtech.mtg.struts.AuthenticationAction.execute(AuthenticationAction.java:24)
Here is my *lookup code* -
public static final String RemoteJNDIName = "AuthenticationBean/remote";
AuthenticationRemote authEjb =
(AuthenticationRemote)ServiceLocator.getEJB(AuthenticationBean.RemoteJNDIName);
System.out.println("EJB Look up successfull ");
my *jmx-console* -
+- AuthenticationBean (class: org.jnp.interfaces.NamingContext)
| +- remote (class: org.jnp.interfaces.NamingContext)
| | +- UserTransaction[link -> UserTransaction] (class: javax.naming.LinkRef)
| | +- metaData (class: org.jboss.metadata.client.jboss.JBossClientMetaData)
| | +- env (class: org.jnp.interfaces.NamingContext)
| | | +- com.tarangtech.mtg.authentication.AuthenticationBean[link ->
AuthenticationBean/remote] (class: javax.naming.LinkRef)
| | +- classPathEntries (class: java.util.ArrayList)
I have verified for jar file incompatabilities with
Jboss server & my application. Don't get the mistake, request you to help me to
proceed further...
Thanks,
NK
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/539932#539932]
Start a new discussion in JNDI and Naming at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]