You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Sebb (JIRA)" <ji...@apache.org> on 2012/04/26 17:18:17 UTC

[jira] [Commented] (DBCP-383) NPE during XA commit (possibly doing startup recovery)

    [ https://issues.apache.org/jira/browse/DBCP-383?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13262662#comment-13262662 ] 

Sebb commented on DBCP-383:
---------------------------

Looks like the NPE is caused by current Xid == null.

The current Xid is saved by start() and set to null by commit(), rollback() and forget(), so it looks like an invalid sequence of calls has been used.

However, the code should not throw an NPE.

It would be more helpful if it threw an IllegalStateException (or similar).
                
> NPE during XA commit (possibly doing startup recovery)
> ------------------------------------------------------
>
>                 Key: DBCP-383
>                 URL: https://issues.apache.org/jira/browse/DBCP-383
>             Project: Commons Dbcp
>          Issue Type: Bug
>    Affects Versions: 1.4
>            Reporter: Martin Lichtin
>
> Encountering nullpointer exception at 
> java.lang.NullPointerException
> 	at org.apache.commons.dbcp.managed.LocalXAConnectionFactory$LocalXAResource.commit(LocalXAConnectionFactory.java:201)
> 	at com.atomikos.datasource.xa.XAResourceTransaction.commit(XAResourceTransaction.java:784)
> 	at com.atomikos.icatch.imp.CommitMessage.send(CommitMessage.java:73)
> 	at com.atomikos.icatch.imp.PropagationMessage.submit(PropagationMessage.java:111)
> 	at com.atomikos.icatch.imp.Propagator$PropagatorThread.run(Propagator.java:87)
> 	at com.atomikos.icatch.imp.Propagator.submitPropagationMessage(Propagator.java:66)
> 	at com.atomikos.icatch.imp.HeurHazardStateHandler.onTimeout(HeurHazardStateHandler.java:120)
> 	at com.atomikos.icatch.imp.CoordinatorImp.alarm(CoordinatorImp.java:1105)
> 	at com.atomikos.timing.PooledAlarmTimer.notifyListeners(PooledAlarmTimer.java:112)
> 	at com.atomikos.timing.PooledAlarmTimer.run(PooledAlarmTimer.java:99)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> 	at java.lang.Thread.run(Thread.java:662)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira