Return-Path: Delivered-To: apmail-db-ddlutils-dev-archive@www.apache.org Received: (qmail 9488 invoked from network); 4 Feb 2009 02:28:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Feb 2009 02:28:21 -0000 Received: (qmail 62605 invoked by uid 500); 4 Feb 2009 02:28:21 -0000 Delivered-To: apmail-db-ddlutils-dev-archive@db.apache.org Received: (qmail 62534 invoked by uid 500); 4 Feb 2009 02:28:20 -0000 Mailing-List: contact ddlutils-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ddlutils-dev@db.apache.org Delivered-To: mailing list ddlutils-dev@db.apache.org Received: (qmail 62518 invoked by uid 99); 4 Feb 2009 02:28:20 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Feb 2009 18:28:20 -0800 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; Wed, 04 Feb 2009 02:28:19 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 8D272234C48B for ; Tue, 3 Feb 2009 18:27:59 -0800 (PST) Message-ID: <660054460.1233714479573.JavaMail.jira@brutus> Date: Tue, 3 Feb 2009 18:27:59 -0800 (PST) From: "Dave Lindsey (JIRA)" To: ddlutils-dev@db.apache.org Subject: [jira] Created: (DDLUTILS-239) NullPointerException in JdbcModelReader.readTable (fix included) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org NullPointerException in JdbcModelReader.readTable (fix included) ---------------------------------------------------------------- Key: DDLUTILS-239 URL: https://issues.apache.org/jira/browse/DDLUTILS-239 Project: DdlUtils Issue Type: Bug Components: Core (No specific database) Affects Versions: 1.0 Environment: Oracle 9i with nested tables Reporter: Dave Lindsey Assignee: Thomas Dudziak JdbcModelReader protected Table readTable(DatabaseMetaDataWrapper metaData, Map values) throws SQLException for (Iterator it = primaryKeys.iterator(); it.hasNext();) { table.findColumn((String)it.next(), true).setPrimaryKey(true); } This happens on Oracle 9i, but it could happen with other dbs. There are inner tables which have no columns, but do have a PKs defined. findColumn() returns null and the code tries to set a value on it To get past this: for (Iterator it = primaryKeys.iterator(); it.hasNext();) { String pk = (String)it.next(); Column col = table.findColumn(pk, true); if(col == null) {continue;} col.setPrimaryKey(true); // table.findColumn((String)it.next(), true).setPrimaryKey(true); } I'm not sure what a this means for the the xml output. IMO, a comment should be added to xml output stating what was skipped. Thanks, Dave -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.