openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rick Curtis (JIRA)" <j...@apache.org>
Subject [jira] Created: (OPENJPA-1630) NPE in MetaDataRepository when preloading is enabled under heavy stress.
Date Tue, 13 Apr 2010 19:34:50 GMT
NPE in MetaDataRepository when preloading is enabled under heavy stress.
------------------------------------------------------------------------

                 Key: OPENJPA-1630
                 URL: https://issues.apache.org/jira/browse/OPENJPA-1630
             Project: OpenJPA
          Issue Type: Bug
          Components: kernel
    Affects Versions: 2.0.0-beta3, 1.2.2, 2.0.0, 2.0.1, 2.1.0
            Reporter: Rick Curtis
            Assignee: Rick Curtis


A timing window exists in the MetaDataRepository where the following[1] NPE can be encountered.
It is incorrect to assume that calling processRegisteredClasses at the end of preload would
process all registered classes. As it turns out, that call does process all registered classes
that this instance of the MDR cares about. The problem comes in when after the MDR is preloaded,
Entities that belong to a different PU are registered with the PCRegistry and they are added
to the _registered list. 

[1] Caused by: java.lang.NullPointerException
        at org.apache.openjpa.meta.MetaDataRepository.processRegisteredClasses(MetaDataRepository.java:1622)
        at org.apache.openjpa.meta.ClassMetaData.getPCSubclasses(ClassMetaData.java:364)
        at org.apache.openjpa.meta.ClassMetaData.getPCSubclassMetaDatas(ClassMetaData.java:381)
        at org.apache.openjpa.meta.ClassMetaData.getMappedPCSubclassMetaDatas(ClassMetaData.java:403)
        at org.apache.openjpa.jdbc.meta.ClassMapping.getMappedPCSubclassMappings(ClassMapping.java:628)
        at org.apache.openjpa.jdbc.meta.ClassMapping.getIndependentAssignableMappings(ClassMapping.java:667)
        at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.initializeState(JDBCStoreManager.java:380)
        at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.initialize(JDBCStoreManager.java:342)
        at com.ibm.ws.persistence.jdbc.kernel.WsJpaJDBCStoreManager.initialize(WsJpaJDBCStoreManager.java:147)
        at org.apache.openjpa.kernel.DelegatingStoreManager.initialize(DelegatingStoreManager.java:112)
        at org.apache.openjpa.kernel.ROPStoreManager.initialize(ROPStoreManager.java:57)
        at org.apache.openjpa.kernel.BrokerImpl.initialize(BrokerImpl.java:1005)
        at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:963)
        ... 46 more

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message