OpenJPA
  1. OpenJPA
  2. OPENJPA-1060

Attempting to returning a list over RMI/IIOP results in serialization exception

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0-M2
    • Fix Version/s: 2.0.0-M2
    • Component/s: jpa
    • Labels:
      None
    • Environment:
      JEE

      Description

      Returning a result list over RMI/IIOP invocation currently fails on trunk/2.0 with this exception:

      java.rmi.ServerException: RemoteException occurred in server thread; nested exception is: java.rmi.MarshalException: CORBA BAD_PARAM 0x4f4d0006 Maybe; nested exception is: java.io.NotSerializableException: org.apache.openjpa.jdbc.kernel.InstanceResultObjectProvider is not serializable at com.ibm.CORBA.iiop.UtilDelegateImpl.wrapException(UtilDelegateImpl.java:748) at javax.rmi.CORBA.Util.wrapException(Util.java:296) at ...

      The problem is the result of storing the ROP in the userObject field of a ResultList in the org.apache.openjpa.kernel.QueryImpl.toResult(..) method. - res.setUserObject(rop). The ROP is not serializable so the RMI/CORBA layer throws an exception.

        Activity

        Jeremy Bauer created issue -
        Jeremy Bauer made changes -
        Field Original Value New Value
        Assignee Jeremy Bauer [ techhusky ]
        Hide
        Jeremy Bauer added a comment -

        Resolved by making the opaque user object within the result list transient. This prevents the object from being serialized along with the result list.

        Show
        Jeremy Bauer added a comment - Resolved by making the opaque user object within the result list transient. This prevents the object from being serialized along with the result list.
        Jeremy Bauer made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 2.0.0 [ 12313483 ]
        Resolution Fixed [ 1 ]
        Donald Woods made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Jeremy Bauer
            Reporter:
            Jeremy Bauer
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development