Return-Path: Delivered-To: apmail-db-jdo-dev-archive@www.apache.org Received: (qmail 6348 invoked from network); 19 Sep 2009 14:04:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 19 Sep 2009 14:04:41 -0000 Received: (qmail 27069 invoked by uid 500); 19 Sep 2009 14:04:41 -0000 Mailing-List: contact jdo-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jdo-dev@db.apache.org Delivered-To: mailing list jdo-dev@db.apache.org Received: (qmail 27059 invoked by uid 99); 19 Sep 2009 14:04:41 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 19 Sep 2009 14:04:41 +0000 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; Sat, 19 Sep 2009 14:04:37 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 3943C234C044 for ; Sat, 19 Sep 2009 07:04:16 -0700 (PDT) Message-ID: <856188870.1253369056229.JavaMail.jira@brutus> Date: Sat, 19 Sep 2009 07:04:16 -0700 (PDT) From: "Michael Bouschen (JIRA)" To: jdo-dev@db.apache.org Subject: [jira] Resolved: (JDO-640) NPE when running tck in debug mode In-Reply-To: <1953290542.1252707357610.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/JDO-640?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Michael Bouschen resolved JDO-640. ---------------------------------- Resolution: Fixed Checked in the patch (revision 816927). > NPE when running tck in debug mode > ---------------------------------- > > Key: JDO-640 > URL: https://issues.apache.org/jira/browse/JDO-640 > Project: JDO > Issue Type: Bug > Components: tck2 > Affects Versions: JDO 2 maintenance release 2 > Reporter: Michael Bouschen > Assignee: Michael Bouschen > Fix For: JDO 2 maintenance release 3 > > Attachments: JDO-640.patch, TCK-results.txt > > > A couple of test configurations fail with a NPE when running the tck in debug mode, e.g.: > [java] Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public org.apache.jdo.tck.pc.companyMapWithoutJoin.ICompany org.apache.jdo.tck.pc.companyMapWithoutJoin.CompanyFactoryAbstractImpl.newCompany(long,java.lang.String,java.util.Date)] threw exception; nested exception is java.lang.NullPointerException > [java] Caused by: java.lang.NullPointerException > [java] at java.util.Calendar.setTime(Calendar.java:1037) > [java] at java.text.SimpleDateFormat.format(SimpleDateFormat.java:803) > [java] at java.text.SimpleDateFormat.format(SimpleDateFormat.java:796) > [java] at java.text.DateFormat.format(DateFormat.java:314) > [java] at org.apache.jdo.tck.pc.companyMapWithoutJoin.Company.getFieldRepr(Company.java:177) > [java] at org.apache.jdo.tck.pc.companyMapWithoutJoin.Company.toString(Company.java:166) > [java] at java.lang.String.valueOf(String.java:2615) > [java] at java.lang.StringBuilder.append(StringBuilder.java:116) > [java] at org.apache.jdo.tck.pc.companyMapWithoutJoin.CompanyFactoryAbstractImpl.newCompany(CompanyFactoryAbstractImpl.java:55) > When running in debug mode the new Company method prints the created instance, before the field values are initialized. So any date fields are still null and the code in getRepr runs into the NPE for a null date field. > To enable the debug mode, replace line > log4j.logger.org.apache.jdo.tck = INFO, TCK > by > log4j.logger.org.apache.jdo.tck = DEBUG, TCK > in file src/conf/log4j.properties. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.