You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Niklas Käck (JIRA)" <ji...@apache.org> on 2006/05/17 16:34:51 UTC

[jira] Created: (AMQ-711) commit() should not be called while in auto-commit mode

commit() should not be called while in auto-commit mode
-------------------------------------------------------

         Key: AMQ-711
         URL: https://issues.apache.org/activemq/browse/AMQ-711
     Project: ActiveMQ
        Type: Bug

  Components: Broker  
    Versions: 4.0 RC3, 4.0 RC2    
 Environment: Windows NT
SQLServer with jtds driver. 
    Reporter: Niklas Käck
 Attachments: activemq.xml

Unable to startup Broker Service.

ERROR BrokerService                  - Failed to start ActiveMQ JMS Message Broker. Reason: java.io.IOException: commit() should not be called while in auto-commit mode.


Stacktrace:

java.io.IOException: commit() should not be called while in auto-commit mode.
        at org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:42)
        at org.apache.activemq.store.jdbc.TransactionContext.close(TransactionContext.java:125)
        at org.apache.activemq.store.jdbc.JDBCPersistenceAdapter.createAdapter(JDBCPersistenceAdapter.java:253)
        at org.apache.activemq.store.jdbc.JDBCPersistenceAdapter.getAdapter(JDBCPersistenceAdapter.java:213)
        at org.apache.activemq.store.jdbc.JDBCPersistenceAdapter.start(JDBCPersistenceAdapter.java:139)
        at org.apache.activemq.store.journal.JournalPersistenceAdapter.start(JournalPersistenceAdapter.java:215)
        at org.apache.activemq.broker.BrokerService.createRegionBroker(BrokerService.java:907)
        at org.apache.activemq.broker.BrokerService.createBroker(BrokerService.java:867)
        at org.apache.activemq.broker.BrokerService.getBroker(BrokerService.java:453)
        at org.apache.activemq.broker.BrokerService.start(BrokerService.java:362)
        at org.apache.activemq.xbean.XBeanBrokerService.afterPropertiesSet(XBeanBrokerService.java:43)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1058
)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:363)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:275)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:318)
        at org.apache.xbean.spring.context.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:158)
        at org.apache.xbean.spring.context.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:48)
        at org.apache.activemq.xbean.XBeanBrokerFactory.createBroker(XBeanBrokerFactory.java:40)
        at org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:56)
        at org.apache.activemq.console.command.StartCommand.startBroker(StartCommand.java:81)
        at org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:46)
        at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:49)
        at org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:64)
        at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:49)
        at org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:45)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.apache.activemq.console.Main.runTaskClass(Main.java:135)
        at org.apache.activemq.console.Main.main(Main.java:67)
Caused by: java.sql.SQLException: commit() should not be called while in auto-commit mode.
        at net.sourceforge.jtds.jdbc.ConnectionJDBC2.commit(ConnectionJDBC2.java:1878)
        at org.apache.commons.dbcp.DelegatingConnection.commit(DelegatingConnection.java:203)
        at org.apache.commons.dbcp.DelegatingConnection.commit(DelegatingConnection.java:203)
        at org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.commit(PoolingDataSource.java:199)
        at org.apache.activemq.store.jdbc.TransactionContext.close(TransactionContext.java:119)


Error message:

ERROR: java.lang.RuntimeException: Failed to execute start task. Reason: org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'org.apache.activemq.xbean.XBeanBrokerService' defined in class path resource [activemq.xml]: Initialization of bean failed; nested exceptio
n is java.io.IOException: commit() should not be called while in auto-commit mode.
ERROR: java.lang.Exception: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.activemq.xbean.XBeanBro
kerService' defined in class path resource [activemq.xml]: Initialization of bean failed; nested exception is java.io.IOException: commit() should not
 be called while in auto-commit mode.



Configuration:

<bean id="sqlserver-ds" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
      <property name="driverClassName" value="net.sourceforge.jtds.jdbc.Driver"/>
      <property name="url" value="jdbc:jtds:sqlserver://host/ActiveMQ;instance=D1;tds=8.0;lastupdatecount=true"/>
      <property name="username" value="ActiveMQ"/>
      <property name="password" value="ActiveMQPwd"/>
      <property name="poolPreparedStatements" value="true"/>
  </bean>



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


[jira] Resolved: (AMQ-711) commit() should not be called while in auto-commit mode

Posted by "Hiram Chirino (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQ-711?page=all ]
     
Hiram Chirino resolved AMQ-711:
-------------------------------

    Fix Version: 4.0.1
                 4.1
     Resolution: Fixed

Applied patch.. Thanks Niklas!

> commit() should not be called while in auto-commit mode
> -------------------------------------------------------
>
>          Key: AMQ-711
>          URL: https://issues.apache.org/activemq/browse/AMQ-711
>      Project: ActiveMQ
>         Type: Bug

>   Components: Broker
>     Versions: 4.0 RC2, 4.0 RC3
>  Environment: Windows NT
> SQLServer with jtds driver. 
>     Reporter: Niklas Käck
>      Fix For: 4.1, 4.0.1
>  Attachments: activemq.xml
>
> Original Estimate: 1 day
>         Remaining: 1 day
>
> Unable to startup Broker Service.
> ERROR BrokerService                  - Failed to start ActiveMQ JMS Message Broker. Reason: java.io.IOException: commit() should not be called while in auto-commit mode.
> Stacktrace:
> java.io.IOException: commit() should not be called while in auto-commit mode.
>         at org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:42)
>         at org.apache.activemq.store.jdbc.TransactionContext.close(TransactionContext.java:125)
>         at org.apache.activemq.store.jdbc.JDBCPersistenceAdapter.createAdapter(JDBCPersistenceAdapter.java:253)
>         at org.apache.activemq.store.jdbc.JDBCPersistenceAdapter.getAdapter(JDBCPersistenceAdapter.java:213)
>         at org.apache.activemq.store.jdbc.JDBCPersistenceAdapter.start(JDBCPersistenceAdapter.java:139)
>         at org.apache.activemq.store.journal.JournalPersistenceAdapter.start(JournalPersistenceAdapter.java:215)
>         at org.apache.activemq.broker.BrokerService.createRegionBroker(BrokerService.java:907)
>         at org.apache.activemq.broker.BrokerService.createBroker(BrokerService.java:867)
>         at org.apache.activemq.broker.BrokerService.getBroker(BrokerService.java:453)
>         at org.apache.activemq.broker.BrokerService.start(BrokerService.java:362)
>         at org.apache.activemq.xbean.XBeanBrokerService.afterPropertiesSet(XBeanBrokerService.java:43)
>         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1058
> )
>         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:363)
>         at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226)
>         at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147)
>         at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:275)
>         at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:318)
>         at org.apache.xbean.spring.context.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:158)
>         at org.apache.xbean.spring.context.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:48)
>         at org.apache.activemq.xbean.XBeanBrokerFactory.createBroker(XBeanBrokerFactory.java:40)
>         at org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:56)
>         at org.apache.activemq.console.command.StartCommand.startBroker(StartCommand.java:81)
>         at org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:46)
>         at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:49)
>         at org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:64)
>         at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:49)
>         at org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:45)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.apache.activemq.console.Main.runTaskClass(Main.java:135)
>         at org.apache.activemq.console.Main.main(Main.java:67)
> Caused by: java.sql.SQLException: commit() should not be called while in auto-commit mode.
>         at net.sourceforge.jtds.jdbc.ConnectionJDBC2.commit(ConnectionJDBC2.java:1878)
>         at org.apache.commons.dbcp.DelegatingConnection.commit(DelegatingConnection.java:203)
>         at org.apache.commons.dbcp.DelegatingConnection.commit(DelegatingConnection.java:203)
>         at org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.commit(PoolingDataSource.java:199)
>         at org.apache.activemq.store.jdbc.TransactionContext.close(TransactionContext.java:119)
> Error message:
> ERROR: java.lang.RuntimeException: Failed to execute start task. Reason: org.springframework.beans.factory.BeanCreationException: Error creating bean
> with name 'org.apache.activemq.xbean.XBeanBrokerService' defined in class path resource [activemq.xml]: Initialization of bean failed; nested exceptio
> n is java.io.IOException: commit() should not be called while in auto-commit mode.
> ERROR: java.lang.Exception: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.activemq.xbean.XBeanBro
> kerService' defined in class path resource [activemq.xml]: Initialization of bean failed; nested exception is java.io.IOException: commit() should not
>  be called while in auto-commit mode.
> Configuration:
> <bean id="sqlserver-ds" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
>       <property name="driverClassName" value="net.sourceforge.jtds.jdbc.Driver"/>
>       <property name="url" value="jdbc:jtds:sqlserver://host/ActiveMQ;instance=D1;tds=8.0;lastupdatecount=true"/>
>       <property name="username" value="ActiveMQ"/>
>       <property name="password" value="ActiveMQPwd"/>
>       <property name="poolPreparedStatements" value="true"/>
>   </bean>

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