We have a Master/Slave activemq with JDBC setup. The non master node occasionally stops because of connection close exception below
.jdbc.adapter.DefaultJDBCAdapter | WrapperSimpleAppMain 2014-08-15 12:23:12,828 | WARN | [c3p0] A PooledConnection that has already signalled a Connection error is still in use! | com.mchange.v2.c3p0.impl.NewPooledConnection | WrapperSimpleAppMain 2014-08-15 12:23:12,829 | WARN | [c3p0] Another error has occurred [ com.microsoft.sqlserver.jdbc.SQLServerException: The connection is closed. ] which will not be reported to listeners! | com.mchange.v2.c3p0.impl.NewPooledConnection | WrapperSimpleAppMain com.microsoft.sqlserver.jdbc.SQLServerException: The connection is closed. at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:190) at com.microsoft.sqlserver.jdbc.SQLServerConnection.checkClosed(SQLServerConnection.java:388) at com.microsoft.sqlserver.jdbc.SQLServerConnection.commit(SQLServerConnection.java:1936) at com.mchange.v2.c3p0.impl.NewProxyConnection.commit(NewProxyConnection.java:1007) at org.apache.activemq.store.jdbc.adapter.DefaultJDBCAdapter.doCreateTables(DefaultJDBCAdapter.java:121) at org.apache.activemq.store.jdbc.JDBCPersistenceAdapter.init(JDBCPersistenceAdapter.java:302) at org.apache.activemq.broker.LockableServiceSupport.preStart(LockableServiceSupport.java:89) at org.apache.activemq.util.ServiceSupport.start(ServiceSupport.java:54) at org.apache.activemq.broker.BrokerService.doStartPersistenceAdapter(BrokerService.java:640) at org.apache.activemq.broker.BrokerService.startPersistenceAdapter(BrokerService.java:629) at org.apache.activemq.broker.BrokerService.start(BrokerService.java:594) at org.apache.activemq.xbean.XBeanBrokerService.afterPropertiesSet(XBeanBrokerService.java:73) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1638) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1579) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1509) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:521) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:296) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:293) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:628) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479) at org.apache.xbean.spring.context.ResourceXmlApplicationContext.<init>(ResourceXmlApplicationContext.java:64) at org.apache.xbean.spring.context.ResourceXmlApplicationContext.<init>(ResourceXmlApplicationContext.java:52) at org.apache.activemq.xbean.XBeanBrokerFactory$1.<init>(XBeanBrokerFactory.java:104) at org.apache.activemq.xbean.XBeanBrokerFactory.createApplicationContext(XBeanBrokerFactory.java:104) at org.apache.activemq.xbean.XBeanBrokerFactory.createBroker(XBeanBrokerFactory.java:67) at org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:71) at org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:54) at org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:87) at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57) at org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:150) at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57) at org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:104) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.apache.activemq.console.Main.runTaskClass(Main.java:262) : ... 2014-08-15 12:23:12,839 | WARN | [c3p0] A PooledConnection that has already signalled a Connection error is still in use! | com.mchange.v2.c3p0.impl.NewPooledConnection | WrapperSimpleAppMain 2014-08-15 12:23:12,839 | WARN | [c3p0] Another error has occurred [ com.microsoft.sqlserver.jdbc.SQLServerException: The connection is closed. ] which will not be reported to listeners! | com.mchange.v2.c3p0.impl.NewPooledConnection | WrapperSimpleAppMain com.microsoft.sqlserver.jdbc.SQLServerException: The connection is closed. at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:190) at com.microsoft.sqlserver.jdbc.SQLServerConnection.checkClosed(SQLServerConnection.java:388) .. oolUtils | WrapperSimpleAppMain 2014-08-15 12:23:12,881 | INFO | Apache ActiveMQ 5.9.1 (somvs139, null) uptime 23 hours 6 minutes | org.apache.activemq.broker.BrokerService | WrapperSimpleAppMain 2014-08-15 12:23:12,882 | INFO | Apache ActiveMQ 5.9.1 (somvs139, null) is shutdown | org.apache.activemq.broker.BrokerService | WrapperSimpleAppMain 2014-08-15 12:23:12,882 | INFO | Closing org.apache.activemq.xbean.XBeanBrokerFactory$1@580cfca3: startup date [Thu Aug 14 13:16:22 PDT 2014]; root of context hierarchy | org.apache.activemq.xbean.XBeanBrokerFactory$1 | WrapperSimpleAppMain 2014-08-15 12:23:12,887 | WARN | Exception thrown from LifecycleProcessor on context close | org.apache.activemq.xbean.XBeanBrokerFactory$1 | WrapperSimpleAppMain java.lang.IllegalStateException: LifecycleProcessor not initialized - call 'refresh' before invoking lifecycle methods via the context: org.apache.activemq.xbean.XBeanBrokerFactory$1@580cfca3: startup date [Thu Aug 14 13:16:22 PDT 2014]; root of context hierarchy at org.springframework.context.support.AbstractApplicationContext.getLifecycleProcessor(AbstractApplicationContext.java:360) at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1057) at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:1010) at org.apache.activemq.hooks.SpringContextHook.run(SpringContextHook.java:30) at org.apache.activemq.broker.BrokerService.stop(BrokerService.java:809) at org.apache.activemq.xbean.XBeanBrokerService.stop(XBeanBrokerService.java:122) at org.apache.activemq.broker.BrokerService.start(BrokerService.java:601) at org.apache.activemq.xbean.XBeanBrokerService.afterPropertiesSet(XBeanBrokerService.java:73) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) My activemq configuration is as below <bean id="mssql-ds" class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close"> <property name="driverClass" value="com.microsoft.sqlserver.jdbc.SQLServerDriver" /> <property name="jdbcUrl" value="jdbc:sqlserver://itested.yaaaaa.com:1433;DataBaseName=mul" /> <property name="user" value="app_mu" /> <property name="password" value="" /> <property name="acquireIncrement" value="1" /> <property name="minPoolSize" value="2" /> <property name="maxPoolSize" value="40" /> <property name="testConnectionOnCheckin" value="true"/> <property name="idleConnectionTestPeriod" value="100" /> <property name="maxIdleTimeExcessConnections" value="80"/> <property name="automaticTestTable" value="contest" /> </bean> <persistenceAdapter> <jdbcPersistenceAdapter dataSource="#mssql-ds" /> </persistenceAdapter> Right now I have script that restarts if activemq stops because of this and restart. I works ok after restart. can someone help me with this thank you -- View this message in context: http://activemq.2283324.n4.nabble.com/Activemq-c3p0-connection-closed-tp4684636.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.