2 Replies Latest reply on Jan 7, 2002 3:19 AM by Adrian Brock

    how to call findByPrimaryKey() in servlet.

    ma zhenduo Newbie

      these lines run normally when call by java client.
      ------------------------------
      accountHome = EJBUtil.getAccountHome();
      account = accountHome.findByPrimaryKey(accountPK);
      ------------------------------

      but,when call by a servlet in tomcat4.0,
      Exception rise.

      ----------------------------------
      about to lookup:AccountBean
      about to narrow
      java.rmi.MarshalException: error marshalling arguments; nested exception is:
      java.net.SocketException: Connection aborted by peer: socket write error
      java.net.SocketException: Connection aborted by peer: socket write error
      at java.net.SocketOutputStream.socketWrite(Native Method)
      at java.net.SocketOutputStream.write(SocketOutputStream.java:83)
      at java.io.BufferedOutputStream.write(BufferedOutputStream.java:112)
      at java.io.ObjectOutputStream.drain(ObjectOutputStream.java:1477)
      at java.io.ObjectOutputStream.setBlockData(ObjectOutputStream.java:1500)
      at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:407)
      at sun.rmi.server.UnicastRef.marshalValue(UnicastRef.java:268)
      at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:106)
      at org.jboss.invocation.jrmp.server.JRMPInvoker_Stub.invoke(Unknown Source)
      at org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPInvokerProxy.java:172)
      at org.jboss.proxy.ejb.GenericProxy.invoke(GenericProxy.java:198)
      at org.jboss.proxy.ejb.HomeProxy.invoke(HomeProxy.java:196)
      at $Proxy3.findByPrimaryKey(Unknown Source)
      at cn.com.dragontec.erp.prototype.sale.action.LogonAction.logon(LogonAction.java:79)
      at cn.com.dragontec.erp.prototype.sale.action.LogonAction.perform(LogonAction.java:40)
      at org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.java:1786)
      at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1585)
      at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
      at org.apache.catalina.core.ApplicationFilterChain.access$0(ApplicationFilterChain.java:197)
      at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:176)
      at java.security.AccessController.doPrivileged(Native Method)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:172)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:201)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
      at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2344)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
      at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
      at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
      at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1011)
      at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1106)
      at java.lang.Thread.run(Thread.java:484)

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

      please help me, thank in advance.