You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-user@db.apache.org by "James A. Shepherd" <Ja...@JamesAshepherd.com> on 2008/01/26 19:25:14 UTC

NullPointerException, possibly in getControlRowForPage?

Hi,
	I have a long transaction that has suddenly started throwing a NPE
(tail of derby.log shown below).

	Nothing strange happens during the transaction, but on closing I get
the NPE.

	If I reorder some of the statements in the transaction (keeping
functional equivalence) the NPE is sometimes not thrown.

	Has anyone got any ideas on what I can look for/try?

Thanks,




2008-01-26 17:23:02.656 GMT Thread[Main,5,main] (XID = 1888), (SESSIONID
= 2), (DATABASE = directory:myDB), (DRDAID = null), Begin compiling
prepared statement:  UPDATE myTable SET nHelp = NULL  :End prepared
statement
2008-01-26 17:23:02.659 GMT Thread[Main,5,main] (XID = 1888), (SESSIONID
= 2), (DATABASE = directory:myDB), (DRDAID = null), End compiling
prepared statement:  UPDATE myTable SET nHelp = NULL  :End prepared
statement
2008-01-26 17:23:02.661 GMT Thread[Main,5,main] (XID = 1888), (SESSIONID
= 2), (DATABASE = directory:myDB), (DRDAID = null), Executing prepared
statement:  UPDATE myTable SET nHelp = NULL  :End prepared statement
2008-01-26 17:23:02.662 GMT Thread[Main,5,main] (XID = 1888), (SESSIONID
= 2), (DATABASE = directory:myDB), (DRDAID = null), Committing
2008-01-26 17:23:02.721 GMT Thread[Main,5,main] (XID = 1888), (SESSIONID
= 2), (DATABASE = directory:myDB), (DRDAID = null), Cleanup action starting
2008-01-26 17:23:02.721 GMT Thread[Main,5,main] (XID = 1888), (SESSIONID
= 2), (DATABASE = directory:myDB), (DRDAID = null), Failed Statement is:
null
java.lang.NullPointerException
        at
org.apache.derby.impl.store.access.btree.ControlRow.getControlRowForPage(Unknown
Source)
        at
org.apache.derby.impl.store.access.btree.ControlRow.get(Unknown Source)
        at
org.apache.derby.impl.store.access.btree.ControlRow.get(Unknown Source)
        at
org.apache.derby.impl.store.access.btree.BTreePostCommit.purgeRowLevelCommittedDeletes(Unknown
Source)
        at
org.apache.derby.impl.store.access.btree.BTreePostCommit.performWork(Unknown
Source)
        at
org.apache.derby.impl.store.raw.xact.Xact.postTermination(Unknown Source)
        at
org.apache.derby.impl.store.raw.xact.Xact.completeCommit(Unknown Source)
        at org.apache.derby.impl.store.raw.xact.Xact.commit(Unknown Source)
        at org.apache.derby.impl.store.raw.xact.Xact.commit(Unknown Source)
        at
org.apache.derby.impl.store.access.RAMTransaction.commit(Unknown Source)
        at
org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.doCommit(Unknown
Source)
        at
org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.userCommit(Unknown
Source)
        at
org.apache.derby.impl.jdbc.TransactionResourceImpl.commit(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedConnection.commit(Unknown Source)
        at
org.apache.commons.dbcp.DelegatingConnection.commit(DelegatingConnection.java:238)
        at
org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.commit(PoolingDataSource.java:199)
        at
org.springframework.jdbc.datasource.DataSourceTransactionManager.doCommit(DataSourceTransactionManager.java:245)
        at
org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:651)
        at
org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:621)
        at
org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:146)
        at com.xxx.yyy.zzz.add(zzz.java:324)
        at com.xxx.fff.hhh.Mnnn.reload(Mnnn.java:44)
        at com.xxx.fff.hhh.Mnnn.startup(Mnnn.java:57)
        at com.xxx.fff.hhh.Start.startupnnn(Start.java:170)
        at com.xxx.fff.hhh.Start.startup(Start.java:146)
        at com.xxx.start.Starter.startup(Starter.java:264)
        at com.xxx.start.Main.startup(Main.java:270)
        at com.xxx.start.Main.main(Main.java:199)
Cleanup action completed

-- 
James A. Shepherd
http://www.JamesAshepherd.com/

Re: NullPointerException, possibly in getControlRowForPage?

Posted by Mike Matrigali <mi...@sbcglobal.net>.
I second, could you report this as a new issue.  If possible can you
try with different JVM/jit disabled to try and get a line number for
the null pointer?

If it reproduces in your environment can you turn on statement logging
to derby.log so maybe we can see what is causing the null pointer.  Do
you do anything in the long transaction that may be affecting the
state of indexes affected like - dropping indexes, compressing tables,
other sorts of ddl.

Of course if you can provide standalone repro that would be easiest way
to allow someone to help with the problem.
Bryan Pendleton wrote:
> James A. Shepherd wrote:
>> Hi,
>>     I have a long transaction that has suddenly started throwing a NPE
> 
> Did you recently upgrade your Derby installation? What version are you
> running? It seems remotely possible that you might be seeing problems
> related to this recent change:
> https://issues.apache.org/jira/browse/DERBY-3216
> 
> If you didn't recently upgrade, then perhaps you have found a new bug
> in Derby.
> 
> Either way, if you can gather whatever information you have, and record
> it in an issue in the Jira system, that would be nice!
> http://db.apache.org/derby/DerbyBugGuidelines.html
> 
> thanks,
> 
> bryan
> 
> 
> 


Re: NullPointerException, possibly in getControlRowForPage?

Posted by Bryan Pendleton <bp...@amberpoint.com>.
James A. Shepherd wrote:
> Hi,
> 	I have a long transaction that has suddenly started throwing a NPE

Did you recently upgrade your Derby installation? What version are you
running? It seems remotely possible that you might be seeing problems
related to this recent change:
https://issues.apache.org/jira/browse/DERBY-3216

If you didn't recently upgrade, then perhaps you have found a new bug
in Derby.

Either way, if you can gather whatever information you have, and record
it in an issue in the Jira system, that would be nice!
http://db.apache.org/derby/DerbyBugGuidelines.html

thanks,

bryan