openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Dick (JIRA)" <j...@apache.org>
Subject [jira] Commented: (OPENJPA-453) Evicting embedded object nullifies statemanager
Date Thu, 28 May 2009 14:04:45 GMT

    [ https://issues.apache.org/jira/browse/OPENJPA-453?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12713984#action_12713984
] 

Michael Dick commented on OPENJPA-453:
--------------------------------------

Per comments on the users mailing list this issue can be reproduced with 'vanilla' OpenJPA
(no JDO / Kodo). Ravi Palacherla provided this information on the list : 

Hi Mike,

I am able to replicate the nullpointer exception with openJPA

Exception in thread "Thread-1" java.lang.NullPointerException
       at org.apache.openjpa.kernel.StateManagerImpl.replaceObjectField(StateManagerImpl.java:2090)
       at Book.pcReplaceField(Book.java)
       at org.apache.openjpa.kernel.StateManagerImpl.replaceField(StateManagerImpl.java:3056)
       at org.apache.openjpa.kernel.StateManagerImpl.clearFields(StateManagerImpl.java:2665)
       at org.apache.openjpa.kernel.PNonTransState.beforeWrite(PNonTransState.java:107)
       at org.apache.openjpa.kernel.PNonTransState.beforeWrite(PNonTransState.java:77)
       at org.apache.openjpa.kernel.StateManagerImpl.dirty(StateManagerImpl.java:1608)
       at org.apache.openjpa.kernel.StateManagerImpl.settingStringField(StateManagerImpl.java:1976)
       at Book.pcSettitle(Book.java)
       at Book.setTitle(Book.java:23)
       at Main$2.run(Main.java:60)
       at java.lang.Thread.run(Thread.java:595)

You can download the test case from:
http://n2.nabble.com/file/n2982705/embeddopenJPA.zip embeddopenJPA.zip

If you verify I set the property "<property name="openjpa.Multithreaded"
value="false"/>" even though I am spawning threads in my sample.

When I correct this configuration by changing MultiThreaded property to
"true" then my test case hangs.

Please let me know if you need more information.

Udi,
Please validate my test case to see if it is in sync with your application.

- Ravi.

> Evicting embedded object nullifies statemanager
> -----------------------------------------------
>
>                 Key: OPENJPA-453
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-453
>             Project: OpenJPA
>          Issue Type: Bug
>         Environment: Kodo 4.1.4, Ms sql server 2005, jTDS 1.2, jdk 1.6
>            Reporter: Christiaan
>         Attachments: TestCaseEvictEmbedded.zip
>
>
> I am noticing the following behaviour: If evict() is called on an embedded
> object the statemanager is nullified which is in contrast to non-embedded
> objects. Subsequently, calling JDOHelper.getPersistenceManager() on the
> evicted embedded object returns null. Is this the correct behaviour?

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


Mime
View raw message