[jboss-user] [Installation, Configuration & DEPLOYMENT] - Re: Multiple data sources when using MySQL

cpslo1999 do-not-reply at jboss.com
Thu Apr 16 13:50:52 EDT 2009


I eliminated this last error by shutting down JBoss, truncating the timers table, and then restarting JBoss.

Another issue has come up with this configuration. I tried to install a second box (one of our testing serviers) using the final configuration from the above experiments and ran into problems.

Apparently, if I use the XA data source specification that I show above (without first using the non-XA source), then the JMS tables will not get created in the database and the Messaging service fails to start. Here are some stacktrace snips:

  | 2009-04-16 10:17:34,446 DEBUG [org.jboss.messaging.core.jmx.JDBCPersistenceManagerService] (main) Starting jboss.messaging:service=PersistenceManager
  | 
  | 2009-04-16 10:17:34,493 DEBUG [org.jboss.messaging.core.impl.JDBCSupport] (main) Failed to execute: CREATE TABLE JBM_DUAL (DUMMY INTEGER, PRIMARY KEY (DUMMY)) ENGINE = INNODB
  | 
  | java.sql.SQLException: XAER_RMFAIL: The command cannot be executed when global transaction is in the  ACTIVE state
  | 
  | 	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055)
  | 
  | 	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
  | 
  | 	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3515)
  | 
  | 	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3447)
  | 
  | 	at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1951)
  | 
  | 	at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2101)
  | 
  | 	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2548)
  | 
  | 	at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1605)
  | 
  | 	at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1524)
  | 
  | 	at com.mysql.jdbc.jdbc2.optional.StatementWrapper.executeUpdate(StatementWrapper.java:839)
  | 
  | 	at org.jboss.resource.adapter.jdbc.WrappedStatement.executeUpdate(WrappedStatement.java:249)
  | 
  | 	at org.jboss.messaging.core.impl.JDBCSupport.createSchema(JDBCSupport.java:301)
  | 
  | 	at org.jboss.messaging.core.impl.JDBCSupport.start(JDBCSupport.java:167)
  | 
  | 	at org.jboss.messaging.core.impl.JDBCPersistenceManager.start(JDBCPersistenceManager.java:148)
  | 
  | 	at org.jboss.messaging.core.jmx.JDBCPersistenceManagerService.startService(JDBCPersistenceManagerService.java:100)
  | 
  | 	at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:376)
  | 
  | 	at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:269)
  | 
  | 	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:597)
  | 
  | 	at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
  | 
  | 	at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
  | 
  | 	at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:138)
  | 
  | 	at org.jboss.mx.server.Invocation.invoke(Invocation.java:90)
  | 
  | 	at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:140)
  | 
  | 	at org.jboss.mx.server.Invocation.invoke(Invocation.java:90)
  | 
  | 	at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
  | 
  | 	at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
  | 
  | 	at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206)
  | 
  | 	at $Proxy36.start(Unknown Source)
  | 
  | 	at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)
  | 
  | 	at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)
  | 
  | 	at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
  | 
  | 	at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
  | 
  | 	at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
  | 
  | 	at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
  | 
  | 	at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:286)
  | 
  | 	at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
  | 
  | 	at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
  | 
  | 	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
  | 
  | 	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
  | 
  | 	at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
  | 
  | 	at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
  | 
  | 	at org.jboss.system.ServiceController.doChange(ServiceController.java:688)
  | 
  | 	at org.jboss.system.ServiceController.start(ServiceController.java:460)
  | 
  | 	at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:163)
  | 
  | 	at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:99)
  | 
  | 	at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:46)
  | 
  | 	at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
  | 
  | 	at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
  | 
  | 	at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
  | 
  | 	at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
  | 
  | 	at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
  | 
  | 	at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)
  | 
  | 	at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
  | 
  | 	at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
  | 
  | 	at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
  | 
  | 	at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
  | 
  | 	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
  | 
  | 	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
  | 
  | 	at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
  | 
  | 	at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
  | 
  | 	at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
  | 
  | 	at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:698)
  | 
  | 	at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:304)
  | 
  | 	at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:205)
  | 
  | 	at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:405)
  | 
  | 	at org.jboss.Main.boot(Main.java:209)
  | 
  | 	at org.jboss.Main$1.run(Main.java:547)
  | 
  | 	at java.lang.Thread.run(Thread.java:619)
  | 
...(omitted many similar traces for different JBM tables)...

  | 2009-04-16 10:17:34,509 DEBUG [org.jboss.messaging.core.impl.JDBCPersistenceManager] (main) Adding record on JBM_DUAL
  | 
  | 2009-04-16 10:17:34,524 DEBUG [org.jboss.messaging.core.impl.JDBCPersistenceManager] (main) Checking for existance on JBM_DUAL
  | 
  | 2009-04-16 10:17:34,524 ERROR [org.jboss.messaging.util.ExceptionUtil] (main) org.jboss.messaging.core.jmx.JDBCPersistenceManagerService at 112e6ef startService
  | 
  | com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'jbossdfmdb.jbm_dual' doesn't exist
  | 
  | 	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
  | 
  | 	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
  | 
  | 	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
  | 
  | 	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
  | 
  | 	at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
  | 
  | 	at com.mysql.jdbc.Util.getInstance(Util.java:381)
  | 
  | 	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1030)
  | 
  | 	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
  | 
  | 	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3515)
  | 
  | 	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3447)
  | 
  | 	at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1951)
  | 
  | 	at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2101)
  | 
  | 	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2548)
  | 
  | 	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2477)
  | 
  | 	at com.mysql.jdbc.StatementImpl.executeQuery(StatementImpl.java:1422)
  | 
  | 	at com.mysql.jdbc.jdbc2.optional.StatementWrapper.executeQuery(StatementWrapper.java:743)
  | 
  | 	at org.jboss.resource.adapter.jdbc.WrappedStatement.executeQuery(WrappedStatement.java:226)
  | 
  | 	at org.jboss.messaging.core.impl.JDBCPersistenceManager.start(JDBCPersistenceManager.java:203)
  | 
  | 	at org.jboss.messaging.core.jmx.JDBCPersistenceManagerService.startService(JDBCPersistenceManagerService.java:100)
  | 
  | 	at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:376)
  | 
  | 	at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:269)
  | 
  | 	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:597)
  | 
  | 	at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
  | 
  | 	at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
  | 
  | 	at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:138)
  | 
  | 	at org.jboss.mx.server.Invocation.invoke(Invocation.java:90)
  | 
  | 	at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:140)
  | 
  | 	at org.jboss.mx.server.Invocation.invoke(Invocation.java:90)
  | 
  | 	at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
  | 
  | 	at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
  | 
  | 	at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206)
  | 
  | 	at $Proxy36.start(Unknown Source)
  | 
  | 	at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)
  | 
  | 	at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)
  | 
  | 	at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
  | 
  | 	at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
  | 
  | 	at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
  | 
  | 	at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
  | 
  | 	at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:286)
  | 
  | 	at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
  | 
  | 	at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
  | 
  | 	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
  | 
  | 	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
  | 
  | 	at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
  | 
  | 	at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
  | 
  | 	at org.jboss.system.ServiceController.doChange(ServiceController.java:688)
  | 
  | 	at org.jboss.system.ServiceController.start(ServiceController.java:460)
  | 
  | 	at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:163)
  | 
  | 	at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:99)
  | 
  | 	at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:46)
  | 
  | 	at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
  | 
  | 	at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
  | 
  | 	at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
  | 
  | 	at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
  | 
  | 	at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
  | 
  | 	at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)
  | 
  | 	at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
  | 
  | 	at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
  | 
  | 	at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
  | 
  | 	at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
  | 
  | 	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
  | 
  | 	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
  | 
  | 	at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
  | 
  | 	at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
  | 
  | 	at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
  | 
  | 	at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:698)
  | 
  | 	at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:304)
  | 
  | 	at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:205)
  | 
  | 	at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:405)
  | 
  | 	at org.jboss.Main.boot(Main.java:209)
  | 
  | 	at org.jboss.Main$1.run(Main.java:547)
  | 
  | 	at java.lang.Thread.run(Thread.java:619)
  | 
  | 2009-04-16 10:17:34,524 DEBUG [org.jboss.messaging.core.jmx.JDBCPersistenceManagerService] (main) Starting failed jboss.messaging:service=PersistenceManager
  | 

According to 
http://www.jboss.org/index.html?module=bb&op=viewtopic&t=84442&postdays=0&postorder=asc&start=0 I shouldn't be using XA for my messaging. This sends me back to the beginning in configuring two data sources.

Perhaps I should just move the timer to my application's datasource. Is there a problem doing that?

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4226007#4226007

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4226007



More information about the jboss-user mailing list