Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 42669 invoked from network); 3 Apr 2008 19:05:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 Apr 2008 19:05:55 -0000 Received: (qmail 90529 invoked by uid 500); 3 Apr 2008 19:05:55 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 90506 invoked by uid 500); 3 Apr 2008 19:05:55 -0000 Mailing-List: contact dev-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openjpa.apache.org Delivered-To: mailing list dev@openjpa.apache.org Received: (qmail 90497 invoked by uid 99); 3 Apr 2008 19:05:55 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Apr 2008 12:05:55 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Apr 2008 19:05:22 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 7B90E234C0BB for ; Thu, 3 Apr 2008 12:03:24 -0700 (PDT) Message-ID: <235590074.1207249404505.JavaMail.jira@brutus> Date: Thu, 3 Apr 2008 12:03:24 -0700 (PDT) From: "Catalina Wei (JIRA)" To: dev@openjpa.apache.org Subject: [jira] Resolved: (OPENJPA-549) Get NPE when running mappingtool against DB2 database In-Reply-To: <1649520447.1206987144383.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/OPENJPA-549?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] 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. SQLSTATE=01550 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. Catalina > Get NPE when running mappingtool against DB2 database > ----------------------------------------------------- > > Key: OPENJPA-549 > URL: https://issues.apache.org/jira/browse/OPENJPA-549 > Project: OpenJPA > Issue Type: Bug > Components: jdbc > Affects Versions: 1.1.0 > Environment: os.name: 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(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) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.