[jboss-user] [EJB 3.0] - Error working wih EJB3, Struts2 & JBoss 4.2GA

NAG Kum do-not-reply at jboss.com
Tue Apr 27 05:53:56 EDT 2010


NAG Kum [http://community.jboss.org/people/nk_2010] replied to the discussion

"Error working wih EJB3, Struts2 & JBoss 4.2GA"

To view the discussion, visit: http://community.jboss.org/message/539736#539736

--------------------------------------------------------------
HI Wolfgang,

Thanks a lot, I could see deployed EJBs in jmx-console. Now face problem with client -

*My Code* :

          Object obj = ServiceLocator.getEJB(AuthenticationBean.RemoteJNDIName);
            System.out.println("EJB Look up successfull ");    
            
            AuthenticationRemote authEjb = (AuthenticationRemote)PortableRemoteObject.narrow(obj, AuthenticationRemote.class);

*Error* :


java.lang.ClassCastException
     com.sun.corba.se.impl.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:229)
     javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:137)
     com.tarangtech.framework.ejb.clients.util.CommonPaymentAction.getAuthentication(CommonPaymentAction.java:37)
     com.tarangtech.mtg.struts.AuthenticationAction.execute(AuthenticationAction.java:23)
     sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     java.lang.reflect.Method.invoke(Method.java:597)
     com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:441)
     com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:280)
     com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:243)
     com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:122)
     com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
     com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)
     com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
     com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
     com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)
     com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
     com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
     org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75)
     com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
     org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:94)
     com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
     com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:138)
     com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
     com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
     org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)
     com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
     com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:176)
     com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
     org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)
     org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:488)
     org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
     org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)
     org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

Pls assist me as early as possible, as I am already running out of time...
Thank you so much,

Best Regards,
NK


*root cause*

--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/539736#539736]

Start a new discussion in EJB 3.0 at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2029]

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


More information about the jboss-user mailing list