OpenJPA
  1. OpenJPA
  2. OPENJPA-1998

NPE getTableNameForMetadata when running SchemaTool reflect against Postgres DB

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: 2.1.0
    • Fix Version/s: 2.2.0
    • Component/s: jdbc
    • Labels:
      None
    • Environment:
      Windows 7, Eclipse Helios 3.6.2, remote Postgres DB 8.4. on Debian squeeze

      Description

      When running the SchemaTool to reverse a DB Schema, an NPE occurs at getTableNameForMetadata for foreign keys (tables and pk / uq indices works correctly!) Debugging shows that the tableName parameter is null when invoked. The NPE is caused by the invocation of tableName.getUnqualifiedName() ... tableName is still null at that point!

      1. output.txt
        42 kB
        John Boblitz

        Issue Links

          Activity

          Hide
          John Boblitz added a comment -

          Thanks!

          Show
          John Boblitz added a comment - Thanks!
          Hide
          Michael Dick added a comment -

          Fixed in OPENJPA-1987 in trunk.

          Show
          Michael Dick added a comment - Fixed in OPENJPA-1987 in trunk.
          Hide
          John Boblitz added a comment -

          Further debugging and experimenting led me to the attribute "supportsNullTableForGetImportedKeys" which is set to true in the PostgresDictionary class. Changing this to false in DBDictionary:4325 solves the problem.

          Show
          John Boblitz added a comment - Further debugging and experimenting led me to the attribute "supportsNullTableForGetImportedKeys" which is set to true in the PostgresDictionary class. Changing this to false in DBDictionary:4325 solves the problem.
          Hide
          John Boblitz added a comment -

          The Console output

          Show
          John Boblitz added a comment - The Console output

            People

            • Assignee:
              Michael Dick
              Reporter:
              John Boblitz
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development