1 Reply Latest reply on Jul 26, 2002 6:27 PM by MR

    EJB Handles in jboss3.0 not Serializable?

    Simon Newbie

      Hi,

      Redeploying a web app fails to reconstitute/persist EJB handles. Seeing as EJB handles are persistable proxies for EJB objects, this must be a bug surely. I've seen elsewhere on this forum that someone had similar troubles sending handles to Object output streams. I've only tried so far with the catalina container, but am pretty positive it's not a web container issue.

      Simple code:

      javax.ejb.Handle aHandle = someEJB.getHandle();
      myHttpSession.setAttribute("gonnaLoseItHandle", aHandle);

      Produces the following on restart:

      11:32:08,379 ERROR [Engine] StandardManager[] IOException while loading persisted sessions: java.io.EOFException
      java.io.EOFException
      at java.io.DataInputStream.readUnsignedShort(DataInputStream.java:347)
      at java.io.ObjectInputStream$BlockDataInputStream.readUnsignedShort(ObjectInputStream.java:2633)
      at java.io.ObjectInputStream$BlockDataInputStream.readUTF(ObjectInputStream.java:2689)
      at java.io.ObjectInputStream.readUTF(ObjectInputStream.java:989)
      at java.rmi.server.RemoteObject.readObject(RemoteObject.java:394)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:809)
      at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1733)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1636)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1264)
      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:322)
      at org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.readExternal(JRMPInvokerProxy.java:160)
      at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1676)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1634)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1264)
      at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1830)
      at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1756)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1636)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1264)
      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:322)
      at org.apache.catalina.session.StandardSession.readObject(StandardSession.java:1268)
      at org.apache.catalina.session.StandardSession.readObjectData(StandardSession.java:810)
      at org.apache.catalina.session.StandardManager.load(StandardManager.java:411)
      at org.apache.catalina.session.StandardManager.start(StandardManager.java:617)
      at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1104)
      at org.apache.catalina.core.StandardContext.start(StandardContext.java:3345)
      at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:785)
      at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:454)
      at org.jboss.web.catalina.EmbeddedCatalinaServiceSX.createWebContext(EmbeddedCatalinaServiceSX.java:321)
      at org.jboss.web.catalina.EmbeddedCatalinaServiceSX.performDeploy(EmbeddedCatalinaServiceSX.java:238)
      at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:300)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:678)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:513)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:481)
      at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491)
      at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
      at $Proxy4.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:405)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:515)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:202)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:191)