You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Catalina Wei (JIRA)" <ji...@apache.org> on 2009/02/08 02:34:59 UTC

[jira] Created: (OPENJPA-912) Potential NPE in setInverseRelation

Potential NPE in setInverseRelation
-----------------------------------

                 Key: OPENJPA-912
                 URL: https://issues.apache.org/jira/browse/OPENJPA-912
             Project: OpenJPA
          Issue Type: Bug
          Components: jdbc
    Affects Versions: 1.2.0, 1.2.1, 1.3.0, 2.0.0-M1, 2.0.0
            Reporter: Catalina Wei
            Assignee: Catalina Wei




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


[jira] Commented: (OPENJPA-912) Potential NPE in setInverseRelation

Posted by "Michael Dick (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENJPA-912?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12675121#action_12675121 ] 

Michael Dick commented on OPENJPA-912:
--------------------------------------

I've never seen this failure in 1.2.x, TestChainEntities is working as is at the moment. Is there another change that might be in trunk & 1.3.x which exposed this behavior? 

I see where the NPE is possible, but I'd expect that to be deterministic behavior. If it's intermittent I'd like to know more about what causes it in Catalina's environment that I can't reproduce locally. 

> Potential NPE in setInverseRelation
> -----------------------------------
>
>                 Key: OPENJPA-912
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-912
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jdbc
>    Affects Versions: 1.2.0, 1.2.1, 1.3.0, 2.0.0-M1, 2.0.0
>            Reporter: Catalina Wei
>            Assignee: Michael Dick
>             Fix For: 1.3.0, 2.0.0
>
>         Attachments: OPENJPA-912-branches12x.patch
>
>


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


[jira] Resolved: (OPENJPA-912) Potential NPE in setInverseRelation

Posted by "Catalina Wei (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-912?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Catalina Wei resolved OPENJPA-912.
----------------------------------

    Resolution: Fixed

fix checked in trunk r741994, 
 1.3.x r741995

> Potential NPE in setInverseRelation
> -----------------------------------
>
>                 Key: OPENJPA-912
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-912
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jdbc
>    Affects Versions: 1.2.0, 1.2.1, 1.3.0, 2.0.0-M1, 2.0.0
>            Reporter: Catalina Wei
>            Assignee: Catalina Wei
>


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


[jira] Updated: (OPENJPA-912) Potential NPE in setInverseRelation

Posted by "Donald Woods (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-912?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Donald Woods updated OPENJPA-912:
---------------------------------

    Fix Version/s: 2.0.0
                   1.3.0

adding missing Fix Version values

> Potential NPE in setInverseRelation
> -----------------------------------
>
>                 Key: OPENJPA-912
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-912
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jdbc
>    Affects Versions: 1.2.0, 1.2.1, 1.3.0, 2.0.0-M1, 2.0.0
>            Reporter: Catalina Wei
>            Assignee: Catalina Wei
>             Fix For: 1.3.0, 2.0.0
>
>


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


[jira] Reopened: (OPENJPA-912) Potential NPE in setInverseRelation

Posted by "Donald Woods (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-912?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Donald Woods reopened OPENJPA-912:
----------------------------------

      Assignee: Donald Woods  (was: Catalina Wei)

This also needs to be applied to branches/1.2.x, as it is related to OPENJPA-925.

> Potential NPE in setInverseRelation
> -----------------------------------
>
>                 Key: OPENJPA-912
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-912
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jdbc
>    Affects Versions: 1.2.0, 1.2.1, 1.3.0, 2.0.0-M1, 2.0.0
>            Reporter: Catalina Wei
>            Assignee: Donald Woods
>             Fix For: 1.3.0, 2.0.0
>
>


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


[jira] Commented: (OPENJPA-912) Potential NPE in setInverseRelation

Posted by "Catalina Wei (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENJPA-912?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12675083#action_12675083 ] 

Catalina Wei commented on OPENJPA-912:
--------------------------------------

For tacking purpose, documenting the NPE  in JDBCStoreManager.setInverseRelation().

TestCase : TestChainEntities.testChainEntities

&lt;openjpa-2.0.0-SNAPSHOT-r422266:740991 nonfatal general error&gt; org.apache.openjpa.persistence.PersistenceException: null
at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:968)
at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:862)
at org.apache.openjpa.kernel.DelegatingBroker.find(DelegatingBroker.java:201)
at org.apache.openjpa.persistence.EntityManagerImpl.find(EntityManagerImpl.java:459)
at org.apache.openjpa.persistence.relations.TestChainEntities.getA(TestChainEntities.java:94)
at org.apache.openjpa.persistence.relations.TestChainEntities.chainUpdate(TestChainEntities.java:55)
at org.apache.openjpa.persistence.relations.TestChainEntities.testChainEntities(TestChainEntities.java:50)
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:585)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at org.apache.openjpa.persistence.test.PersistenceTestCase.runBare(PersistenceTestCase.java:443)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at org.apache.openjpa.persistence.test.PersistenceTestCase.run(PersistenceTestCase.java:173)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at sun.reflect.GeneratedMethodAccessor45.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:213)
at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)
at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
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:585)
at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:334)
at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:980)
Caused by: java.lang.NullPointerException
at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.setInverseRelation(JDBCStoreManager.java:395)
at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.initializeState(JDBCStoreManager.java:366)
at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.initialize(JDBCStoreManager.java:264)
at org.apache.openjpa.kernel.DelegatingStoreManager.initialize(DelegatingStoreManager.java:111)
at org.apache.openjpa.kernel.ROPStoreManager.initialize(ROPStoreManager.java:57)
at org.apache.openjpa.kernel.BrokerImpl.initialize(BrokerImpl.java:987)
at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:945)
... 33 more


> Potential NPE in setInverseRelation
> -----------------------------------
>
>                 Key: OPENJPA-912
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-912
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jdbc
>    Affects Versions: 1.2.0, 1.2.1, 1.3.0, 2.0.0-M1, 2.0.0
>            Reporter: Catalina Wei
>            Assignee: Donald Woods
>             Fix For: 1.3.0, 2.0.0
>
>


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


[jira] Assigned: (OPENJPA-912) Potential NPE in setInverseRelation

Posted by "Donald Woods (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-912?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Donald Woods reassigned OPENJPA-912:
------------------------------------

    Assignee: Michael Dick  (was: Donald Woods)

Michael, please review and consider applying to branches/1.2.x.  Thanks.

> Potential NPE in setInverseRelation
> -----------------------------------
>
>                 Key: OPENJPA-912
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-912
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jdbc
>    Affects Versions: 1.2.0, 1.2.1, 1.3.0, 2.0.0-M1, 2.0.0
>            Reporter: Catalina Wei
>            Assignee: Michael Dick
>             Fix For: 1.3.0, 2.0.0
>
>         Attachments: OPENJPA-912-branches12x.patch
>
>


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


[jira] Updated: (OPENJPA-912) Potential NPE in setInverseRelation

Posted by "Donald Woods (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-912?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Donald Woods updated OPENJPA-912:
---------------------------------

    Attachment: OPENJPA-912-branches12x.patch

NPE patch ported from Trunk to 1.2.x, as suggested by Catalina in connection to the OPENJPA-925 patch.


> Potential NPE in setInverseRelation
> -----------------------------------
>
>                 Key: OPENJPA-912
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-912
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jdbc
>    Affects Versions: 1.2.0, 1.2.1, 1.3.0, 2.0.0-M1, 2.0.0
>            Reporter: Catalina Wei
>            Assignee: Donald Woods
>             Fix For: 1.3.0, 2.0.0
>
>         Attachments: OPENJPA-912-branches12x.patch
>
>


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


[jira] Closed: (OPENJPA-912) Potential NPE in setInverseRelation

Posted by "Donald Woods (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-912?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Donald Woods closed OPENJPA-912.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 1.2.1

Applied to 1.2.x.  Thanks Mike.

> Potential NPE in setInverseRelation
> -----------------------------------
>
>                 Key: OPENJPA-912
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-912
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jdbc
>    Affects Versions: 1.2.0, 1.2.1, 1.3.0, 2.0.0-M1, 2.0.0
>            Reporter: Catalina Wei
>            Assignee: Michael Dick
>             Fix For: 1.2.1, 1.3.0, 2.0.0
>
>         Attachments: OPENJPA-912-branches12x.patch
>
>


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