OpenJPA
  1. OpenJPA
  2. OPENJPA-2257

Concurreny in org.apache.openjpa.persistence.EntityManagerImpl.getProperties leads to NullPointer and ConcurrentModificationException

    Details

      Description

      A call of EntityManager.getProperties() can lead to NullPointer and ConcurrentModificationException. Issue occurs right after start up of the overlying JEE application if multiple EntityManager instance are created at same time.

      Please find the issued stack trace below:

      Caused by: java.lang.NullPointerException
      at java.lang.String.compareTo(String.java:482)
      at java.lang.String.compareTo(String.java:31)
      at java.util.TreeMap.cmp(TreeMap.java:4514)
      at java.util.TreeMap.putImpl(TreeMap.java:4556)
      at java.util.TreeMap.put(TreeMap.java:4536)
      at java.util.TreeSet.add(TreeSet.java:122)
      at
      org.apache.openjpa.lib.conf.ConfigurationImpl.getPropertyKeys(ConfigurationImpl.java:708)
      at
      org.apache.openjpa.kernel.BrokerImpl.getSupportedProperties(BrokerImpl.java:729)
      at
      org.apache.openjpa.kernel.DelegatingBroker.getSupportedProperties(DelegatingBroker.java:223)
      at
      org.apache.openjpa.persistence.EntityManagerImpl.getProperties(EntityManagerImpl.java:1624)
      ... 33 more

      1. OPENJPA-2257.patch
        4 kB
        Albert Lee
      2. OpenJPABugTest.zip
        7.74 MB
        Stephan Hagedorn

        Activity

        Stephan Hagedorn created issue -
        Stephan Hagedorn made changes -
        Field Original Value New Value
        Attachment OpenJPABugTest.zip [ 12543526 ]
        Albert Lee made changes -
        Assignee Albert Lee [ allee8285 ]
        Albert Lee made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 2.3.0 [ 12319463 ]
        Resolution Fixed [ 1 ]
        Albert Lee made changes -
        Attachment OPENJPA-2257.patch [ 12544051 ]
        Albert Lee made changes -
        Fix Version/s 2.1.2 [ 12317142 ]
        Fix Version/s 2.2.2 [ 12323356 ]
        Fix Version/s 2.2.1.1 [ 12323484 ]
        Albert Lee made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Albert Lee
            Reporter:
            Stephan Hagedorn
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development