Uploaded image for project: 'OpenJPA'
  1. OpenJPA
  2. OPENJPA-2139

OpenJPA fails to recover from a broken database on startup

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Critical
    • Resolution: Unresolved
    • 2.2.0
    • None
    • None
    • None

    Description

      The following scenario:

      1.) turn off the database
      2.) perform a query against the database
      3.) turn on the database
      4.) try to re-run the query from 2.)

      In 4.) you will get the following Exception:

      openjpa-2.2.0-r422266:1244990 nonfatal user error> org.apache.openjpa.persistence.ArgumentException: An error occurred while parsing the query filter "SELECT k FROM DbEnumKey AS k where k.type=:typ ORDER BY k.ordinal". Error message: The name "DbEnumKey" is not a recognized entity or identifier. Known entity names: []

      Basically the whole app is stale afterwards!

      Solution: caching the entities might only be done if a connection can be established.

      Attachments

        1. OPENJPA-2139.patch
          3 kB
          Mark Struberg
        2. OPENJPA-2139.mdr.patch
          5 kB
          Richard G. Curtis
        3. OPENJPA-2139-1.2.x.patch
          8 kB
          Heath Thomann
        4. OPENJPA-2139-1.2.x-v2.patch
          12 kB
          Heath Thomann

        Activity

          People

            struberg Mark Struberg
            struberg Mark Struberg
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: