OpenJPA
  1. OpenJPA
  2. OPENJPA-1441

NPE when enhancing a Serializable, versioned class

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.2.2, 1.3.0, 2.0.0-beta
    • Fix Version/s: 1.2.2, 1.3.0, 2.0.0-beta
    • Component/s: kernel
    • Labels:
      None

      Description

      I'm unable to enhance a Serializable class that has a version field when I have the DetachState property set as follows: openjpa.DetachState=fgs(DetachedStateField=true).

      The exception I'm seeing is :


      null
      Exception in thread "main" <openjpa-2.0.0-SNAPSHOT-r422266:890859 nonfatal general error> org.apache.openjpa.util.GeneralException: An error occurred while enhancing com.test.acme.annuity.common.bean.jpa.AbstractPersistebleObject. Exception message: null
      at org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java:545)
      at org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java:4652)
      at org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java:4594)
      at main.EnhancerDriver.main(EnhancerDriver.java:19)
      Caused by: java.lang.NullPointerException
      at org.apache.openjpa.enhance.PCEnhancer.addGetManagedValueCode(PCEnhancer.java:4320)
      at org.apache.openjpa.enhance.PCEnhancer.addGetManagedValueCode(PCEnhancer.java:4278)
      at org.apache.openjpa.enhance.PCEnhancer.writeExternal(PCEnhancer.java:4266)
      at org.apache.openjpa.enhance.PCEnhancer.addWriteExternal(PCEnhancer.java:4203)
      at org.apache.openjpa.enhance.PCEnhancer.addDetachExternalize(PCEnhancer.java:3991)
      at org.apache.openjpa.enhance.PCEnhancer.addAttachDetachCode(PCEnhancer.java:3761)
      at org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java:532)
      ... 3 more


        Issue Links

          Activity

          Donald Woods made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Michael Dick made changes -
          Fix Version/s 1.2.2 [ 12313681 ]
          Rick Curtis made changes -
          Description I'm unable to enhance a Serializable class that has a version field when I have the DetachState property set as follows: openjpa.DetachState=fgs(DetachedStateField=true).

          The exception I'm seeing is :

          -----
          null
          Exception in thread "main" <openjpa-2.0.0-SNAPSHOT-r422266:890859 nonfatal general error> org.apache.openjpa.util.GeneralException: An error occurred while enhancing com.ibm.wssvt.acme.annuity.common.bean.jpa.AbstractPersistebleObject. Exception message: null
          at org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java:545)
          at org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java:4652)
          at org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java:4594)
          at main.EnhancerDriver.main(EnhancerDriver.java:19)
          Caused by: java.lang.NullPointerException
          at org.apache.openjpa.enhance.PCEnhancer.addGetManagedValueCode(PCEnhancer.java:4320)
          at org.apache.openjpa.enhance.PCEnhancer.addGetManagedValueCode(PCEnhancer.java:4278)
          at org.apache.openjpa.enhance.PCEnhancer.writeExternal(PCEnhancer.java:4266)
          at org.apache.openjpa.enhance.PCEnhancer.addWriteExternal(PCEnhancer.java:4203)
          at org.apache.openjpa.enhance.PCEnhancer.addDetachExternalize(PCEnhancer.java:3991)
          at org.apache.openjpa.enhance.PCEnhancer.addAttachDetachCode(PCEnhancer.java:3761)
          at org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java:532)
          ... 3 more
          -----
          I'm unable to enhance a Serializable class that has a version field when I have the DetachState property set as follows: openjpa.DetachState=fgs(DetachedStateField=true).

          The exception I'm seeing is :

          -----
          null
          Exception in thread "main" <openjpa-2.0.0-SNAPSHOT-r422266:890859 nonfatal general error> org.apache.openjpa.util.GeneralException: An error occurred while enhancing com.test.acme.annuity.common.bean.jpa.AbstractPersistebleObject. Exception message: null
          at org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java:545)
          at org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java:4652)
          at org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java:4594)
          at main.EnhancerDriver.main(EnhancerDriver.java:19)
          Caused by: java.lang.NullPointerException
          at org.apache.openjpa.enhance.PCEnhancer.addGetManagedValueCode(PCEnhancer.java:4320)
          at org.apache.openjpa.enhance.PCEnhancer.addGetManagedValueCode(PCEnhancer.java:4278)
          at org.apache.openjpa.enhance.PCEnhancer.writeExternal(PCEnhancer.java:4266)
          at org.apache.openjpa.enhance.PCEnhancer.addWriteExternal(PCEnhancer.java:4203)
          at org.apache.openjpa.enhance.PCEnhancer.addDetachExternalize(PCEnhancer.java:3991)
          at org.apache.openjpa.enhance.PCEnhancer.addAttachDetachCode(PCEnhancer.java:3761)
          at org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java:532)
          ... 3 more
          -----
          Rick Curtis made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Fix Version/s 1.3.0 [ 12313326 ]
          Fix Version/s 2.0.0-M4 [ 12314149 ]
          Resolution Fixed [ 1 ]
          Rick Curtis made changes -
          Attachment OPENJPA-1441.1.2.x.patch [ 12428734 ]
          Rick Curtis made changes -
          Field Original Value New Value
          Link This issue relates to OPENJPA-1400 [ OPENJPA-1400 ]
          Rick Curtis created issue -

            People

            • Assignee:
              Rick Curtis
              Reporter:
              Rick Curtis
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development