[jboss-user] [JNDI and Naming] - EJB3: cannot be cast

NAG Kum do-not-reply at jboss.com
Wed Apr 28 02:42:55 EDT 2010


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&containerType=14&container=2083]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100428/e1912e4c/attachment.html 


More information about the jboss-user mailing list