openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Catalina Wei (JIRA)" <>
Subject [jira] Resolved: (OPENJPA-549) Get NPE when running mappingtool against DB2 database
Date Thu, 03 Apr 2008 19:03:24 GMT


Catalina Wei resolved OPENJPA-549.

    Resolution: Won't Fix

In connection-less situation, we don't know the back-end DB2 version. so we
 cannot generate "Create Index" DDL unconditionally in connection-less situations.

The rational is that index on the primary key column is auto-created by DB2 NT/Linux version
8 or later  and DB2 ZOS version 9.

    A manual "create index "on primary key column results in following error on DB2NT/Linux
(but tolerated by DB2 ZOS version 9):
         SQL0605W  The index was not created because an index
         "SYSIBM.SQL080327142322600" with a matching definition already exists.

Index on primary key column is required in DB2 ZOS version 8 or earlier versions, the method
createIndexIfNecessary() in DB2Dictionary is for this purpose.

We think the DDL generated by the MappingTool is likely needing modification for DB2 ZOS back-ends.
DDLs for table space creation, Auxiliary table creation required for BLOB/CLOB columns, are
the examples that require user interventions.

In connection-less situations, we think it is OK  not generating the  Create Index DDL.

Since the NullPointerException problem is fixed in OPENJPA-555, no more fix will be done to
this issue.


> Get NPE when running mappingtool against DB2 database
> -----------------------------------------------------
>                 Key: OPENJPA-549
>                 URL:
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jdbc
>    Affects Versions: 1.1.0
>         Environment: Windows XP
> os.version: 5.1
> os.arch: x86
> java.version: 1.6.0_02
> java.vendor: BEA Systems, Inc.
>            Reporter: Amy Yang
>            Assignee: Catalina Wei
>   Original Estimate: 24h
>  Remaining Estimate: 24h
> When running mappintool aginast DB2, under certain case NPE will be thrown:
> java.lang.NullPointerException
>      at 
> org.apache.openjpa.jdbc.sql.DB2Dictionary.isDB2ZOSV8xOrLater(
>      at 
> org.apache.openjpa.jdbc.sql.DB2Dictionary.createIndexIfNecessary(
>      at 
> org.apache.openjpa.jdbc.kernel.TableJDBCSeq.addSchema(
>      at 
> org.apache.openjpa.jdbc.meta.MappingTool.addSequenceComponents(
>      at 
> org.apache.openjpa.jdbc.meta.MappingTool.addSequenceComponents(
>      at org.apache.openjpa.jdbc.meta.MappingTool.record(
>      at
>      at 
> org.apache.openjpa.jdbc.ant.MappingToolTask.executeOn(
>      at 
> org.apache.openjpa.lib.ant.AbstractTask.execute(
>      at
>      at
>      at
>      at
>      at

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message