Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 53591 invoked from network); 25 Jan 2008 07:57:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 25 Jan 2008 07:57:09 -0000 Received: (qmail 38491 invoked by uid 500); 25 Jan 2008 07:56:56 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 38459 invoked by uid 500); 25 Jan 2008 07:56:56 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 38445 invoked by uid 99); 25 Jan 2008 07:56:55 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Jan 2008 23:56:55 -0800 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Jan 2008 07:56:46 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id AB8D871422B for ; Thu, 24 Jan 2008 23:56:38 -0800 (PST) Message-ID: <4874610.1201247798700.JavaMail.jira@brutus> Date: Thu, 24 Jan 2008 23:56:38 -0800 (PST) From: "Knut Anders Hatlen (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Updated: (DERBY-3352) truncateTable crashed, Caused by: java.lang.NullPointerException In-Reply-To: <6457666.1201232556368.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DERBY-3352?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:all-tabpanel ] Knut Anders Hatlen updated DERBY-3352: -------------------------------------- Fix Version/s: (was: 10.0.2.2) > truncateTable crashed, Caused by: java.lang.NullPointerException > ---------------------------------------------------------------- > > Key: DERBY-3352 > URL: https://issues.apache.org/jira/browse/DERBY-3352 > Project: Derby > Issue Type: Bug > Components: Services > Affects Versions: 10.3.1.4, 10.3.2.1 > Environment: Windows XP.SP2 , Eclipse 3.2.2 , JDK 1.5_05=20 > Reporter: QingpingXu > Priority: Critical > > Since derby 10.3.2.1, when truncate a table which has index , a java.lang= .NullPointerException is throwed;but the same src runs successfully with de= rby 10.2.2.0=E3=80=82 > here's the example source code and stack trace: > Src: > public static void main(String[] args) > =09{ > =09=09 > =09=09try > =09=09{ > =09=09=09Class.forName("org.apache.derby.jdbc.EmbeddedDriver"); > =09=09=09 > =09=09=09Connection conn =3D DriverManager.getConnection("jdbc:derby:test= ;create=3Dtrue"); > =09=09=09 > =09=09=09Statement stat =3D conn.createStatement(); > =09=09=09stat.executeUpdate("create table m (uri varchar(256),f int)"); > =09=09=09stat.executeUpdate("create index aa on m (uri)"); > =09=09=09stat.executeUpdate("truncate table m"); > =09=09=09 > =09=09=09System.out.println("Truncate table m successfully=EF=BC=81"); > =09=09} > =09=09catch (Exception ex) > =09=09{ > =09=09=09ex.printStackTrace(); > =09=09} > =09} > Error: > java.sql.SQLException: Java Exception:":java.lang.NullPointerException"= =E3=80=82 > =09at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLE= xceptionFactory.java:45) > =09at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Util.java:88) > =09at org.apache.derby.impl.jdbc.Util.javaException(Util.java:245) > =09at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLExcepti= on(TransactionResourceImpl.java:403) > =09at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(= TransactionResourceImpl.java:346) > =09at org.apache.derby.impl.jdbc.EmbedConnection.handleException(EmbedCon= nection.java:1574) > =09at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Connecti= onChild.java:81) > =09at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedSta= tement.java:1315) > =09at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.ja= va:618) > =09at org.apache.derby.impl.jdbc.EmbedStatement.executeUpdate(EmbedStatem= ent.java:176) > =09at update.UpdateURI.main(UpdateURI.java:34) > Caused by: java.lang.NullPointerException > =09at org.apache.derby.impl.sql.execute.AlterTableConstantAction.truncate= Table(AlterTableConstantAction.java:1462) > =09at org.apache.derby.impl.sql.execute.AlterTableConstantAction.executeC= onstantAction(AlterTableConstantAction.java:531) > =09at org.apache.derby.impl.sql.execute.MiscResultSet.open(MiscResultSet.= java:64) > =09at org.apache.derby.impl.sql.GenericPreparedStatement.execute(GenericP= reparedStatement.java:370) > =09at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedSta= tement.java:1225) > =09... 3 more --=20 This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.