You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Rick Curtis (JIRA)" <ji...@apache.org> on 2010/06/21 17:27:24 UTC

[jira] Updated: (OPENJPA-1704) PCEnhancer incorrectly generates writes readExternal

     [ https://issues.apache.org/jira/browse/OPENJPA-1704?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rick Curtis updated OPENJPA-1704:
---------------------------------

    Affects Version/s: 2.1.0

> PCEnhancer incorrectly generates writes readExternal 
> -----------------------------------------------------
>
>                 Key: OPENJPA-1704
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1704
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 1.2.2, 2.0.0, 2.1.0
>            Reporter: Rick Curtis
>            Assignee: Rick Curtis
>
> OPENJPA-1400 introduced a bug that can be encountered when reading a streamed object under the following circumstances:
> - Using a serializable DetachedStateManager  (<property name="openjpa.DetachState" value="fetch-groups(DetachedStateField=true)"/>) 
> - The Entity needs to have a version field AND either:
>   - If no inheritance, a 'proxyable' (ie: java.sql.Date, java.util.List) field with a name that is lexicographically after the version field.
>   - If using inheritance, a 'proxyable' (ie: java.sql.Date, java.util.List) field in a child class.
> The bug could manifest itself in a number of ways. Below is the one I was able to reproduce.
> java.lang.IllegalArgumentException
> 	at org.apache.openjpa.persistence.inheritance.serializable.A.pcProvideField(A.java)
> 	at org.apache.openjpa.kernel.DetachedStateManager.proxyDetachedDeserialized(DetachedStateManager.java:438)
> 	at org.apache.openjpa.persistence.inheritance.serializable.A.readExternal(A.java)
> 	at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1792)
> 	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1751)
> 	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
> 	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
> 	at org.apache.openjpa.persistence.inheritance.serializable.TestSerialization.serializeObject(TestSerialization.java:105)
> 	at org.apache.openjpa.persistence.inheritance.serializable.TestSerialization.testRoundTrip(TestSerialization.java:48)
> 	...

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.