db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mamta A. Satoor (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-4435) Emptying index fails with NPE doing replacement import of empty file
Date Thu, 05 Nov 2009 21:37:32 GMT

    [ https://issues.apache.org/jira/browse/DERBY-4435?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12774087#action_12774087

Mamta A. Satoor commented on DERBY-4435:

I will debug this more but I am not able to see what exactly is casuing a npe. When I debug
using eclipse,  it is interesting that right when I get to 
	Thread [main] (Suspended (breakpoint at line 2348 in InsertResultSet))	
		InsertResultSet.emptyIndexes(long, InsertConstantAction, TableDescriptor, DataDictionary,
ExecRow) line: 2347	
		InsertResultSet.updateAllIndexes(long, InsertConstantAction, TableDescriptor, DataDictionary,
ExecRow) line: 1820	
		InsertResultSet.bulkInsertCore(LanguageConnectionContext, long) line: 1356	
		InsertResultSet.open() line: 444	
		GenericPreparedStatement.executeStmt(Activation, boolean, long) line: 436	
		GenericPreparedStatement.execute(Activation, long) line: 317	
		EmbedPreparedStatement30(EmbedStatement).executeStatement(Activation, boolean, boolean)
line: 1235	
		EmbedPreparedStatement30(EmbedPreparedStatement).executeStatement(Activation, boolean, boolean)
line: 1675	
		EmbedPreparedStatement30(EmbedPreparedStatement).executeUpdate() line: 302	
		Import.performImport(Connection, String, String, String, String, String, String, String,
String, short, boolean) line: 272	
		Import.importTable(Connection, String, String, String, String, String, String, short, boolean)
line: 124	
		SystemProcedures.SYSCS_IMPORT_TABLE(String, String, String, String, String, String, short)
line: 1464	
		acf81e0010x0124xc63fxedebx00000017dda80.g0() line: not available	
		NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]

		NativeMethodAccessorImpl.invoke(Object, Object[]) line: 79	
		DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 43	
		Method.invoke(Object, Object...) line: 618	
		ReflectMethod.invoke(Object) line: 46	
		CallStatementResultSet.open() line: 76	
		GenericPreparedStatement.executeStmt(Activation, boolean, long) line: 436	
		GenericPreparedStatement.execute(Activation, long) line: 317	
		EmbedStatement.executeStatement(Activation, boolean, boolean) line: 1235	
		EmbedStatement.execute(String, boolean, boolean, int, int[], String[]) line: 625	
		EmbedStatement.execute(String) line: 555	
		ij.executeImmediate(String) line: 329	
		utilMain.doCatch(String) line: 521	
		utilMain.runScriptGuts() line: 363	
		utilMain.go(LocalizedInput[], LocalizedOutput) line: 261	
		Main.go(LocalizedInput, LocalizedOutput) line: 229	
		Main.mainCore(String[], Main) line: 184	
		Main.main(String[]) line: 75	
		ij.main(String[]) line: 59	
I simply get a NPE without being able to get into the method to see what is the source of
NPE. Maybe something is wrong with my setup of Eclipse but I was wondering if anyone has little
time to see if there are able to see where exactly npe is generated. I have tried with both
sane and insane builds. 

> Emptying index fails with NPE doing replacement import of empty file
> --------------------------------------------------------------------
>                 Key: DERBY-4435
>                 URL: https://issues.apache.org/jira/browse/DERBY-4435
>             Project: Derby
>          Issue Type: Bug
>          Components: Store
>    Affects Versions:,,
>         Environment: Doing replacement import resulting in an empty table, where the
table has at least one index.
>            Reporter: Kristian Waagan
>         Attachments: Derby4435Repro.java
> When importing data from an empty file, with the replacement option enabled (non-zero
last argument in the import procedure call), Derby fails with a NullPointerException when
emptying the index(es) .
> Stack trace, insane build:
> java.sql.SQLException: Import error on line 1 of file [snip]: Java exception: ': java.lang.NullPointerException'.

> 	at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(SQLExceptionFactory40.java:95)
>         ...
> Caused by: java.lang.NullPointerException
> 	at org.apache.derby.impl.sql.execute.InsertResultSet.emptyIndexes(InsertResultSet.java:2348)
> 	at org.apache.derby.impl.sql.execute.InsertResultSet.updateAllIndexes(InsertResultSet.java:1820)
> 	at org.apache.derby.impl.sql.execute.InsertResultSet.bulkInsertCore(InsertResultSet.java:1356)
> 	at org.apache.derby.impl.sql.execute.InsertResultSet.open(InsertResultSet.java:444)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(GenericPreparedStatement.java:436)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.execute(GenericPreparedStatement.java:317)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java:1235)
> 	... 44 more
> Stack trace, sane build:
> java.sql.SQLException: The exception 'java.sql.SQLException: An internal error was identified
by RawStore module.' was thrown while evaluating an expression.
> 	at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(SQLExceptionFactory40.java:95)
>         ...
> Caused by: ERROR 40XT0: An internal error was identified by RawStore module.
> 	at org.apache.derby.iapi.error.StandardException.newException(StandardException.java:276)
> 	at org.apache.derby.impl.store.raw.xact.Xact.abort(Xact.java:917)
> 	at org.apache.derby.impl.store.access.RAMTransaction.abort(RAMTransaction.java:1985)
> 	at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.doRollback(GenericLanguageConnectionContext.java:1496)
> 	at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.userRollback(GenericLanguageConnectionContext.java:1404)
> 	at org.apache.derby.impl.jdbc.TransactionResourceImpl.rollback(TransactionResourceImpl.java:244)
> 	at org.apache.derby.impl.jdbc.EmbedConnection.rollback(EmbedConnection.java:1764)
> 	... 40 more
> A quick investigation suggests DERBY-2537 added the code that fails.
> Problem reported by a user on the Derby user list, see http://thread.gmane.org/gmane.comp.apache.db.derby.user/11764

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message