2 Replies Latest reply on Mar 5, 2012 2:49 AM by Eric K.

    IOException marshaling EJB parameters

    Eric K. Newbie

      Hi everyone,

      I'm trying to migrate an EAR (EJB3 + Richfaces 4.1.0 WebApp) from 7.0.2 Web to 7.1 final.

       

      On 7.0.2 Web I accessed the EJB3-Remote-Interface successfully with the following code:

       

       

      Context ic = new InitialContext();
                  ordersBean = (OrdersRemote) ic
                          .lookup("java:app/.../OrdersBean!de...OrdersRemote");
      

       

      On 7.1 I modified the code according to the quickstart example to this:

       

       

      Hashtable<String, String> jndiProperties = new Hashtable<String, String>();
                  jndiProperties.put(Context.URL_PKG_PREFIXES,
                          "org.jboss.ejb.client.naming");
                  Context ic = new InitialContext(jndiProperties);
                  ordersBean = (OrdersRemote) ic
                          .lookup("java:app/.../OrdersBean!...OrdersRemote");
      

       

      Then I get the following exception:

       

       

      14:57:41,229 ERROR [de...jsf.CustomFacesServlet] (ajp--0.0.0.0-8009-7) Uncaught exeption: class javax.faces.el.EvaluationException: javax.faces.el.EvaluationExcepti                                                                   
      on: java.lang.RuntimeException: IOException marshaling EJB parameters
      
      
      at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:102) [jboss-jsf-api_2.1_spec-2.0.0.Final.jar:2.                                                                   
      0.0.Final]
      
      
      at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102) [jsf-impl-2.1.5-jbossorg-1.jar:2.1.5-SNAPSHOT]
      
      
      at javax.faces.component.UICommand.broadcast(UICommand.java:315) [jboss-jsf-api_2.1_spec-2.0.0.Final.jar:2.0.0.Final]
      
      
      at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:794) [jboss-jsf-api_2.1_spec-2.0.0.Final.jar:2.0.0.Final]
      
      
      at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1259) [jboss-jsf-api_2.1_spec-2.0.0.Final.jar:2.0.0.Final]
      
      
      at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81) [jsf-impl-2.1.5-jbossorg-1.jar:2.1.5-SNAPSHOT]
      
      
      at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) [jsf-impl-2.1.5-jbossorg-1.jar:2.1.5-SNAPSHOT]
      
      
      at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118) [jsf-impl-2.1.5-jbossorg-1.jar:2.1.5-SNAPSHOT]
      
      
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593) [jboss-jsf-api_2.1_spec-2.0.0.Final.jar:2.0.0.Final]
      
      
      at de...jsf.CustomFacesServlet.service(CustomFacesServlet.java:50) [classes:]
      
      
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.10.Final.jar:]
      
      
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.10.Final.jar:]
      
      
      at org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:62) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
      
      
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.10.Final.jar:]
      
      
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.10.Final.jar:]
      
      
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.10.Final.jar:]
      
      
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.10.Final.jar:]
      
      
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:397) [jbossweb-7.0.10.Final.jar:]
      
      
      at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.1.0.Final.jar:7.1.0.Final]
      
      
      at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:154) [jboss-as-web-7.1.0.Final.jar:7.1.0.Final]
      
      
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.10.Final.jar:]
      
      
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.10.Final.jar:]
      
      
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.10.Final.jar:]
      
      
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.10.Final.jar:]
      
      
      at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:505) [jbossweb-7.0.10.Final.jar:]
      
      
      at org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpProtocol.java:445) [jbossweb-7.0.10.Final.jar:]
      
      
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.10.Final.jar:]
      
      
      at java.lang.Thread.run(Thread.java:636) [rt.jar:1.6.0_20]
      
      Caused by: java.lang.RuntimeException: IOException marshaling EJB parameters
      
      
      at org.jboss.as.ejb3.remote.LocalEjbReceiver.clone(LocalEjbReceiver.java:224) [jboss-as-ejb3-7.1.0.Final.jar:7.1.0.Final]
      
      
      at org.jboss.as.ejb3.remote.LocalEjbReceiver.clone(LocalEjbReceiver.java:213) [jboss-as-ejb3-7.1.0.Final.jar:7.1.0.Final]
      
      
      at org.jboss.as.ejb3.remote.LocalEjbReceiver.processInvocation(LocalEjbReceiver.java:188) [jboss-as-ejb3-7.1.0.Final.jar:7.1.0.Final]
      
      
      at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:173) [jboss-ejb-client-1.0.2.Final.jar:1.0.2.Final]
      
      
      at org.jboss.ejb.client.TransactionInterceptor.handleInvocation(TransactionInterceptor.java:43) [jboss-ejb-client-1.0.2.Final.jar:1.0.2.Final]
      
      
      at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:175) [jboss-ejb-client-1.0.2.Final.jar:1.0.2.Final]
      
      
      at org.jboss.ejb.client.ReceiverInterceptor.handleInvocation(ReceiverInterceptor.java:92) [jboss-ejb-client-1.0.2.Final.jar:1.0.2.Final]
      
      
      at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:175) [jboss-ejb-client-1.0.2.Final.jar:1.0.2.Final]
      
      
      at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:136) [jboss-ejb-client-1.0.2.Final.jar:1.0.2.Final]
      
      
      at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:121) [jboss-ejb-client-1.0.2.Final.jar:1.0.2.Final]
      
      
      at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:104) [jboss-ejb-client-1.0.2.Final.jar:1.0.2.Final]
      
      
      at $Proxy61.findOrdersCounts(Unknown Source)
      at de...jsf.reports.OrdersCountReport.fetchResult(OrdersCountReport.java:62) [classes:]
      
      
      at de....stats.action.OrderStatsBean.search(OrderStatsBean.java:78) [classes:]
      
      
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_20]
      
      
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.6.0_20]
      
      
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.6.0_20]
      
      
      at java.lang.reflect.Method.invoke(Method.java:616) [rt.jar:1.6.0_20]
      
      
      at org.apache.el.parser.AstValue.invoke(AstValue.java:262) [jbossweb-7.0.10.Final.jar:]
      
      
      at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:278) [jbossweb-7.0.10.Final.jar:]
      
      
      at org.jboss.weld.util.el.ForwardingMethodExpression.invoke(ForwardingMethodExpression.java:39) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
      
      
      at org.jboss.weld.el.WeldMethodExpression.invoke(WeldMethodExpression.java:50) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
      
      
      at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105) [jsf-impl-2.1.5-jbossorg-1.jar:2.1.5-SNAPSHOT]
      
      
      at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88) [jboss-jsf-api_2.1_spec-2.0.0.Final.jar:2.0                                                                   
      .0.Final]
      
      
      ... 27 more
      
      Caused by: java.io.NotSerializableException: de....stats.model.sp.SpOrdersCountItem
      
      
      at org.jboss.marshalling.cloner.SerializingCloner.clone(SerializingCloner.java:254)
      
      
      at org.jboss.marshalling.cloner.SerializingCloner.clone(SerializingCloner.java:135)
      
      
      at org.jboss.marshalling.cloner.SerializingCloner$StepObjectInput.doReadObject(SerializingCloner.java:725)
      
      
      at org.jboss.marshalling.AbstractObjectInput.readObject(AbstractObjectInput.java:37)
      
      
      at org.jboss.marshalling.MarshallerObjectInputStream.readObjectOverride(MarshallerObjectInputStream.java:57)
      
      
      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:362) [rt.jar:1.6.0_20]
      
      
      at java.util.ArrayList.readObject(ArrayList.java:696) [rt.jar:1.6.0_20]
      
      
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_20]
      
      
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.6.0_20]
      
      
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.6.0_20]
      
      
      at java.lang.reflect.Method.invoke(Method.java:616) [rt.jar:1.6.0_20]
      
      
      at org.jboss.marshalling.reflect.SerializableClass.callReadObject(SerializableClass.java:213)
      
      
      at org.jboss.marshalling.cloner.SerializingCloner.initSerializableClone(SerializingCloner.java:300)
      
      
      at org.jboss.marshalling.cloner.SerializingCloner.clone(SerializingCloner.java:252)
      
      
      at org.jboss.marshalling.cloner.SerializingCloner.clone(SerializingCloner.java:135)
      
      
      at org.jboss.as.ejb3.remote.LocalEjbReceiver.clone(LocalEjbReceiver.java:222) [jboss-as-ejb3-7.1.0.Final.jar:7.1.0.Final]
      
      
      ... 50 more
      
      
      

       

      Thanks in advance for any help.