[jboss-jira] [JBoss JIRA] Created: (JBMESSAGING-685) session.commit on an empty transaction causes NPE

Clebert Suconic (JIRA) jira-events at jboss.com
Tue Dec 19 23:08:14 EST 2006


session.commit on an empty transaction causes NPE
-------------------------------------------------

                 Key: JBMESSAGING-685
                 URL: http://jira.jboss.com/jira/browse/JBMESSAGING-685
             Project: JBoss Messaging
          Issue Type: Bug
    Affects Versions: 1.2.0.Beta1
            Reporter: Clebert Suconic
         Assigned To: Clebert Suconic
            Priority: Blocker
             Fix For: 1.2.0.Beta1


this will cause a NPE:

      JBossConnectionFactory factory = (JBossConnectionFactory) ic[1].lookup("/ConnectionFactory");
      Connection conn = cf.createConnection();
      JBossSession session = (JBossSession) conn.createSession(true, Session.SESSION_TRANSACTED);
      session.commit();

    [junit] java.lang.NullPointerException
    [junit]     at org.jboss.jms.tx.ClientTransaction.clearMessages(ClientTransaction.java:116)
    [junit]     at org.jboss.jms.tx.ResourceManager.rollbackLocal(ResourceManager.java:230)
    [junit]     at org.jboss.jms.tx.ResourceManager.commitLocal(ResourceManager.java:208)
    [junit]     at org.jboss.jms.client.container.TransactionAspect.handleCommit(TransactionAspect.java:106)
    [junit]     at org.jboss.aop.advice.org.jboss.jms.client.container.TransactionAspect14.invoke(TransactionAspect14.java)
    [junit]     at org.jboss.jms.client.delegate.ClientSessionDelegate$commit_8461082169793485964.invokeNext(ClientSessionDelegate$commit_8461082169793485964.java)
    [junit]     at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:177)
    [junit]     at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:117)
    [junit]     at org.jboss.jms.client.delegate.ClientSessionDelegate$commit_8461082169793485964.invokeNext(ClientSessionDelegate$commit_8461082169793485964.java)
    [junit]     at org.jboss.jms.client.container.ExceptionInterceptor.invoke(ExceptionInterceptor.java:69)
    [junit]     at org.jboss.jms.client.delegate.ClientSessionDelegate$commit_8461082169793485964.invokeNext(ClientSessionDelegate$commit_8461082169793485964.java)
    [junit]     at org.jboss.jms.client.container.ClientLogInterceptor.invoke(ClientLogInterceptor.java:107)
    [junit]     at org.jboss.jms.client.delegate.ClientSessionDelegate$commit_8461082169793485964.invokeNext(ClientSessionDelegate$commit_8461082169793485964.java)
    [junit]     at org.jboss.jms.client.delegate.ClientSessionDelegate.commit(ClientSessionDelegate.java)
    [junit]     at org.jboss.jms.client.JBossSession.commit(JBossSession.java:165)
    [junit]     at org.jboss.test.messaging.jms.clustering.HATest.testEmptyCommit(HATest.java:96)
    [junit]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [junit]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    [junit]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    [junit]     at java.lang.reflect.Method.invoke(Method.java:585)
    [junit]     at junit.framework.TestCase.runTest(TestCase.java:154)
    [junit]     at junit.framework.TestCase.runBare(TestCase.java:127)
    [junit]     at junit.framework.TestResult$1.protect(TestResult.java:106)
    [junit]     at junit.framework.TestResult.runProtected(TestResult.java:124)
    [junit]     at junit.framework.TestResult.run(TestResult.java:109)
    [junit]     at junit.framework.TestCase.run(TestCase.java:118)
    [junit]     at junit.framework.TestSuite.runTest(TestSuite.java:208)
    [junit]     at junit.framework.TestSuite.run(TestSuite.java:203)
    [junit]     at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:297)
    [junit]     at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:672)
    [junit]     at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:567)




-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list