Failing to acquire exclusive lock - MySQL

View: New views
12 Messages — Rating Filter:   Alert me  

Failing to acquire exclusive lock - MySQL

by mjanveaux :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

I recently upgraded to ActiveMQ 4.1.1 from 4.0.1  I integrated ActiveMQ into my application using spring but not using the spring jms templates etc... Here's what I have in my spring configuration for my broker:

<bean id="broker" class="org.apache.activemq.xbean.BrokerFactoryBean">
    <property name="config"><value>/WEB-INF/activemq.xml</value></property>
    <property name="start"><value>true</value></property>
</bean>

Here's my activemq.xml file...
activemq.xml

My application is now failing to startup with the following messages in the logs over and over:
INFO 17/04/2007 21:27:02 Main Thread  org.apache.activemq.store.jdbc.DefaultDatabaseLocker - Attempting to acquire the exclusive lock to become the Master broker
DEBUG 17/04/2007 21:27:02 Main Thread  org.apache.activemq.store.jdbc.DefaultDatabaseLocker - Sleeping for 1000 milli(s) before trying again to get the lock...
INFO 17/04/2007 21:27:03 Main Thread  org.apache.activemq.store.jdbc.DefaultDatabaseLocker - Attempting to acquire the exclusive lock to become the Master broker
DEBUG 17/04/2007 21:27:03 Main Thread  org.apache.activemq.store.jdbc.DefaultDatabaseLocker - Sleeping for 1000 milli(s) before trying again to get the lock...
INFO 17/04/2007 21:27:04 Main Thread  org.apache.activemq.store.jdbc.DefaultDatabaseLocker - Attempting to acquire the exclusive lock to become the Master broker
DEBUG 17/04/2007 21:27:04 Main Thread  org.apache.activemq.store.jdbc.DefaultDatabaseLocker - Sleeping for 1000 milli(s) before trying again to get the lock...


Am I missing a setting? Doing something wrong?  If anybody has some insight I'd appreciate this, I didn't have this problem before.

Thank you

Mark

Re: Failing to acquire exclusive lock - MySQL

by mjanveaux :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Just additional information - this only happens when using mySQL - I tried this using derby and it works fine...
I"m using mysql 5.0.37

mjanveaux wrote:
Hello,

I recently upgraded to ActiveMQ 4.1.1 from 4.0.1  I integrated ActiveMQ into my application using spring but not using the spring jms templates etc... Here's what I have in my spring configuration for my broker:

<bean id="broker" class="org.apache.activemq.xbean.BrokerFactoryBean">
    <property name="config"><value>/WEB-INF/activemq.xml</value></property>
    <property name="start"><value>true</value></property>
</bean>

Here's my activemq.xml file...
activemq.xml

My application is now failing to startup with the following messages in the logs over and over:
INFO 17/04/2007 21:27:02 Main Thread  org.apache.activemq.store.jdbc.DefaultDatabaseLocker - Attempting to acquire the exclusive lock to become the Master broker
DEBUG 17/04/2007 21:27:02 Main Thread  org.apache.activemq.store.jdbc.DefaultDatabaseLocker - Sleeping for 1000 milli(s) before trying again to get the lock...
INFO 17/04/2007 21:27:03 Main Thread  org.apache.activemq.store.jdbc.DefaultDatabaseLocker - Attempting to acquire the exclusive lock to become the Master broker
DEBUG 17/04/2007 21:27:03 Main Thread  org.apache.activemq.store.jdbc.DefaultDatabaseLocker - Sleeping for 1000 milli(s) before trying again to get the lock...
INFO 17/04/2007 21:27:04 Main Thread  org.apache.activemq.store.jdbc.DefaultDatabaseLocker - Attempting to acquire the exclusive lock to become the Master broker
DEBUG 17/04/2007 21:27:04 Main Thread  org.apache.activemq.store.jdbc.DefaultDatabaseLocker - Sleeping for 1000 milli(s) before trying again to get the lock...


Am I missing a setting? Doing something wrong?  If anybody has some insight I'd appreciate this, I didn't have this problem before.

Thank you

Mark

Re: Failing to acquire exclusive lock - MySQL

by James.Strachan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Which version of MySQL are you using? You are not running multiple
brokers against the same database are you by any chance?


On 4/18/07, mjanveaux <mark@...> wrote:

>
> Hello,
>
> I recently upgraded to ActiveMQ 4.1.1 from 4.0.1  I integrated ActiveMQ into
> my application using spring but not using the spring jms templates etc...
> Here's what I have in my spring configuration for my broker:
>
> <bean id="broker" class="org.apache.activemq.xbean.BrokerFactoryBean">
>     <property name="config"><value>/WEB-INF/activemq.xml</value></property>
>     <property name="start"><value>true</value></property>
> </bean>
>
> Here's my activemq.xml file...
> http://www.nabble.com/file/7936/activemq.xml activemq.xml
>
> My application is now failing to startup with the following messages in the
> logs over and over:
> INFO 17/04/2007 21:27:02 Main Thread
> org.apache.activemq.store.jdbc.DefaultDatabaseLocker - Attempting to acquire
> the exclusive lock to become the Master broker
> DEBUG 17/04/2007 21:27:02 Main Thread
> org.apache.activemq.store.jdbc.DefaultDatabaseLocker - Sleeping for 1000
> milli(s) before trying again to get the lock...
> INFO 17/04/2007 21:27:03 Main Thread
> org.apache.activemq.store.jdbc.DefaultDatabaseLocker - Attempting to acquire
> the exclusive lock to become the Master broker
> DEBUG 17/04/2007 21:27:03 Main Thread
> org.apache.activemq.store.jdbc.DefaultDatabaseLocker - Sleeping for 1000
> milli(s) before trying again to get the lock...
> INFO 17/04/2007 21:27:04 Main Thread
> org.apache.activemq.store.jdbc.DefaultDatabaseLocker - Attempting to acquire
> the exclusive lock to become the Master broker
> DEBUG 17/04/2007 21:27:04 Main Thread
> org.apache.activemq.store.jdbc.DefaultDatabaseLocker - Sleeping for 1000
> milli(s) before trying again to get the lock...
>
>
> Am I missing a setting? Doing something wrong?  If anybody has some insight
> I'd appreciate this, I didn't have this problem before.
>
> Thank you
>
> Mark
> --
> View this message in context: http://www.nabble.com/Failing-to-acquire-exclusive-lock---MySQL-tf3598830s2354.html#a10051767
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>


--

James
-------
http://radio.weblogs.com/0112098/

Re: Failing to acquire exclusive lock - MySQL

by millea1 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


James.Strachan wrote:
Which version of MySQL are you using? You are not running multiple
brokers against the same database are you by any chance?

I have this same problem when upgrading from 4.1 to 4.1.1 (mysql version 5.0.19) in a JBoss integration; the only broker running against the DB.



On 4/18/07, mjanveaux <mark@mobiledesigntech.com> wrote:
>
> Hello,
>
> I recently upgraded to ActiveMQ 4.1.1 from 4.0.1  I integrated ActiveMQ into
> my application using spring but not using the spring jms templates etc...
> Here's what I have in my spring configuration for my broker:
>
> <bean id="broker" class="org.apache.activemq.xbean.BrokerFactoryBean">
>     <property name="config"><value>/WEB-INF/activemq.xml</value></property>
>     <property name="start"><value>true</value></property>
> </bean>
>
> Here's my activemq.xml file...
> http://www.nabble.com/file/7936/activemq.xml activemq.xml
>
> My application is now failing to startup with the following messages in the
> logs over and over:
> INFO 17/04/2007 21:27:02 Main Thread
> org.apache.activemq.store.jdbc.DefaultDatabaseLocker - Attempting to acquire
> the exclusive lock to become the Master broker
> DEBUG 17/04/2007 21:27:02 Main Thread
> org.apache.activemq.store.jdbc.DefaultDatabaseLocker - Sleeping for 1000
> milli(s) before trying again to get the lock...
> INFO 17/04/2007 21:27:03 Main Thread
> org.apache.activemq.store.jdbc.DefaultDatabaseLocker - Attempting to acquire
> the exclusive lock to become the Master broker
> DEBUG 17/04/2007 21:27:03 Main Thread
> org.apache.activemq.store.jdbc.DefaultDatabaseLocker - Sleeping for 1000
> milli(s) before trying again to get the lock...
> INFO 17/04/2007 21:27:04 Main Thread
> org.apache.activemq.store.jdbc.DefaultDatabaseLocker - Attempting to acquire
> the exclusive lock to become the Master broker
> DEBUG 17/04/2007 21:27:04 Main Thread
> org.apache.activemq.store.jdbc.DefaultDatabaseLocker - Sleeping for 1000
> milli(s) before trying again to get the lock...
>
>
> Am I missing a setting? Doing something wrong?  If anybody has some insight
> I'd appreciate this, I didn't have this problem before.
>
> Thank you
>
> Mark
> --
> View this message in context: http://www.nabble.com/Failing-to-acquire-exclusive-lock---MySQL-tf3598830s2354.html#a10051767
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>


--

James
-------
http://radio.weblogs.com/0112098/

Re: Failing to acquire exclusive lock - MySQL

by mjanveaux :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I'm using MySQL 5.0.37 and it is the only broker configured.

If I switch to using derby, the exact same configuration works flawlessly...


James.Strachan wrote:
Which version of MySQL are you using? You are not running multiple
brokers against the same database are you by any chance?


On 4/18/07, mjanveaux <mark@mobiledesigntech.com> wrote:
>
> Hello,
>
> I recently upgraded to ActiveMQ 4.1.1 from 4.0.1  I integrated ActiveMQ into
> my application using spring but not using the spring jms templates etc...
> Here's what I have in my spring configuration for my broker:
>
> <bean id="broker" class="org.apache.activemq.xbean.BrokerFactoryBean">
>     <property name="config"><value>/WEB-INF/activemq.xml</value></property>
>     <property name="start"><value>true</value></property>
> </bean>
>
> Here's my activemq.xml file...
> http://www.nabble.com/file/7936/activemq.xml activemq.xml
>
> My application is now failing to startup with the following messages in the
> logs over and over:
> INFO 17/04/2007 21:27:02 Main Thread
> org.apache.activemq.store.jdbc.DefaultDatabaseLocker - Attempting to acquire
> the exclusive lock to become the Master broker
> DEBUG 17/04/2007 21:27:02 Main Thread
> org.apache.activemq.store.jdbc.DefaultDatabaseLocker - Sleeping for 1000
> milli(s) before trying again to get the lock...
> INFO 17/04/2007 21:27:03 Main Thread
> org.apache.activemq.store.jdbc.DefaultDatabaseLocker - Attempting to acquire
> the exclusive lock to become the Master broker
> DEBUG 17/04/2007 21:27:03 Main Thread
> org.apache.activemq.store.jdbc.DefaultDatabaseLocker - Sleeping for 1000
> milli(s) before trying again to get the lock...
> INFO 17/04/2007 21:27:04 Main Thread
> org.apache.activemq.store.jdbc.DefaultDatabaseLocker - Attempting to acquire
> the exclusive lock to become the Master broker
> DEBUG 17/04/2007 21:27:04 Main Thread
> org.apache.activemq.store.jdbc.DefaultDatabaseLocker - Sleeping for 1000
> milli(s) before trying again to get the lock...
>
>
> Am I missing a setting? Doing something wrong?  If anybody has some insight
> I'd appreciate this, I didn't have this problem before.
>
> Thank you
>
> Mark
> --
> View this message in context: http://www.nabble.com/Failing-to-acquire-exclusive-lock---MySQL-tf3598830s2354.html#a10051767
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>


--

James
-------
http://radio.weblogs.com/0112098/

Re: Failing to acquire exclusive lock - MySQL

by Mykola :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi all,

Similar problem :(

I'm new to ActiveMQ so probably I misconfigure it somehow.
Problem: I'm trying to setup jdbcPersistenceAdapter in AMQ 4.1.1 to store journal into the MySQL 5.0.24 with Connector mysql-connector-java-5.0.4 under Windows XP
My config file is very simple

------------------------CONFIG-------------------------------

<beans>

  <!-- Allows us to use system properties as variables in this configuration file -->
  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
 
  <broker brokerName="localhost" useJmx="true" xmlns="http://activemq.org/config/1.0">
 
    <!--  Use the following to set the broker memory limit
    <memoryManager>  
        <usageManager id="memory-manager" limit="20 MB"/>
    </memoryManager>
    -->
   
    <!-- Use the following to configure how ActiveMQ is exposed in JMX
    <managementContext>
       <managementContext connectorPort="1099" jmxDomainName="org.apache.activemq"/>
    </managementContext>
    -->

 
 
    <persistenceAdapter>
      <jdbcPersistenceAdapter dataSource="#mysql-ds"/>
    </persistenceAdapter>
 
    <transportConnectors>
       <transportConnector name="openwire" uri="tcp://localhost:61616" discoveryUri="multicast://default"/>
       <transportConnector name="ssl"     uri="ssl://localhost:61617"/>
       <transportConnector name="stomp"   uri="stomp://localhost:61613"/>
    </transportConnectors>
   
    <networkConnectors>
      <!-- by default just auto discover the other brokers -->
      <networkConnector name="default-nc" uri="multicast://default"/>
      <!--
      <networkConnector name="host1 and host2" uri="static://(tcp://host1:61616,tcp://host2:61616)" failover="true"/>
      -->
    </networkConnectors>
   
  </broker>
 
  <bean id="mysql-ds" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
    <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
    <property name="url" value="jdbc:mysql://localhost/sonoportal?relaxAutoCommit=true&profileSQL=true"/>
    <property name="username" value="root"/>
    <property name="password" value=""/>
    <property name="poolPreparedStatements" value="true"/>
  </bean>

</beans>
------------------------ END CONFIG-------------------------------

I've also set profileSQL=true to be able to debug the reason of the problem
As a result I have following error log in ActiveMQ window console


---------------------------- LOG ---------------------------------


D:\java\tools\apache-activemq-4.1.1\bin>activemq.bat
ACTIVEMQ_HOME: D:\java\tools\apache-activemq-4.1.1\bin\..
ACTIVEMQ_BASE: D:\java\tools\apache-activemq-4.1.1\bin\..
Loading message broker from: xbean:activemq.xml
INFO  BrokerService                  - ActiveMQ 4.1.1 JMS Message Broker (localhost) is starting
INFO  BrokerService                  - For help or more information please see: http://incubator.apache.org/activemq/
INFO  ManagementContext              - JMX consoles can connect to service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi
Wed Apr 25 14:38:19 EEST 2007 INFO: Profiler Event: [QUERY]     at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java
:37) duration: 0 ms, connection-id: 0, statement-id: 999, resultset-id: 0, message: SET NAMES latin1
Wed Apr 25 14:38:19 EEST 2007 INFO: Profiler Event: [FETCH]     at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java
:37) duration: 47 ms, connection-id: 0, statement-id: 999, resultset-id: 0
Wed Apr 25 14:38:19 EEST 2007 INFO: Profiler Event: [QUERY]     at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java
:37) duration: 0 ms, connection-id: 0, statement-id: 999, resultset-id: 0, message: SET character_set_results = NULL
Wed Apr 25 14:38:19 EEST 2007 INFO: Profiler Event: [FETCH]     at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java
:37) duration: 0 ms, connection-id: 0, statement-id: 999, resultset-id: 0
Wed Apr 25 14:38:19 EEST 2007 INFO: Profiler Event: [QUERY]     at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java
:37) duration: 0 ms, connection-id: 0, statement-id: 1, resultset-id: 1, message: SHOW VARIABLES
Wed Apr 25 14:38:19 EEST 2007 INFO: Profiler Event: [FETCH]     at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java
:37) duration: 0 ms, connection-id: 0, statement-id: 1, resultset-id: 1
Wed Apr 25 14:38:19 EEST 2007 WARN: Profiler Event: [WARN]      at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java
:37) duration: 0 ms, connection-id: 0, statement-id: 1, resultset-id: 1, message: The following query was executed with a bad index, use 'EXPLAIN' for more deta
ils: SHOW VARIABLES

Full stack trace of location where event occurred:



** BEGIN NESTED EXCEPTION **

java.lang.Throwable

STACKTRACE:

java.lang.Throwable
        at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1785)
        at com.mysql.jdbc.Connection.execSQL(Connection.java:3170)
        at com.mysql.jdbc.Connection.execSQL(Connection.java:3099)
        at com.mysql.jdbc.Statement.executeQuery(Statement.java:1169)
        at com.mysql.jdbc.Connection.loadServerVariables(Connection.java:4317)
        at com.mysql.jdbc.Connection.initializePropsFromServer(Connection.java:3936)
        at com.mysql.jdbc.Connection.createNewIO(Connection.java:2683)
        at com.mysql.jdbc.Connection.<init>(Connection.java:1531)
        at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)
        at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:37)
        at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:290)
        at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:881)
        at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:855)
        at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:544)
        at org.apache.activemq.store.jdbc.TransactionContext.getConnection(TransactionContext.java:55)
        at org.apache.activemq.store.jdbc.JDBCPersistenceAdapter.createAdapter(JDBCPersistenceAdapter.java:297)
        at org.apache.activemq.store.jdbc.JDBCPersistenceAdapter.getAdapter(JDBCPersistenceAdapter.java:251)
        at org.apache.activemq.store.jdbc.JDBCPersistenceAdapter.start(JDBCPersistenceAdapter.java:152)
        at org.apache.activemq.broker.BrokerService.createRegionBroker(BrokerService.java:1251)
        at org.apache.activemq.broker.BrokerService.createBroker(BrokerService.java:1209)
        at org.apache.activemq.broker.BrokerService.getBroker(BrokerService.java:508)
        at org.apache.activemq.broker.BrokerService.start(BrokerService.java:394)
        at org.apache.activemq.xbean.XBeanBrokerService.afterPropertiesSet(XBeanBrokerService.java:47)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1062)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1029)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:420)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:141)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:242)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:156)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:290)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:348)
        at org.apache.xbean.spring.context.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:161)
        at org.apache.xbean.spring.context.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:51)
        at org.apache.activemq.xbean.XBeanBrokerFactory.createBroker(XBeanBrokerFactory.java:41)
        at org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:57)
        at org.apache.activemq.console.command.StartCommand.startBroker(StartCommand.java:82)
        at org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:47)
        at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:50)
        at org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:65)
        at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:50)
        at org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:46)
        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:202)
        at org.apache.activemq.console.Main.main(Main.java:91)


** END NESTED EXCEPTION **



Wed Apr 25 14:38:19 EEST 2007 INFO: Profiler Event: [QUERY]     at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java
:37) duration: 0 ms, connection-id: 0, statement-id: 2, resultset-id: 2, message: SHOW COLLATION
Wed Apr 25 14:38:19 EEST 2007 INFO: Profiler Event: [FETCH]     at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java
:37) duration: 0 ms, connection-id: 0, statement-id: 2, resultset-id: 2
Wed Apr 25 14:38:19 EEST 2007 WARN: Profiler Event: [WARN]      at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java
:37) duration: 0 ms, connection-id: 0, statement-id: 2, resultset-id: 2, message: The following query was executed with a bad index, use 'EXPLAIN' for more deta
ils: SHOW COLLATION

Full stack trace of location where event occurred:



** BEGIN NESTED EXCEPTION **

java.lang.Throwable

STACKTRACE:

java.lang.Throwable
        at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1785)
        at com.mysql.jdbc.Connection.execSQL(Connection.java:3170)
        at com.mysql.jdbc.Connection.execSQL(Connection.java:3099)
        at com.mysql.jdbc.Statement.executeQuery(Statement.java:1169)
        at com.mysql.jdbc.Connection.buildCollationMapping(Connection.java:1645)
        at com.mysql.jdbc.Connection.initializePropsFromServer(Connection.java:3938)
        at com.mysql.jdbc.Connection.createNewIO(Connection.java:2683)
        at com.mysql.jdbc.Connection.<init>(Connection.java:1531)
        at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)
        at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:37)
        at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:290)
        at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:881)
        at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:855)
        at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:544)
        at org.apache.activemq.store.jdbc.TransactionContext.getConnection(TransactionContext.java:55)
        at org.apache.activemq.store.jdbc.JDBCPersistenceAdapter.createAdapter(JDBCPersistenceAdapter.java:297)
        at org.apache.activemq.store.jdbc.JDBCPersistenceAdapter.getAdapter(JDBCPersistenceAdapter.java:251)
        at org.apache.activemq.store.jdbc.JDBCPersistenceAdapter.start(JDBCPersistenceAdapter.java:152)
        at org.apache.activemq.broker.BrokerService.createRegionBroker(BrokerService.java:1251)
        at org.apache.activemq.broker.BrokerService.createBroker(BrokerService.java:1209)
        at org.apache.activemq.broker.BrokerService.getBroker(BrokerService.java:508)
        at org.apache.activemq.broker.BrokerService.start(BrokerService.java:394)
        at org.apache.activemq.xbean.XBeanBrokerService.afterPropertiesSet(XBeanBrokerService.java:47)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1062)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1029)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:420)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:141)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:242)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:156)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:290)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:348)
        at org.apache.xbean.spring.context.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:161)
        at org.apache.xbean.spring.context.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:51)
        at org.apache.activemq.xbean.XBeanBrokerFactory.createBroker(XBeanBrokerFactory.java:41)
        at org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:57)
        at org.apache.activemq.console.command.StartCommand.startBroker(StartCommand.java:82)
        at org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:47)
        at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:50)
        at org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:65)
        at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:50)
        at org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:46)
        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:202)
        at org.apache.activemq.console.Main.main(Main.java:91)


** END NESTED EXCEPTION **



Wed Apr 25 14:38:19 EEST 2007 INFO: Profiler Event: [QUERY]     at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java
:37) duration: 0 ms, connection-id: 0, statement-id: 999, resultset-id: 0, message: SET autocommit=1
Wed Apr 25 14:38:19 EEST 2007 INFO: Profiler Event: [FETCH]     at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java
:37) duration: 0 ms, connection-id: 0, statement-id: 999, resultset-id: 0
Wed Apr 25 14:38:19 EEST 2007 INFO: Profiler Event: [QUERY]     at org.apache.commons.dbcp.DelegatingConnection.setAutoCommit(DelegatingConnection.java:221) dur
ation: 0 ms, connection-id: 312, statement-id: 999, resultset-id: 0, message: SET autocommit=1
Wed Apr 25 14:38:19 EEST 2007 INFO: Profiler Event: [FETCH]     at org.apache.commons.dbcp.DelegatingConnection.setAutoCommit(DelegatingConnection.java:221) dur
ation: 0 ms, connection-id: 312, statement-id: 999, resultset-id: 0
Wed Apr 25 14:38:19 EEST 2007 INFO: Profiler Event: [QUERY]     at org.apache.commons.dbcp.DelegatingConnection.setAutoCommit(DelegatingConnection.java:221) dur
ation: 0 ms, connection-id: 312, statement-id: 999, resultset-id: 0, message: SET autocommit=1
Wed Apr 25 14:38:19 EEST 2007 INFO: Profiler Event: [FETCH]     at org.apache.commons.dbcp.DelegatingConnection.setAutoCommit(DelegatingConnection.java:221) dur
ation: 16 ms, connection-id: 312, statement-id: 999, resultset-id: 0
Wed Apr 25 14:38:19 EEST 2007 INFO: Profiler Event: [QUERY]     at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java
:37) duration: 0 ms, connection-id: 0, statement-id: 999, resultset-id: 0, message: SET NAMES latin1
Wed Apr 25 14:38:19 EEST 2007 INFO: Profiler Event: [FETCH]     at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java
:37) duration: 0 ms, connection-id: 0, statement-id: 999, resultset-id: 0
Wed Apr 25 14:38:19 EEST 2007 INFO: Profiler Event: [QUERY]     at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java
:37) duration: 0 ms, connection-id: 0, statement-id: 999, resultset-id: 0, message: SET character_set_results = NULL
Wed Apr 25 14:38:19 EEST 2007 INFO: Profiler Event: [FETCH]     at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java
:37) duration: 0 ms, connection-id: 0, statement-id: 999, resultset-id: 0
Wed Apr 25 14:38:19 EEST 2007 INFO: Profiler Event: [QUERY]     at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java
:37) duration: 0 ms, connection-id: 0, statement-id: 3, resultset-id: 3, message: SHOW VARIABLES
Wed Apr 25 14:38:19 EEST 2007 INFO: Profiler Event: [FETCH]     at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java
:37) duration: 0 ms, connection-id: 0, statement-id: 3, resultset-id: 3
Wed Apr 25 14:38:19 EEST 2007 WARN: Profiler Event: [WARN]      at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java
:37) duration: 0 ms, connection-id: 0, statement-id: 3, resultset-id: 3, message: The following query was executed with a bad index, use 'EXPLAIN' for more deta
ils: SHOW VARIABLES

Full stack trace of location where event occurred:



** BEGIN NESTED EXCEPTION **

java.lang.Throwable

STACKTRACE:

java.lang.Throwable
        at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1785)
        at com.mysql.jdbc.Connection.execSQL(Connection.java:3170)
        at com.mysql.jdbc.Connection.execSQL(Connection.java:3099)
        at com.mysql.jdbc.Statement.executeQuery(Statement.java:1169)
        at com.mysql.jdbc.Connection.loadServerVariables(Connection.java:4317)
        at com.mysql.jdbc.Connection.initializePropsFromServer(Connection.java:3936)
        at com.mysql.jdbc.Connection.createNewIO(Connection.java:2683)
        at com.mysql.jdbc.Connection.<init>(Connection.java:1531)
        at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)
        at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:37)
        at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:290)
        at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:771)
        at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:95)
        at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:544)
        at org.apache.activemq.store.jdbc.TransactionContext.getConnection(TransactionContext.java:55)
        at org.apache.activemq.store.jdbc.JDBCPersistenceAdapter.createAdapter(JDBCPersistenceAdapter.java:297)
        at org.apache.activemq.store.jdbc.JDBCPersistenceAdapter.getAdapter(JDBCPersistenceAdapter.java:251)
        at org.apache.activemq.store.jdbc.JDBCPersistenceAdapter.start(JDBCPersistenceAdapter.java:152)
        at org.apache.activemq.broker.BrokerService.createRegionBroker(BrokerService.java:1251)
        at org.apache.activemq.broker.BrokerService.createBroker(BrokerService.java:1209)
        at org.apache.activemq.broker.BrokerService.getBroker(BrokerService.java:508)
        at org.apache.activemq.broker.BrokerService.start(BrokerService.java:394)
        at org.apache.activemq.xbean.XBeanBrokerService.afterPropertiesSet(XBeanBrokerService.java:47)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1062)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1029)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:420)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:141)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:242)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:156)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:290)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:348)
        at org.apache.xbean.spring.context.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:161)
        at org.apache.xbean.spring.context.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:51)
        at org.apache.activemq.xbean.XBeanBrokerFactory.createBroker(XBeanBrokerFactory.java:41)
        at org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:57)
        at org.apache.activemq.console.command.StartCommand.startBroker(StartCommand.java:82)
        at org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:47)
        at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:50)
        at org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:65)
        at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:50)
        at org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:46)
        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:202)
        at org.apache.activemq.console.Main.main(Main.java:91)


** END NESTED EXCEPTION **



Wed Apr 25 14:38:19 EEST 2007 INFO: Profiler Event: [QUERY]     at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java
:37) duration: 0 ms, connection-id: 0, statement-id: 4, resultset-id: 4, message: SHOW COLLATION
Wed Apr 25 14:38:19 EEST 2007 INFO: Profiler Event: [FETCH]     at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java
:37) duration: 0 ms, connection-id: 0, statement-id: 4, resultset-id: 4
Wed Apr 25 14:38:19 EEST 2007 WARN: Profiler Event: [WARN]      at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java
:37) duration: 0 ms, connection-id: 0, statement-id: 4, resultset-id: 4, message: The following query was executed with a bad index, use 'EXPLAIN' for more deta
ils: SHOW COLLATION

Full stack trace of location where event occurred:



** BEGIN NESTED EXCEPTION **

java.lang.Throwable

STACKTRACE:

java.lang.Throwable
        at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1785)
        at com.mysql.jdbc.Connection.execSQL(Connection.java:3170)
        at com.mysql.jdbc.Connection.execSQL(Connection.java:3099)
        at com.mysql.jdbc.Statement.executeQuery(Statement.java:1169)
        at com.mysql.jdbc.Connection.buildCollationMapping(Connection.java:1645)
        at com.mysql.jdbc.Connection.initializePropsFromServer(Connection.java:3938)
        at com.mysql.jdbc.Connection.createNewIO(Connection.java:2683)
        at com.mysql.jdbc.Connection.<init>(Connection.java:1531)
        at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)
        at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:37)
        at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:290)
        at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:771)
        at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:95)
        at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:544)
        at org.apache.activemq.store.jdbc.TransactionContext.getConnection(TransactionContext.java:55)
        at org.apache.activemq.store.jdbc.JDBCPersistenceAdapter.createAdapter(JDBCPersistenceAdapter.java:297)
        at org.apache.activemq.store.jdbc.JDBCPersistenceAdapter.getAdapter(JDBCPersistenceAdapter.java:251)
        at org.apache.activemq.store.jdbc.JDBCPersistenceAdapter.start(JDBCPersistenceAdapter.java:152)
        at org.apache.activemq.broker.BrokerService.createRegionBroker(BrokerService.java:1251)
        at org.apache.activemq.broker.BrokerService.createBroker(BrokerService.java:1209)
        at org.apache.activemq.broker.BrokerService.getBroker(BrokerService.java:508)
        at org.apache.activemq.broker.BrokerService.start(BrokerService.java:394)
        at org.apache.activemq.xbean.XBeanBrokerService.afterPropertiesSet(XBeanBrokerService.java:47)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1062)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1029)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:420)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:141)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:242)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:156)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:290)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:348)
        at org.apache.xbean.spring.context.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:161)
        at org.apache.xbean.spring.context.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:51)
        at org.apache.activemq.xbean.XBeanBrokerFactory.createBroker(XBeanBrokerFactory.java:41)
        at org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:57)
        at org.apache.activemq.console.command.StartCommand.startBroker(StartCommand.java:82)
        at org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:47)
        at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:50)
        at org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:65)
        at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:50)
        at org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:46)
        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:202)
        at org.apache.activemq.console.Main.main(Main.java:91)


** END NESTED EXCEPTION **



Wed Apr 25 14:38:20 EEST 2007 INFO: Profiler Event: [QUERY]     at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java
:37) duration: 0 ms, connection-id: 0, statement-id: 999, resultset-id: 0, message: SET autocommit=1
Wed Apr 25 14:38:20 EEST 2007 INFO: Profiler Event: [FETCH]     at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java
:37) duration: 0 ms, connection-id: 0, statement-id: 999, resultset-id: 0
Wed Apr 25 14:38:20 EEST 2007 INFO: Profiler Event: [QUERY]     at org.apache.commons.dbcp.DelegatingConnection.setAutoCommit(DelegatingConnection.java:221) dur
ation: 0 ms, connection-id: 313, statement-id: 999, resultset-id: 0, message: SET autocommit=1
Wed Apr 25 14:38:20 EEST 2007 INFO: Profiler Event: [FETCH]     at org.apache.commons.dbcp.DelegatingConnection.setAutoCommit(DelegatingConnection.java:221) dur
ation: 0 ms, connection-id: 313, statement-id: 999, resultset-id: 0
Wed Apr 25 14:38:20 EEST 2007 INFO: Profiler Event: [QUERY]     at org.apache.commons.dbcp.DelegatingConnection.setTransactionIsolation(DelegatingConnection.jav
a:224) duration: 0 ms, connection-id: 313, statement-id: 999, resultset-id: 0, message: SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED
Wed Apr 25 14:38:20 EEST 2007 INFO: Profiler Event: [FETCH]     at org.apache.commons.dbcp.DelegatingConnection.setTransactionIsolation(DelegatingConnection.jav
a:224) duration: 0 ms, connection-id: 313, statement-id: 999, resultset-id: 0
INFO  JDBCPersistenceAdapter         - Database driver recognized: [mysql-ab_jdbc_driver]
Wed Apr 25 14:38:20 EEST 2007 INFO: Profiler Event: [QUERY]     at org.apache.commons.dbcp.DelegatingConnection.setAutoCommit(DelegatingConnection.java:221) dur
ation: 0 ms, connection-id: 313, statement-id: 999, resultset-id: 0, message: SET autocommit=1
Wed Apr 25 14:38:20 EEST 2007 INFO: Profiler Event: [FETCH]     at org.apache.commons.dbcp.DelegatingConnection.setAutoCommit(DelegatingConnection.java:221) dur
ation: 0 ms, connection-id: 313, statement-id: 999, resultset-id: 0
Wed Apr 25 14:38:20 EEST 2007 INFO: Profiler Event: [QUERY]     at org.apache.commons.dbcp.DelegatingConnection.setAutoCommit(DelegatingConnection.java:221) dur
ation: 0 ms, connection-id: 313, statement-id: 999, resultset-id: 0, message: SET autocommit=1
Wed Apr 25 14:38:20 EEST 2007 INFO: Profiler Event: [FETCH]     at org.apache.commons.dbcp.DelegatingConnection.setAutoCommit(DelegatingConnection.java:221) dur
ation: 0 ms, connection-id: 313, statement-id: 999, resultset-id: 0
Wed Apr 25 14:38:20 EEST 2007 INFO: Profiler Event: [QUERY]     at org.apache.commons.dbcp.DelegatingConnection.setAutoCommit(DelegatingConnection.java:221) dur
ation: 0 ms, connection-id: 313, statement-id: 999, resultset-id: 0, message: SET autocommit=0
Wed Apr 25 14:38:20 EEST 2007 INFO: Profiler Event: [FETCH]     at org.apache.commons.dbcp.DelegatingConnection.setAutoCommit(DelegatingConnection.java:221) dur
ation: 0 ms, connection-id: 313, statement-id: 999, resultset-id: 0
Wed Apr 25 14:38:20 EEST 2007 INFO: Profiler Event: [QUERY]     at org.apache.commons.dbcp.DelegatingConnection.setTransactionIsolation(DelegatingConnection.jav
a:224) duration: 0 ms, connection-id: 313, statement-id: 999, resultset-id: 0, message: SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED
Wed Apr 25 14:38:20 EEST 2007 INFO: Profiler Event: [FETCH]     at org.apache.commons.dbcp.DelegatingConnection.setTransactionIsolation(DelegatingConnection.jav
a:224) duration: 0 ms, connection-id: 313, statement-id: 999, resultset-id: 0
Wed Apr 25 14:38:20 EEST 2007 INFO: Profiler Event: [QUERY]     at org.apache.activemq.store.jdbc.adapter.DefaultJDBCAdapter.doCreateTables(DefaultJDBCAdapter.j
ava:72) duration: 0 ms, connection-id: 313, statement-id: 5, resultset-id: 5, message: SHOW FULL TABLES FROM `sonoportal` LIKE 'ACTIVEMQ_MSGS'
Wed Apr 25 14:38:20 EEST 2007 INFO: Profiler Event: [FETCH]     at org.apache.activemq.store.jdbc.adapter.DefaultJDBCAdapter.doCreateTables(DefaultJDBCAdapter.j
ava:72) duration: 0 ms, connection-id: 313, statement-id: 5, resultset-id: 5
Wed Apr 25 14:38:20 EEST 2007 WARN: Profiler Event: [WARN]      at org.apache.activemq.store.jdbc.adapter.DefaultJDBCAdapter.doCreateTables(DefaultJDBCAdapter.j
ava:72) duration: 0 ms, connection-id: 313, statement-id: 5, resultset-id: 5, message: The following query was executed with a bad index, use 'EXPLAIN' for more
 details: SHOW FULL TABLES FROM `sonoportal` LIKE 'ACTIVEMQ_MSGS'

Full stack trace of location where event occurred:



** BEGIN NESTED EXCEPTION **

java.lang.Throwable

STACKTRACE:

java.lang.Throwable
        at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1785)
        at com.mysql.jdbc.Connection.execSQL(Connection.java:3170)
        at com.mysql.jdbc.Connection.execSQL(Connection.java:3099)
        at com.mysql.jdbc.Statement.executeQuery(Statement.java:1169)
        at com.mysql.jdbc.DatabaseMetaData$9.forEach(DatabaseMetaData.java:4379)
        at com.mysql.jdbc.DatabaseMetaData$IterateBlock.doForAll(DatabaseMetaData.java:76)
        at com.mysql.jdbc.DatabaseMetaData.getTables(DatabaseMetaData.java:4357)
        at org.apache.activemq.store.jdbc.adapter.DefaultJDBCAdapter.doCreateTables(DefaultJDBCAdapter.java:72)
        at org.apache.activemq.store.jdbc.JDBCPersistenceAdapter.start(JDBCPersistenceAdapter.java:159)
        at org.apache.activemq.broker.BrokerService.createRegionBroker(BrokerService.java:1251)
        at org.apache.activemq.broker.BrokerService.createBroker(BrokerService.java:1209)
        at org.apache.activemq.broker.BrokerService.getBroker(BrokerService.java:508)
        at org.apache.activemq.broker.BrokerService.start(BrokerService.java:394)
        at org.apache.activemq.xbean.XBeanBrokerService.afterPropertiesSet(XBeanBrokerService.java:47)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1062)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1029)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:420)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:141)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:242)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:156)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:290)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:348)
        at org.apache.xbean.spring.context.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:161)
        at org.apache.xbean.spring.context.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:51)
        at org.apache.activemq.xbean.XBeanBrokerFactory.createBroker(XBeanBrokerFactory.java:41)
        at org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:57)
        at org.apache.activemq.console.command.StartCommand.startBroker(StartCommand.java:82)
        at org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:47)
        at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:50)
        at org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:65)
        at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:50)
        at org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:46)
        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:202)
        at org.apache.activemq.console.Main.main(Main.java:91)


** END NESTED EXCEPTION **



Wed Apr 25 14:38:20 EEST 2007 INFO: Profiler Event: [QUERY]     at org.apache.commons.dbcp.DelegatingConnection.commit(DelegatingConnection.java:203) duration:
0 ms, connection-id: 313, statement-id: 999, resultset-id: 0, message: commit
Wed Apr 25 14:38:20 EEST 2007 INFO: Profiler Event: [FETCH]     at org.apache.commons.dbcp.DelegatingConnection.commit(DelegatingConnection.java:203) duration:
0 ms, connection-id: 313, statement-id: 999, resultset-id: 0
Wed Apr 25 14:38:20 EEST 2007 INFO: Profiler Event: [QUERY]     at org.apache.commons.dbcp.DelegatingConnection.commit(DelegatingConnection.java:203) duration:
0 ms, connection-id: 313, statement-id: 999, resultset-id: 0, message: commit
Wed Apr 25 14:38:20 EEST 2007 INFO: Profiler Event: [FETCH]     at org.apache.commons.dbcp.DelegatingConnection.commit(DelegatingConnection.java:203) duration:
0 ms, connection-id: 313, statement-id: 999, resultset-id: 0
Wed Apr 25 14:38:20 EEST 2007 INFO: Profiler Event: [QUERY]     at org.apache.commons.dbcp.DelegatingConnection.commit(DelegatingConnection.java:203) duration:
0 ms, connection-id: 313, statement-id: 999, resultset-id: 0, message: commit
Wed Apr 25 14:38:20 EEST 2007 INFO: Profiler Event: [FETCH]     at org.apache.commons.dbcp.DelegatingConnection.commit(DelegatingConnection.java:203) duration:
0 ms, connection-id: 313, statement-id: 999, resultset-id: 0
Wed Apr 25 14:38:20 EEST 2007 INFO: Profiler Event: [QUERY]     at org.apache.commons.dbcp.DelegatingConnection.rollback(DelegatingConnection.java:220) duration
: 0 ms, connection-id: 313, statement-id: 999, resultset-id: 0, message: rollback
Wed Apr 25 14:38:20 EEST 2007 INFO: Profiler Event: [FETCH]     at org.apache.commons.dbcp.DelegatingConnection.rollback(DelegatingConnection.java:220) duration
: 0 ms, connection-id: 313, statement-id: 999, resultset-id: 0
Wed Apr 25 14:38:20 EEST 2007 INFO: Profiler Event: [QUERY]     at org.apache.commons.dbcp.DelegatingConnection.setAutoCommit(DelegatingConnection.java:221) dur
ation: 0 ms, connection-id: 313, statement-id: 999, resultset-id: 0, message: SET autocommit=1
Wed Apr 25 14:38:20 EEST 2007 INFO: Profiler Event: [FETCH]     at org.apache.commons.dbcp.DelegatingConnection.setAutoCommit(DelegatingConnection.java:221) dur
ation: 0 ms, connection-id: 313, statement-id: 999, resultset-id: 0
Wed Apr 25 14:38:20 EEST 2007 INFO: Profiler Event: [QUERY]     at org.apache.commons.dbcp.DelegatingConnection.setAutoCommit(DelegatingConnection.java:221) dur
ation: 0 ms, connection-id: 313, statement-id: 999, resultset-id: 0, message: SET autocommit=1
Wed Apr 25 14:38:20 EEST 2007 INFO: Profiler Event: [FETCH]     at org.apache.commons.dbcp.DelegatingConnection.setAutoCommit(DelegatingConnection.java:221) dur
ation: 0 ms, connection-id: 313, statement-id: 999, resultset-id: 0
Wed Apr 25 14:38:20 EEST 2007 INFO: Profiler Event: [QUERY]     at org.apache.commons.dbcp.DelegatingConnection.setAutoCommit(DelegatingConnection.java:221) dur
ation: 0 ms, connection-id: 313, statement-id: 999, resultset-id: 0, message: SET autocommit=0
Wed Apr 25 14:38:20 EEST 2007 INFO: Profiler Event: [FETCH]     at org.apache.commons.dbcp.DelegatingConnection.setAutoCommit(DelegatingConnection.java:221) dur
ation: 0 ms, connection-id: 313, statement-id: 999, resultset-id: 0
INFO  DefaultDatabaseLocker          - Attempting to acquire the exclusive lock to become the Master broker
Wed Apr 25 14:38:20 EEST 2007 INFO: Profiler Event: [QUERY]     at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:
117) duration: 0 ms, connection-id: 313, statement-id: 8, resultset-id: 0, message: LOCK TABLE ACTIVEMQ_LOCK WRITE
Wed Apr 25 14:38:20 EEST 2007 INFO: Profiler Event: [FETCH]     at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:
117) duration: 0 ms, connection-id: 313, statement-id: 8, resultset-id: 0
INFO  DefaultDatabaseLocker          - Attempting to acquire the exclusive lock to become the Master broker
Wed Apr 25 14:38:21 EEST 2007 INFO: Profiler Event: [QUERY]     at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:
117) duration: 0 ms, connection-id: 313, statement-id: 8, resultset-id: 0, message: LOCK TABLE ACTIVEMQ_LOCK WRITE
Wed Apr 25 14:38:21 EEST 2007 INFO: Profiler Event: [FETCH]     at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:
117) duration: 0 ms, connection-id: 313, statement-id: 8, resultset-id: 0
INFO  DefaultDatabaseLocker          - Attempting to acquire the exclusive lock to become the Master broker
Wed Apr 25 14:38:22 EEST 2007 INFO: Profiler Event: [QUERY]     at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:
117) duration: 0 ms, connection-id: 313, statement-id: 8, resultset-id: 0, message: LOCK TABLE ACTIVEMQ_LOCK WRITE
Wed Apr 25 14:38:22 EEST 2007 INFO: Profiler Event: [FETCH]     at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:
117) duration: 0 ms, connection-id: 313, statement-id: 8, resultset-id: 0
INFO  DefaultDatabaseLocker          - Attempting to acquire the exclusive lock to become the Master broker
Wed Apr 25 14:38:23 EEST 2007 INFO: Profiler Event: [QUERY]     at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:
117) duration: 0 ms, connection-id: 313, statement-id: 8, resultset-id: 0, message: LOCK TABLE ACTIVEMQ_LOCK WRITE
Wed Apr 25 14:38:23 EEST 2007 INFO: Profiler Event: [FETCH]     at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:
117) duration: 0 ms, connection-id: 313, statement-id: 8, resultset-id: 0



---------------------------- END LOG ---------------------------------


All mentioned in errors commands are easily executed from MySQL Console. Tables are get created in the schema, I've no idea about what problem is. Has anyone tried to run it with MySQL persistence?

Thanks in advance for any help.



Re: Failing to acquire exclusive lock - MySQL

by James.Strachan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 4/18/07, millea1 <amiller@...> wrote:

>
>
>
> James.Strachan wrote:
> >
> > Which version of MySQL are you using? You are not running multiple
> > brokers against the same database are you by any chance?
> >
> > I have this same problem when upgrading from 4.1 to 4.1.1 (mysql version
> > 5.0.19) in a JBoss integration; the only broker running against the DB.

FWIW you can disable the pure JDBC master/slave functionality if
required via the

useDatabaseLock="false" attribute on <jdbcPersistenceAdapter>

http://people.apache.org/repo/m2-ibiblio-rsync-repository/org/apache/activemq/activemq-core/4.1.1/activemq-core-4.1.1.xsd.html#jdbcPersistenceAdapter



--

James
-------
http://radio.weblogs.com/0112098/

Re: Failing to acquire exclusive lock - MySQL

by Anthrope :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

There is a bug in the 4.1.1 release version of DefaultDatabaseLocker.java. The problem is that the result of the execution of the prepared statement to lock the database row is being incorrectly interpreted. This link ought to explain why:

http://java.sun.com/j2se/1.4.2/docs/api/java/sql/PreparedStatement.html#execute()

I fixed and recompiled activemq and am able to use ActiveMQ 4.1.1 with MySQL in Master-Slave configuration quite alright.

Prashanth



Just additional information - this only happens when using mySQL - I tried this using derby and it works fine...
I"m using mysql 5.0.37

mjanveaux wrote:
Hello,

I recently upgraded to ActiveMQ 4.1.1 from 4.0.1  I integrated ActiveMQ into my application using spring but not using the spring jms templates etc... Here's what I have in my spring configuration for my broker:

<bean id="broker" class="org.apache.activemq.xbean.BrokerFactoryBean">
    <property name="config"><value>/WEB-INF/activemq.xml</value></property>
    <property name="start"><value>true</value></property>
</bean>

Here's my activemq.xml file...
activemq.xml

My application is now failing to startup with the following messages in the logs over and over:
INFO 17/04/2007 21:27:02 Main Thread  org.apache.activemq.store.jdbc.DefaultDatabaseLocker - Attempting to acquire the exclusive lock to become the Master broker
DEBUG 17/04/2007 21:27:02 Main Thread  org.apache.activemq.store.jdbc.DefaultDatabaseLocker - Sleeping for 1000 milli(s) before trying again to get the lock...
INFO 17/04/2007 21:27:03 Main Thread  org.apache.activemq.store.jdbc.DefaultDatabaseLocker - Attempting to acquire the exclusive lock to become the Master broker
DEBUG 17/04/2007 21:27:03 Main Thread  org.apache.activemq.store.jdbc.DefaultDatabaseLocker - Sleeping for 1000 milli(s) before trying again to get the lock...
INFO 17/04/2007 21:27:04 Main Thread  org.apache.activemq.store.jdbc.DefaultDatabaseLocker - Attempting to acquire the exclusive lock to become the Master broker
DEBUG 17/04/2007 21:27:04 Main Thread  org.apache.activemq.store.jdbc.DefaultDatabaseLocker - Sleeping for 1000 milli(s) before trying again to get the lock...


Am I missing a setting? Doing something wrong?  If anybody has some insight I'd appreciate this, I didn't have this problem before.

Thank you

Mark


Re: Failing to acquire exclusive lock - MySQL

by Mykola :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Anthrope wrote:
There is a bug in the 4.1.1 release version of DefaultDatabaseLocker.java. The problem is that the result of the execution of the prepared statement to lock the database row is being incorrectly interpreted. This link ought to explain why:
This bug exist also in 4.1 version, I've added it to issue tracking
http://issues.apache.org/activemq/browse/AMQ-1236
but it is still unassigned

Re: Failing to acquire exclusive lock - MySQL

by James.Strachan :: Rate this Message: