OpenJPA
  1. OpenJPA
  2. OPENJPA-602

NullPointerException at org.apache.openjpa.jdbc.meta.strats.RelationToManyInverseKeyFieldStrategy.map

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.1.0
    • Fix Version/s: 1.2.0
    • Component/s: jdbc
    • Labels:
      None

      Description

      The example I'll attach crashes with an NPE when running the mappingtool.

      Caused by: java.lang.NullPointerException
      at org.apache.openjpa.jdbc.meta.strats.RelationToManyInverseKeyFieldStrategy.map(RelationToManyInverseKeyFieldStrategy.java:136)
      at org.apache.openjpa.jdbc.meta.strats.RelationCollectionInverseKeyFieldStrategy.map(RelationCollectionInverseKeyFieldStrategy.java:95)
      at org.apache.openjpa.jdbc.meta.FieldMapping.setStrategy(FieldMapping.java:120)
      at org.apache.openjpa.jdbc.meta.RuntimeStrategyInstaller.installStrategy(RuntimeStrategyInstaller.java:80)
      at org.apache.openjpa.jdbc.meta.FieldMapping.resolveMapping(FieldMapping.java:438)
      at org.apache.openjpa.jdbc.meta.FieldMapping.resolve(FieldMapping.java:403)
      at org.apache.openjpa.jdbc.meta.ClassMapping.resolveMapping(ClassMapping.java:812)

      The goal of this JIRA is not (neccessarily) to support the kind of mapping that would be required for this (which may be hard), but to at least print a clear error and not an NPE...

      1. FullStackTrace-OPENJPA-602.txt
        3 kB
        Michael Vorburger
      2. OneToMany-test.zip
        109 kB
        Michael Vorburger

        Activity

        Michael Vorburger created issue -
        Michael Vorburger made changes -
        Field Original Value New Value
        Attachment OneToMany-test.zip [ 12382032 ]
        Michael Vorburger made changes -
        Attachment FullStackTrace-OPENJPA-602.txt [ 12382033 ]
        Pinaki Poddar made changes -
        Assignee Pinaki Poddar [ ppoddar@apache.org ]
        Pinaki Poddar made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Michael Dick made changes -
        Fix Version/s 1.2.0 [ 12313102 ]
        Donald Woods made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Pinaki Poddar
            Reporter:
            Michael Vorburger
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development