OpenJPA
  1. OpenJPA
  2. OPENJPA-1350

Race condition in the MetaDataRepository

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.0.3, 1.2.1, 2.0.0-M3
    • Fix Version/s: 1.2.3, 1.3.0, 2.0.0-beta
    • Component/s: kernel
    • Labels:
      None

      Description

      There is a race condition in the MetaDataRepository where if multiple threads try to get MetaData for the same alias, one or more of the threads can get incorrect data. This can only occur on the first (few) thread(s). After init is complete, the problem does not occur.

      The error that is observed is the following:
      <openjpa-2.0.0-SNAPSHOT-r422266:824454M fatal user error> org.apache.openjpa.util.MetaDataException: Could not locate metadata for the class using alias "MdrTestEntity". Perhap
      s you meant MdrTestEntity, which is a close match. This could mean that you have mis-spelled the alias, or that OpenJPA failed to properly load the metadata for the type whose
      alias is "MdrTestEntity". Registered alias mappings: "

      {MdrTestEntity=[class org.apache.openjpa.persistence.meta.MdrTestEntity]}

      "

      1. OPENJPA-1350-1.2.x.patch
        13 kB
        Jody Grassel
      2. OJ1350_1.0.x.patch
        14 kB
        Jody Grassel
      3. OPENJPA-1350-1.2.x.patch
        11 kB
        Rick Curtis

        Activity

        Donald Woods made changes -
        Fix Version/s 1.3.0 [ 12313326 ]
        Fix Version/s 2.0.0-beta [ 12314149 ]
        Fix Version/s 2.0.0 [ 12314019 ]
        Rick Curtis made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Rick Curtis made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 1.2.3 [ 12314517 ]
        Fix Version/s 2.0.0 [ 12314019 ]
        Resolution Fixed [ 1 ]
        Jody Grassel made changes -
        Attachment OPENJPA-1350-1.2.x.patch [ 12427215 ]
        Jody Grassel made changes -
        Attachment OJ1350_1.0.x.patch [ 12424640 ]
        Rick Curtis made changes -
        Affects Version/s 2.0.0-M3 [ 12314148 ]
        Affects Version/s 1.2.1 [ 12313328 ]
        Affects Version/s 1.0.3 [ 12312969 ]
        Rick Curtis made changes -
        Attachment OPENJPA-1350-1.2.x.patch [ 12422820 ]
        Rick Curtis made changes -
        Field Original Value New Value
        Assignee Rick Curtis [ curtisr7 ]
        Rick Curtis created issue -

          People

          • Assignee:
            Rick Curtis
            Reporter:
            Rick Curtis
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development