Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.0.3, 1.1.0
    • Component/s: jdbc
    • Labels:
      None

      Description

      MappingTool got NullPointerException in DB2Dictionary.isDB2ZOSV8xOrLater()
      As reported by Amy :
      java.lang.NullPointerException
      at
      org.apache.openjpa.jdbc.sql.DB2Dictionary.isDB2ZOSV8xOrLater(DB2Dictionary.java:392)

      at
      org.apache.openjpa.jdbc.sql.DB2Dictionary.createIndexIfNecessary(DB2Dictionary.java:784)

      at
      org.apache.openjpa.jdbc.kernel.TableJDBCSeq.addSchema(TableJDBCSeq.java:244)

      at
      org.apache.openjpa.jdbc.meta.MappingTool.addSequenceComponents(MappingTool.java:609)

      at
      org.apache.openjpa.jdbc.meta.MappingTool.addSequenceComponents(MappingTool.java:591)

      at
      org.apache.openjpa.jdbc.meta.MappingTool.record(MappingTool.java:477)
      at org.apache.openjpa.jdbc.meta.MappingTool.run(MappingTool.java:1075)
      at
      org.apache.openjpa.jdbc.ant.MappingToolTask.executeOn(MappingToolTask.java:197)

      at
      org.apache.openjpa.lib.ant.AbstractTask.execute(AbstractTask.java:172)
      at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)

      at org.apache.tools.ant.Task.perform(Task.java:364)
      at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:64)

      at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)

      at org.apache.tools.ant.Task.perform(Task.java:364)

      The scenario is using the ant task of MappingTool to build schema
      for some JDO classes.

        Activity

        Hide
        mikedd Michael Dick added a comment -

        Looks like Catalina's fix was committed a while back. I'm resolving the issue on her behalf.

        Show
        mikedd Michael Dick added a comment - Looks like Catalina's fix was committed a while back. I'm resolving the issue on her behalf.
        Hide
        mikedd Michael Dick added a comment -

        Clicked too quick. This is already fixed in 1.0.3 and 1.1.0

        Show
        mikedd Michael Dick added a comment - Clicked too quick. This is already fixed in 1.0.3 and 1.1.0
        Hide
        ppoddar@apache.org Pinaki Poddar added a comment -

        revision 675387. Did not notice this JIRA issue before commit.

        Show
        ppoddar@apache.org Pinaki Poddar added a comment - revision 675387. Did not notice this JIRA issue before commit.
        Hide
        mikedd Michael Dick added a comment -

        Defer to next release.

        Show
        mikedd Michael Dick added a comment - Defer to next release.
        Hide
        pcl Patrick Linskey added a comment -

        This is sufficiently resolved in 1.1.0; removing from the 1.1.0 milestone.

        Show
        pcl Patrick Linskey added a comment - This is sufficiently resolved in 1.1.0; removing from the 1.1.0 milestone.
        Hide
        allee8285 Albert Lee added a comment -

        This looks like the same problem reported in OPENJPA-549.

        Albert Lee.

        Show
        allee8285 Albert Lee added a comment - This looks like the same problem reported in OPENJPA-549 . Albert Lee.
        Hide
        kwsutter Kevin Sutter added a comment -

        Catalina, is the check for a null databaseProductName sufficient? I mean, if the DB2Dictionary has not been initialized, then your changed methods will now be returning "false". But, we very well could be using one of the versions of DB2. We just haven't initialized and, thus, we don't know whether we're using one of the desired versions of DB2. Especially since we're dealing with the MappingTool. I would assume that we make some decisions on how to perform the mapping based on the version of DB2 that we're using. Otherwise, why would these methods be invoked in the first place? From the text in the forum, it sounds like with this change, the index won't automatically be created if we fall into this scenario. This just doesn't sound like the right fix. Please justify. Thanks.

        Show
        kwsutter Kevin Sutter added a comment - Catalina, is the check for a null databaseProductName sufficient? I mean, if the DB2Dictionary has not been initialized, then your changed methods will now be returning "false". But, we very well could be using one of the versions of DB2. We just haven't initialized and, thus, we don't know whether we're using one of the desired versions of DB2. Especially since we're dealing with the MappingTool. I would assume that we make some decisions on how to perform the mapping based on the version of DB2 that we're using. Otherwise, why would these methods be invoked in the first place? From the text in the forum, it sounds like with this change, the index won't automatically be created if we fall into this scenario. This just doesn't sound like the right fix. Please justify. Thanks.

          People

          • Assignee:
            fancy Catalina Wei
            Reporter:
            fancy Catalina Wei
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development