Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 21618 invoked from network); 11 Nov 2007 23:43:14 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 11 Nov 2007 23:43:14 -0000 Received: (qmail 74027 invoked by uid 500); 11 Nov 2007 23:43:01 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 73988 invoked by uid 500); 11 Nov 2007 23:43:01 -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 73979 invoked by uid 99); 11 Nov 2007 23:43:01 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 11 Nov 2007 15:43:01 -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; Sun, 11 Nov 2007 23:43:10 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 9D8B8714208 for ; Sun, 11 Nov 2007 15:42:50 -0800 (PST) Message-ID: <2791591.1194824570626.JavaMail.jira@brutus> Date: Sun, 11 Nov 2007 15:42:50 -0800 (PST) From: "Charlie Hubbard (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Commented: (DERBY-3175) NullPointerException on INSERT after ALTER TABLE ... DROP COLUMN In-Reply-To: <31539674.1194340070719.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/DERBY-3175?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12541670 ] Charlie Hubbard commented on DERBY-3175: ---------------------------------------- I finally built derby with the patches. I tested the bug.sql on it before patching it and received the assertion problem I posted earlier. I then patched the source code and retested with bug.sql and it completed successfully. I copied the files over and tried it out on my environment, and unfortunately, I still experienced the issue. I don't know if this is the same exception as before, but it looks like it: Any ideas? 2007-11-11 18:35:08,224 [Mail loader] WARN org.hibernate.util.JDBCExceptionReporter - SQL Error: 0, SQLState: XJ001 2007-11-11 18:35:08,224 [Mail loader] ERROR org.hibernate.util.JDBCExceptionReporter - Java exception: ': java.lang.NullPointerException'. 2007-11-11 18:35:08,240 [Mail loader] ERROR com.emailarchive.demon.MailIndexer - could not execute query org.hibernate.exception.GenericJDBCException: could not execute query at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103) at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43) at org.hibernate.loader.Loader.doList(Loader.java:2223) at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104) at org.hibernate.loader.Loader.list(Loader.java:2099) at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:378) at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338) at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172) at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121) at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79) at org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:811) at com.emailarchive.web.model.EmailAddressDao.createIfNotExists(EmailAddressDao.java:21) at com.emailarchive.web.model.MessageDao.createEmailIfNotExists(MessageDao.java:124) at com.emailarchive.web.model.MessageDao.create(MessageDao.java:111) at com.emailarchive.demon.MailIndexer.process(MailIndexer.java:49) at com.emailarchive.demon.MailDemonLoader.saveMessages(MailDemonLoader.java:89) at com.emailarchive.demon.MailDemonLoader.archiveMessages(MailDemonLoader.java:57) at com.emailarchive.demon.MailDemonLoader.run(MailDemonLoader.java:41) at java.util.TimerThread.mainLoop(Timer.java:512) at java.util.TimerThread.run(Timer.java:462) Caused by: java.sql.SQLException: Java exception: ': java.lang.NullPointerException'. at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:45) at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Util.java:88) at org.apache.derby.impl.jdbc.Util.javaException(Util.java:245) at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(TransactionResourceImpl.java:403) at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(TransactionResourceImpl.java:346) at org.apache.derby.impl.jdbc.EmbedConnection.handleException(EmbedConnection.java:1573) at org.apache.derby.impl.jdbc.ConnectionChild.handleException(ConnectionChild.java:81) at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java:1293) at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(EmbedPreparedStatement.java:1652) at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeQuery(EmbedPreparedStatement.java:275) at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:186) at org.hibernate.loader.Loader.getResultSet(Loader.java:1787) at org.hibernate.loader.Loader.doQuery(Loader.java:674) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236) at org.hibernate.loader.Loader.doList(Loader.java:2220) ... 17 more Caused by: java.lang.NullPointerException at org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.finishAndRTS(BasicNoPutResultSetImpl.java:634) at org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.finish(BasicNoPutResultSetImpl.java:607) at org.apache.derby.impl.sql.execute.BaseActivation.close(BaseActivation.java:351) at org.apache.derby.impl.sql.GenericActivationHolder.execute(GenericActivationHolder.java:304) at org.apache.derby.impl.sql.GenericPreparedStatement.execute(GenericPreparedStatement.java:368) at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java:1203) ... 24 more > NullPointerException on INSERT after ALTER TABLE ... DROP COLUMN > ---------------------------------------------------------------- > > Key: DERBY-3175 > URL: https://issues.apache.org/jira/browse/DERBY-3175 > Project: Derby > Issue Type: Bug > Components: SQL > Affects Versions: 10.3.1.4, 10.4.0.0 > Reporter: Knut Anders Hatlen > Assignee: Bryan Pendleton > Attachments: bug.sql, d3175_codeChangeOnly.diff, fixWith3177Case.diff, fixWithTest.diff, preserveAutoincValue.diff > > > ij version 10.3 > ij> connect 'jdbc:derby:bugdb;create=true'; > ij> create table t ( > x varchar(12), > y varchar(12), > id int primary key generated by default as identity > ); > 0 rows inserted/updated/deleted > ij> alter table t drop column y; > 0 rows inserted/updated/deleted > ij> insert into t(x) values 'a'; > ERROR XJ001: Java exception: ': java.lang.NullPointerException'. > java.sql.SQLException: Java exception: ': java.lang.NullPointerException'. > at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source) > at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source) > at org.apache.derby.impl.jdbc.Util.javaException(Unknown Source) > at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown Source) > at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source) > at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source) > at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source) > at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source) > at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source) > at org.apache.derby.impl.tools.ij.ij.executeImmediate(Unknown Source) > at org.apache.derby.impl.tools.ij.utilMain.doCatch(Unknown Source) > at org.apache.derby.impl.tools.ij.utilMain.runScriptGuts(Unknown Source) > at org.apache.derby.impl.tools.ij.utilMain.go(Unknown Source) > at org.apache.derby.impl.tools.ij.Main.go(Unknown Source) > at org.apache.derby.impl.tools.ij.Main.mainCore(Unknown Source) > at org.apache.derby.impl.tools.ij.Main14.main(Unknown Source) > at org.apache.derby.tools.ij.main(Unknown Source) > at org.apache.derby.iapi.tools.run.main(Unknown Source) > Caused by: java.sql.SQLException: Java exception: ': java.lang.NullPointerException'. > at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source) > at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source) > ... 18 more > Caused by: java.lang.NullPointerException > at org.apache.derby.impl.sql.compile.ResultColumn.columnTypeAndLengthMatch(Unknown Source) > at org.apache.derby.impl.sql.compile.ResultColumnList.columnTypesAndLengthsMatch(Unknown Source) > at org.apache.derby.impl.sql.compile.InsertNode.bindStatement(Unknown Source) > at org.apache.derby.impl.sql.GenericStatement.prepMinion(Unknown Source) > at org.apache.derby.impl.sql.GenericStatement.prepare(Unknown Source) > at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(Unknown Source) > ... 11 more -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.