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

NAG Kum do-not-reply at jboss.com
Wed Apr 14 09:56:37 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/537422#537422

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

Hi Wolfgang,
 
Thank you very much for your reply. Modified code as below - 
 
*EJB :*
 
@Stateful
public class AuthenticationBean implements AuthenticationLocal,AuthenticationRemote {    public static final String RemoteJNDIName =  AuthenticationBean.class.getSimpleName();
 
*Client :*
 
AuthenticationRemote authEjb = (AuthenticationRemote)ServiceLocator.getEJB(AuthenticationBean.RemoteJNDIName);
No success! Pls find below error stack on browser... (Using jboss-4.2.2.GA)
 
 
The server encountered an internal error () that prevented it from fulfilling this request.*exception*
java.lang.ClassCastException: org.jnp.interfaces.NamingContext cannot be cast to com.tarangtech.mtg.authentication.ejb.AuthenticationRemote
     com.tarangtech.framework.ejb.clients.util.CommonPaymentAction.getAuthentication(CommonPaymentAction.java:23)
     com.tarangtech.mtg.authentication.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:440)
     com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:279)
     com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:242)
     com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:122)
     com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
     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:236)
     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:236)
     org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75)
     com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
     org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:94)
     com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
     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:236)
     org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)
     com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
     com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:176)
     com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
     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)



Thanks again in advance for your help...

Regds,
NK

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

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

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/20100414/76ac2e9d/attachment.html 


More information about the jboss-user mailing list