ODE
  1. ODE
  2. ODE-237

ClassNotFoundException while deserializing HBpelEvent in Geronimo MultiParentClassLoader

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.1, 1.1.1
    • Fix Version/s: 1.2
    • Component/s: Management API
    • Labels:
      None

      Description

      Running Ode inside Geronimo 2.0.1 and JDK 1.6 leads to the following exception while querying for process events,

      09:41:58,539 FATAL [org.apache.ode.daohib.bpel.BpelDAOConnectionImpl] [RMI TCP Connection(9)-192.168.0.102] Internal error: unable to transform HBpelEvent
      java.lang.RuntimeException: java.lang.ClassNotFoundException: [Ljava.lang.Object; in classloader org.apache.ode/ode/1.1.1/war
      at org.apache.ode.utils.SerializableUtils.toObject(SerializableUtils.java:94)
      at org.apache.ode.utils.SerializableUtils.toObject(SerializableUtils.java:100)
      at org.apache.ode.daohib.bpel.BpelDAOConnectionImpl$1.apply(BpelDAOConnectionImpl.java:217)
      at org.apache.ode.daohib.bpel.BpelDAOConnectionImpl$1.apply(BpelDAOConnectionImpl.java:216)
      at org.apache.ode.utils.stl.CollectionsX.transformEx(CollectionsX.java:178)
      at org.apache.ode.daohib.bpel.BpelDAOConnectionImpl.bpelEventQuery(BpelDAOConnectionImpl.java:215)
      at org.apache.ode.bpel.engine.ProcessAndInstanceManagementImpl$7.run(ProcessAndInstanceManagementImpl.java:469)
      at org.apache.ode.bpel.engine.BpelDatabase$1.call(BpelDatabase.java:76)
      at org.apache.ode.scheduler.simple.SimpleScheduler.execTransaction(SimpleScheduler.java:179)
      at org.apache.ode.bpel.engine.BpelDatabase.exec(BpelDatabase.java:74)
      at org.apache.ode.bpel.engine.ProcessAndInstanceManagementImpl.dbexec(ProcessAndInstanceManagementImpl.java:585)
      at org.apache.ode.bpel.engine.ProcessAndInstanceManagementImpl.listEvents(ProcessAndInstanceManagementImpl.java:467)
      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:597)
      at org.apache.ode.jca.server.rmi.RmiPipeServerImpl.invokeConnectionMethod(RmiPipeServerImpl.java:89)
      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:597)
      at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
      at sun.rmi.transport.Transport$1.run(Transport.java:159)
      at java.security.AccessController.doPrivileged(Native Method)
      at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
      at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
      at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
      at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
      at java.lang.Thread.run(Thread.java:619)
      Caused by: java.lang.ClassNotFoundException: [Ljava.lang.Object; in classloader org.apache.ode/ode/1.1.1/war
      at org.apache.geronimo.kernel.config.MultiParentClassLoader.loadOptimizedClass(MultiParentClassLoader.java:428)
      at org.apache.geronimo.kernel.config.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:278)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
      at org.apache.ode.utils.SerializableUtils$1.resolveClass(SerializableUtils.java:87)
      at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1575)
      at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1496)
      at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1624)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1323)
      at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
      at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
      at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
      at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
      at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
      at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
      at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
      at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
      at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
      at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
      at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
      at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
      at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
      at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:480)
      at org.apache.xerces.dom.ParentNode.readObject(Unknown Source)
      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:597)
      at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)
      at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1849)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
      at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
      at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:480)
      at org.apache.xerces.dom.ParentNode.readObject(Unknown Source)
      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:597)
      at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)
      at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1849)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
      at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
      at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:480)
      at org.apache.xerces.dom.ParentNode.readObject(Unknown Source)
      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:597)
      at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)
      at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1849)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
      at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
      at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
      at org.apache.ode.utils.SerializableUtils.toObject(SerializableUtils.java:91)
      ... 30 more

        Activity

        Hide
        Alex Boisvert added a comment -

        Fixed in 1.1 branch,
        Sending utils/src/main/java/org/apache/ode/utils/SerializableUtils.java
        Transmitting file data .
        Committed revision 616857.

        Fixed in -trunk
        Sending utils/src/main/java/org/apache/ode/utils/SerializableUtils.java
        Transmitting file data .
        Committed revision 616859.

        Index: src/main/java/org/apache/ode/utils/SerializableUtils.java
        ===================================================================
        — src/main/java/org/apache/ode/utils/SerializableUtils.java (revision 616853)
        +++ src/main/java/org/apache/ode/utils/SerializableUtils.java (working copy)
        @@ -81,11 +81,13 @@
        try {
        ObjectInputStream ois = new ObjectInputStream(binaryStream) {

        • protected Class<?> resolveClass(ObjectStreamClass desc) throws IOException,
        • ClassNotFoundException {
          + protected Class<?> resolveClass(ObjectStreamClass desc) throws IOException, ClassNotFoundException {
          String name = desc.getName();
        • Class c = cl.loadClass(name);
        • return c;
          + try { + return Class.forName(name, true, cl); + }

          catch (ClassNotFoundException ex)

          { + return super.resolveClass(desc); + }

          }
          };
          return ois.readObject();

        Show
        Alex Boisvert added a comment - Fixed in 1.1 branch, Sending utils/src/main/java/org/apache/ode/utils/SerializableUtils.java Transmitting file data . Committed revision 616857. Fixed in -trunk Sending utils/src/main/java/org/apache/ode/utils/SerializableUtils.java Transmitting file data . Committed revision 616859. Index: src/main/java/org/apache/ode/utils/SerializableUtils.java =================================================================== — src/main/java/org/apache/ode/utils/SerializableUtils.java (revision 616853) +++ src/main/java/org/apache/ode/utils/SerializableUtils.java (working copy) @@ -81,11 +81,13 @@ try { ObjectInputStream ois = new ObjectInputStream(binaryStream) { protected Class<?> resolveClass(ObjectStreamClass desc) throws IOException, ClassNotFoundException { + protected Class<?> resolveClass(ObjectStreamClass desc) throws IOException, ClassNotFoundException { String name = desc.getName(); Class c = cl.loadClass(name); return c; + try { + return Class.forName(name, true, cl); + } catch (ClassNotFoundException ex) { + return super.resolveClass(desc); + } } }; return ois.readObject();

          People

          • Assignee:
            Alex Boisvert
            Reporter:
            Alex Boisvert
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development