Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 98346 invoked from network); 3 Apr 2008 14:33:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 Apr 2008 14:33:08 -0000 Received: (qmail 68173 invoked by uid 500); 3 Apr 2008 14:33:08 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 68156 invoked by uid 500); 3 Apr 2008 14:33:08 -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 68147 invoked by uid 99); 3 Apr 2008 14:33:08 -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 07:33:08 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of catalina.wei@gmail.com designates 209.85.200.175 as permitted sender) Received: from [209.85.200.175] (HELO wf-out-1314.google.com) (209.85.200.175) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Apr 2008 14:32:27 +0000 Received: by wf-out-1314.google.com with SMTP id 29so3182118wff.24 for ; Thu, 03 Apr 2008 07:32:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; bh=Zgr2Hw+BmOsgEN6nyxIVHaGsajjNMx07koBTNSgDRgY=; b=OzKjmwlRQpOgmQ2EXBqBLWc+lsSZrdxPxp/d3ysUQ2lkQBz2m+WPhjYvYduanuODIy5qYnftXeb2FNrQtgVZR22FVbQpHY0k+TTPM8L11vjXA4h6DO/C2wQJ6cgAXs/uoOWCpCetQQrSVaU3Dn791Xwry3MGmVQPHUx8zNv+S5M= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=Myh7gctvW+CF8dCInr+4dsWhJpPSTUMwpFcoblwclhxc1p3fYi1OIWRyJXC6chrFiG2FIt0pfD5C16NjpRX/TuPiDsrG6Or9AKMS6PgPLTnG/bxJSsbaxInXM1xcytMX70bHYPnEXAPp7wc7QReXuPPbF1esMAG29Sz3tqLC6Qg= Received: by 10.142.13.13 with SMTP id 13mr7114604wfm.211.1207233158773; Thu, 03 Apr 2008 07:32:38 -0700 (PDT) Received: by 10.142.211.16 with HTTP; Thu, 3 Apr 2008 07:32:38 -0700 (PDT) Message-ID: Date: Thu, 3 Apr 2008 07:32:38 -0700 From: "catalina wei" To: dev@openjpa.apache.org Subject: Re: [jira] Commented: (OPENJPA-555) MappingTool got NullPointerException in DB2Dictionary.isDB2ZOSV8xOrLater() In-Reply-To: <105862213.1207228104240.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_1114_24071209.1207233158761" References: <448640575.1207201584348.JavaMail.jira@brutus> <105862213.1207228104240.JavaMail.jira@brutus> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_1114_24071209.1207233158761 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi Kevin, There is issue OPENJPA-549 addressing your concern -- if DB2Dictionary has not been initialized, what should be the default version of DB2. OPENJPA-555 is only fixing a bad coding style to avoid null pointer exception. Catalina On 4/3/08, Kevin Sutter (JIRA) wrote: > > > [ > https://issues.apache.org/jira/browse/OPENJPA-555?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12585096#action_12585096] > > Kevin Sutter commented on OPENJPA-555: > -------------------------------------- > > 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. > > > > > MappingTool got NullPointerException in > DB2Dictionary.isDB2ZOSV8xOrLater() > > > -------------------------------------------------------------------------- > > > > Key: OPENJPA-555 > > URL: https://issues.apache.org/jira/browse/OPENJPA-555 > > Project: OpenJPA > > Issue Type: Bug > > Components: jdbc > > Reporter: Catalina Wei > > Assignee: Catalina Wei > > Fix For: 1.0.3, 1.1.0 > > > > > > 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. > > > -- > This message is automatically generated by JIRA. > - > You can reply to this email to add a comment to the issue online. > > ------=_Part_1114_24071209.1207233158761--