4 Replies Latest reply: Jan 11, 2010 11:14 AM by Brian Stansberry RSS

Getting exception on JBoss-5.1.0.GA AS cluster even when no application is deployed on it: java.sql.SQLException: Table 'TIMERS' already exists

Rupesh Bhadeshiya Newbie

Hi,

 

We are getting an exception when starting 2 JBoss-5.1.0.GA AS nodes in a cluster, even without deploying any application on it. We are stuck there, and really need help to come out of it and continue with deploying our ear on it successfully.

 

When we start first node (node-1), it creates several tables in the database. TIMERS table is one of them. When we start second node (node-2), it throws exception:

             java.sql.SQLException: Table 'TIMERS' already exists

And hence server does not start properly.

 

This scenario is observed only in clustering and is observed even when we haven’t deployed any of our ear/war/jar application on it.

 

Same error also comes for table HILOSEQUENCES. For it we somehow managed it by setting attribute ‘CreateTable’ to ‘false’ in ‘jboss-service.xml’ in <JBOSS_HOME>\server\all\deploy\uuid-key-generator.sar\META-INF folder. We set it to false on node-2 once the table is created by JBoss which started on node-1, so it again does not go for firing ‘Create Table Query’ on node-2.

 

Actually this is also not proper way to do it, but we did not found any other way. Here also if you can help us then it will be very helpful to us.

 

But we did not found anything similar for TIMERS table.

 

Now if TIMERS table is required anyway then just like other JMS tables which are also created at JBoss server start and as JBoss ignores them ‘exception is ignored by JBoss for them’, similarly why same is not happening in case of ‘TIMERS’ table...?

 

Can anyone please help out here, we are badly stuck at it.

 

Below is the stack trace.

 

<code>

20:18:49,784 INFO  [ServerImpl] Starting JBoss (Microcontainer)...

20:18:49,784 INFO  [ServerImpl] Release ID: JBoss [The Oracle] 5.1.0.GA (build: SVNTag=JBoss_5_1_0_GA date=200905221053)

20:18:49,784 INFO  [ServerImpl] Bootstrap URL: null

20:18:49,784 INFO  [ServerImpl] Home Dir: C:\Java\App Servers\jboss-5.1.0.GA

20:18:49,784 INFO  [ServerImpl] Home URL: file:/C:/Java/App%20Servers/jboss-5.1.0.GA/

20:18:49,784 INFO  [ServerImpl] Library URL: file:/C:/Java/App%20Servers/jboss-5.1.0.GA/lib/

20:18:49,784 INFO  [ServerImpl] Patch URL: null

20:18:49,784 INFO  [ServerImpl] Common Base URL: file:/C:/Java/App%20Servers/jboss-5.1.0.GA/common/

20:18:49,784 INFO  [ServerImpl] Common Library URL: file:/C:/Java/App%20Servers/jboss-5.1.0.GA/common/lib/

20:18:49,784 INFO  [ServerImpl] Server Name: all

20:18:49,784 INFO  [ServerImpl] Server Base Dir: C:\Java\App Servers\jboss-5.1.0.GA\server

20:18:49,784 INFO  [ServerImpl] Server Base URL: file:/C:/Java/App%20Servers/jboss-5.1.0.GA/server/

20:18:49,784 INFO  [ServerImpl] Server Config URL: file:/C:/Java/App%20Servers/jboss-5.1.0.GA/server/all/conf/

20:18:49,784 INFO  [ServerImpl] Server Home Dir: C:\Java\App Servers\jboss-5.1.0.GA\server\all

20:18:49,784 INFO  [ServerImpl] Server Home URL: file:/C:/Java/App%20Servers/jboss-5.1.0.GA/server/all/

20:18:49,784 INFO  [ServerImpl] Server Data Dir: C:\Java\App Servers\jboss-5.1.0.GA\server\all\data

20:18:49,784 INFO  [ServerImpl] Server Library URL: file:/C:/Java/App%20Servers/jboss-5.1.0.GA/server/all/lib/

20:18:49,784 INFO  [ServerImpl] Server Log Dir: C:\Java\App Servers\jboss-5.1.0.GA\server\all\log

20:18:49,784 INFO  [ServerImpl] Server Native Dir: C:\Java\App Servers\jboss-5.1.0.GA\server\all\tmp\native

20:18:49,784 INFO  [ServerImpl] Server Temp Dir: C:\Java\App Servers\jboss-5.1.0.GA\server\all\tmp

20:18:49,784 INFO  [ServerImpl] Server Temp Deploy Dir: C:\Java\App Servers\jboss-5.1.0.GA\server\all\tmp\deploy

20:18:50,268 INFO  [ServerImpl] Starting Microcontainer, bootstrapURL=file:/C:/Java/App%20Servers/jboss-5.1.0.GA/server/all/conf/bootstrap.xml

20:18:50,784 INFO  [VFSCacheFactory] Initializing VFSCache [org.jboss.virtual.plugins.cache.CombinedVFSCache]

20:18:50,784 INFO  [VFSCacheFactory] Using VFSCache [CombinedVFSCache[real-cache: null]]

20:18:51,065 INFO  [CopyMechanism] VFS temp dir: C:\Java\App Servers\jboss-5.1.0.GA\server\all\tmp

20:18:51,065 INFO  [ZipEntryContext] VFS force nested jars copy-mode is enabled.

20:18:52,315 INFO  [ServerInfo] Java version: 1.5.0_12,Sun Microsystems Inc.

20:18:52,315 INFO  [ServerInfo] Java Runtime: Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_12-b04)

20:18:52,315 INFO  [ServerInfo] Java VM: Java HotSpot(TM) Client VM 1.5.0_12-b04,Sun Microsystems Inc.

20:18:52,315 INFO  [ServerInfo] OS-System: Windows XP 5.1,x86

20:18:52,315 INFO  [ServerInfo] VM arguments: -Djboss.home=C:\Java\App Servers\jboss-5.1.0.GA -Djava.library.path=C:\Java\jdk1.5.0_12\bin -Djava.endorsed.dirs=C:\Java\App Servers\jboss-5.1.0.GA\lib\endorsed -Xms256m -Xmx640m -XX:MaxPermSize=256m -Djboss.messaging.ServerPeerID=2 -Djboss.service.binding.set=ports-default -agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:1683

20:18:52,378 INFO  [JMXKernel] Legacy JMX core initialized

20:18:55,112 INFO  [ProfileServiceBootstrap] Loading profile: ProfileKey@40578d[domain=default, server=default, name=all]

20:18:59,347 INFO  [WebService] Using RMI server codebase: http://192.168.1.153:8083/

20:19:08,284 INFO  [NativeServerConfig] JBoss Web Services - Stack Native Core

20:19:08,284 INFO  [NativeServerConfig] 3.1.2.GA

20:19:09,378 INFO  [AttributeCallbackItem] Owner callback not implemented.

20:19:25,972 INFO  [orb] Property "jacorb.hashtable_class" is set to: java.util.Hashtable

20:19:26,003 INFO  [singleton] created ORBSingleton

20:19:26,206 INFO  [interceptors] InterceptorManager started with 2 Server Interceptors, 2 Client Interceptors and 4 IOR Interceptors

20:19:26,409 INFO  [orb] ORB run

20:19:26,503 INFO  [poa] oid:

72 6F 6F 74                                                 root

object is activated

20:19:26,940 INFO  [CorbaNamingService] CORBA Naming Started

20:19:31,519 INFO  [JMXConnectorServerService] JMX Connector server: service:jmx:rmi://192.168.1.153/jndi/rmi://192.168.1.153:1090/jmxconnector

20:19:31,972 INFO  [MailService] Mail Service bound to java:/MyMailSession

20:19:33,222 INFO  [SnmpAgentService] SNMP agent going active

20:19:36,378 INFO  [JChannel] JGroups version: 2.6.10.GA

20:19:36,909 INFO  [test1cluster] Initializing partition test1cluster

 

---------------------------------------------------------

GMS: address is 192.168.1.153:1692 (cluster=test1cluster)

---------------------------------------------------------

20:19:37,097 INFO  [test1cluster] Number of cluster members: 2

20:19:37,097 INFO  [test1cluster] Other members: 1

20:19:37,159 INFO  [PlatformMBeanServerRegistration] JBossCache MBeans were successfully registered to the platform mbean server.

20:19:37,175 INFO  [JChannel] JGroups version: 2.6.10.GA

 

---------------------------------------------------------

GMS: address is 192.168.1.153:1692 (cluster=test1cluster-HAPartitionCache)

---------------------------------------------------------

20:19:37,316 INFO  [RPCManagerImpl] Received new cluster view: [192.168.1.197:9595|7] [192.168.1.197:9595, 192.168.1.153:1692]

20:19:37,394 INFO  [LegacyStateTransferIntegrator] Using version 4096

20:19:37,425 INFO  [RPCManagerImpl] Cache local address is 192.168.1.153:1692

20:19:37,425 INFO  [RPCManagerImpl] state was retrieved successfully (in 172 milliseconds)

20:19:37,441 INFO  [ComponentRegistry] JBoss Cache version: JBossCache 'Cascabel' 3.1.0.GA

20:19:37,441 INFO  [test1cluster] Fetching serviceState (will wait for 30000 milliseconds):

20:19:37,550 INFO  [test1cluster] serviceState was retrieved successfully (in 109 milliseconds)

20:19:37,737 INFO  [HANamingService] Started HAJNDI bootstrap; jnpPort=1100, backlog=50, bindAddress=/192.168.1.153

20:19:37,737 INFO  [DetachedHANamingService$AutomaticDiscovery] Listening on /192.168.1.153:1102, group=239.255.100.101, HA-JNDI address=192.168.1.153:1100

20:19:39,472 INFO  [UnifiedInvokerHA] Service name is jboss:service=invoker,type=unifiedha

20:19:40,956 WARN  [JBossASSecurityMetadataStore] WARNING! POTENTIAL SECURITY RISK. It has been detected that the MessageSucker component which sucks messages from one node to another has not had its password changed from the installation default. Please see the JBoss Messaging user guide for instructions on how to do this.

20:19:40,987 WARN  [AnnotationCreator] No ClassLoader provided, using TCCL: org.jboss.managed.api.annotation.ManagementComponent

20:19:41,316 WARN  [AnnotationCreator] No ClassLoader provided, using TCCL: org.jboss.managed.api.annotation.ManagementComponent

20:19:41,456 INFO  [TransactionManagerService] JBossTS Transaction Service (JTA version - tag:JBOSSTS_4_6_1_GA) - JBoss Inc.

20:19:41,456 INFO  [TransactionManagerService] Setting up property manager MBean and JMX layer

20:19:41,909 INFO  [TransactionManagerService] Initializing recovery manager

20:19:42,175 INFO  [TransactionManagerService] Recovery manager configured

20:19:42,175 INFO  [TransactionManagerService] Binding TransactionManager JNDI Reference

20:19:42,237 INFO  [TransactionManagerService] Starting transaction recovery manager

20:19:43,378 INFO  [Http11Protocol] Initializing Coyote HTTP/1.1 on http-192.168.1.153-8080

20:19:43,409 INFO  [AjpProtocol] Initializing Coyote AJP/1.3 on ajp-192.168.1.153-8009

20:19:43,456 INFO  [StandardService] Starting service jboss.web

20:19:43,456 INFO  [StandardEngine] Starting Servlet Engine: JBoss Web/2.1.3.GA

20:19:43,566 INFO  [Catalina] Server startup in 162 ms

20:19:43,597 INFO  [TomcatDeployment] deploy, ctxPath=/juddi

20:19:44,472 INFO  [RegistryServlet] Loading jUDDI configuration.

20:19:44,503 INFO  [RegistryServlet] Resources loaded from: /WEB-INF/juddi.properties

20:19:44,503 INFO  [RegistryServlet] Initializing jUDDI components.

20:19:45,566 INFO  [TomcatDeployment] deploy, ctxPath=/jbossws

20:19:45,659 INFO  [TomcatDeployment] deploy, ctxPath=/invoker

20:19:45,753 INFO  [TomcatDeployment] deploy, ctxPath=/web-console

20:19:46,378 INFO  [RARDeployment] Required license terms exist, view vfszip:/C:/Java/App Servers/jboss-5.1.0.GA/server/all/deploy/jboss-local-jdbc.rar/META-INF/ra.xml

20:19:46,425 INFO  [RARDeployment] Required license terms exist, view vfszip:/C:/Java/App Servers/jboss-5.1.0.GA/server/all/deploy/jboss-xa-jdbc.rar/META-INF/ra.xml

20:19:46,456 INFO  [RARDeployment] Required license terms exist, view vfszip:/C:/Java/App Servers/jboss-5.1.0.GA/server/all/deploy/jms-ra.rar/META-INF/ra.xml

20:19:46,503 INFO  [RARDeployment] Required license terms exist, view vfszip:/C:/Java/App Servers/jboss-5.1.0.GA/server/all/deploy/mail-ra.rar/META-INF/ra.xml

20:19:46,581 INFO  [RARDeployment] Required license terms exist, view vfszip:/C:/Java/App Servers/jboss-5.1.0.GA/server/all/deploy/quartz-ra.rar/META-INF/ra.xml

20:19:46,800 INFO  [SimpleThreadPool] Job execution threads will use class loader of thread: main

20:19:46,894 INFO  [QuartzScheduler] Quartz Scheduler v.1.5.2 created.

20:19:46,894 INFO  [RAMJobStore] RAMJobStore initialized.

20:19:46,894 INFO  [StdSchedulerFactory] Quartz scheduler 'DefaultQuartzScheduler' initialized from default resource file in Quartz package: 'quartz.properties'

20:19:46,894 INFO  [StdSchedulerFactory] Quartz scheduler version: 1.5.2

20:19:46,894 INFO  [QuartzScheduler] Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started.

20:19:47,331 INFO  [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=MYDS' to JNDI name 'java:MYDS'

20:19:47,894 WARN  [JDBCPersistenceManager]

 

JBoss Messaging Warning: DataSource connection transaction isolation should be READ_COMMITTED, but it is currently REPEATABLE_READ.

                         Using an isolation level less strict than READ_COMMITTED may lead to data consistency problems.

                         Using an isolation level more strict than READ_COMMITTED may lead to deadlock.

 

20:19:48,284 INFO  [ServerPeer] JBoss Messaging 1.4.3.GA server [2] started

20:19:48,503 INFO  [ConnectionFactoryJNDIMapper] supportsFailover attribute is true on connection factory: jboss.messaging.connectionfactory:service=ConnectionFactory but post office is non clustered. So connection factory will *not* support failover

20:19:48,503 INFO  [ConnectionFactoryJNDIMapper] supportsLoadBalancing attribute is true on connection factory: jboss.messaging.connectionfactory:service=ConnectionFactory but post office is non clustered. So connection factory will *not* support load balancing

20:19:48,644 INFO  [ConnectionFactory] Connector bisocket://192.168.1.153:4457 has leasing enabled, lease period 10000 milliseconds

20:19:48,644 INFO  [ConnectionFactory] org.jboss.jms.server.connectionfactory.ConnectionFactory@13beecf started

20:19:48,644 INFO  [ConnectionFactoryJNDIMapper] supportsFailover attribute is true on connection factory: jboss.messaging.connectionfactory:service=ClusteredConnectionFactory but post office is non clustered. So connection factory will *not* support failover

20:19:48,644 INFO  [ConnectionFactoryJNDIMapper] supportsLoadBalancing attribute is true on connection factory: jboss.messaging.connectionfactory:service=ClusteredConnectionFactory but post office is non clustered. So connection factory will *not* support load balancing

20:19:48,644 INFO  [ConnectionFactory] Connector bisocket://192.168.1.153:4457 has leasing enabled, lease period 10000 milliseconds

20:19:48,644 INFO  [ConnectionFactory] org.jboss.jms.server.connectionfactory.ConnectionFactory@127e9e9 started

20:19:48,659 INFO  [QueueService] Queue[/queue/MyQueue1] started, fullSize=200000, pageSize=2000, downCacheSize=2000

20:19:48,675 INFO  [QueueService] Queue[/queue/MyQueue2] started, fullSize=200000, pageSize=2000, downCacheSize=2000

20:19:48,878 INFO  [QueueService] Queue[/queue/MyQueue3] started, fullSize=200000, pageSize=2000, downCacheSize=2000

20:19:48,894 INFO  [TopicService] Topic[/topic/MyTopic1] started, fullSize=200000, pageSize=2000, downCacheSize=2000

20:19:48,894 INFO  [QueueService] Queue[/queue/MyQueue4] started, fullSize=200000, pageSize=2000, downCacheSize=2000

20:19:48,894 INFO  [TopicService] Topic[/topic/MyTopic2] started, fullSize=200000, pageSize=2000, downCacheSize=2000

20:19:48,894 INFO  [TopicService] Topic[/topic/MyTopic3] started, fullSize=200000, pageSize=2000, downCacheSize=2000

20:19:48,894 INFO  [QueueService] Queue[/queue/MyQueue5] started, fullSize=200000, pageSize=2000, downCacheSize=2000

20:19:48,894 INFO  [ConnectionFactory] Connector bisocket://192.168.1.153:4457 has leasing enabled, lease period 10000 milliseconds

20:19:48,894 INFO  [ConnectionFactory] org.jboss.jms.server.connectionfactory.ConnectionFactory@6480d7 started

20:19:48,909 INFO  [QueueService] Queue[/queue/MyQueue6] started, fullSize=200000, pageSize=2000, downCacheSize=2000

20:19:48,909 INFO  [TopicService] Topic[/topic/MyTopic4] started, fullSize=200000, pageSize=2000, downCacheSize=2000

20:19:48,909 INFO  [TopicService] Topic[/topic/MyTopic5] started, fullSize=200000, pageSize=2000, downCacheSize=2000

20:19:48,909 INFO  [TopicService] Topic[/topic/MyTopic6] started, fullSize=200000, pageSize=2000, downCacheSize=2000

20:19:48,941 INFO  [QueueService] Queue[/queue/MyQueue7] started, fullSize=200000, pageSize=2000, downCacheSize=2000

20:19:48,941 INFO  [TopicService] Topic[/topic/MyTopic7] started, fullSize=200000, pageSize=2000, downCacheSize=2000

20:19:48,941 INFO  [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=JmsXA' to JNDI name 'java:JmsXA'

20:19:49,034 ERROR [AbstractKernelController] Error installing to Start: name=jboss.ejb:persistencePolicy=database,service=EJBTimerService state=Create mode=Manual requiredState=Installed

java.sql.SQLException: Table 'TIMERS' already exists

      at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2926)

      at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1571)

      at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1666)

      at com.mysql.jdbc.Connection.execSQL(Connection.java:2972)

      at com.mysql.jdbc.Connection.execSQL(Connection.java:2902)

      at com.mysql.jdbc.Statement.executeUpdate(Statement.java:929)

      at org.jboss.resource.adapter.jdbc.WrappedStatement.executeUpdate(WrappedStatement.java:249)

      at org.jboss.ejb.txtimer.GeneralPurposeDatabasePersistencePlugin.createTableIfNotExists(GeneralPurposeDatabasePersistencePlugin.java:175)

      at org.jboss.ejb.txtimer.DatabasePersistencePolicy.startService(DatabasePersistencePolicy.java:104)

      at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:376)

      at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:322)

      at sun.reflect.GeneratedMethodAccessor163.invoke(Unknown Source)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

      at java.lang.reflect.Method.invoke(Method.java:585)

      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)

      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)

      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)

      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:189)

      at $Proxy38.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:1631)

      at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)

      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)

      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:1631)

      at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)

      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)

      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:702)

      at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)

      at org.jboss.system.server.profileservice.repository.ProfileDeployAction.install(ProfileDeployAction.java:70)

      at org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53)

      at org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:361)

      at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

      at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)

      at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)

      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)

      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.server.profileservice.repository.AbstractProfileService.activateProfile(AbstractProfileService.java:306)

      at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:271)

      at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)

      at org.jboss.Main.boot(Main.java:221)

      at org.jboss.Main$1.run(Main.java:556)

      at java.lang.Thread.run(Thread.java:595)

20:19:49,206 INFO  [TomcatDeployment] deploy, ctxPath=/admin-console

20:19:49,362 INFO  [config] Initializing Mojarra (1.2_12-b01-FCS) for context '/admin-console'

20:19:56,613 INFO  [TomcatDeployment] deploy, ctxPath=/jmx-console

20:19:56,988 ERROR [ProfileServiceBootstrap] Failed to load profile: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):

 

DEPLOYMENTS MISSING DEPENDENCIES:

  Deployment "jboss.ejb:service=EJBTimerService" is missing the following dependencies:

    Dependency "jboss.ejb:persistencePolicy=database,service=EJBTimerService" (should be in state "Create", but is actually in state "**ERROR**")

 

DEPLOYMENTS IN ERROR:

  Deployment "jboss.ejb:persistencePolicy=database,service=EJBTimerService" is in error due to the following reason(s): **ERROR**, java.sql.SQLException: Table 'TIMERS' already exists

 

20:19:57,003 INFO  [Http11Protocol] Starting Coyote HTTP/1.1 on http-192.168.1.153-8080

20:19:57,050 INFO  [AjpProtocol] Starting Coyote AJP/1.3 on ajp-192.168.1.153-8009

20:19:57,066 INFO  [ServerImpl] JBoss (Microcontainer) [5.1.0.GA (build: SVNTag=JBoss_5_1_0_GA date=200905221053)] Started in 1m:7s:282ms

</code>

 

Thanks in advance for all your help.

 

Regards,

Rupesh Bhadeshiya

  • 1. Re: Getting exception on JBoss-5.1.0.GA AS cluster even when no application is deployed on it: java.sql.SQLException: Table 'TIMERS' already exists
    Brian Stansberry Master

    Hmm, the JDBC statement execution that is throwing the exception[1] is guarded by a call to a utility method that's meant to check whether the table exists.[2]  You see anything that looks wrong in [2]?

     

    Are you starting the 2 servers concurrently? Perhaps a race condition? That seems really unlikely though, extremely unlikely to be repeated.

     

    [1] Method createTableIfNotExists in http://anonsvn.jboss.org/repos/jbossas/trunk/server/src/main/java/org/jboss/ejb/txtimer/GeneralPurposeDatabasePersistencePlugin.java

    [2] Method tableExists in http://anonsvn.jboss.org/repos/jbossas/trunk/server/src/main/java/org/jboss/ejb/plugins/cmp/jdbc/SQLUtil.java

  • 2. Re: Getting exception on JBoss-5.1.0.GA AS cluster even when no application is deployed on it: java.sql.SQLException: Table 'TIMERS' already exists
    Rupesh Bhadeshiya Newbie

    Thanks Brian.

     

    I have gone through the classes but by looking at them I was not able to find any issue there. Moreover I am starting both servers one after other and not simultaneously so 'race condition' also does not seem to be a problem.

     

    Now, I am very confused. In a fresh downloaded copy of JBoss-5.1.0.GA AS, in its 'all' server configuration, I am just configuring it for MySQL Database, following link: http://www.jboss.org/file-access/default/members/jbossas/freezone/docs/Administration_And_Configuration_Guide/5/html/alternative_DBs.html, and doing nothing else, then why the errors would come.

     

    Below are all steps that I am doing for configuring an alternate database - MySQL in my case; if there are any wrong step(s)/missing step(s)/unncessary(or extra) step(s), then please point me at that also:

    1. removed older hsqldb-ds.xml from \server\all\deploy.

    2. placed a mysql-ds.xml in \server\all\deploy (DataSource name is 'MyDS').

    3. removed hsqldb-persistence-service.xml from \server\all\deploy\messaging.

    4. picked up the mysql-persistence-service.xml from docs\examples\jms & placed it in \server\all\deploy\messaging

    5. searched for all occurrences of 'DefaultDS' in 'all' folder {JBOSS_HOME\server\all} and replaced them with our DataSource name 'MyDS'.

    6. Then started JBoss in 'all' mode. It starts perfectly with no error. Ok, now shut it down.

    7. Now start it again. And you got below errors:

     

    ...

    java.sql.SQLException: Table 'HILOSEQUENCES' already exists

    ...

    java.sql.SQLException: Table 'TIMERS' already exists

    ...

     

    Error comes only for these 2 tables. Not for any other tables.

     

    Moreover, this error does not come when running JBoss in 'all' mode without changing its database configuration i.e. keeping the default configured 'Hsqldb' as it is ... in that case, start JBoss, stop, again start, stop, ... so on and no problem. Thats the real confusion and blocking point to me ...

     

    I am getting this error even when instead of performing step-5 in above steps, i just rename our data source to 'DefaultDS', and try then also getting the error. This is where I am blocke and am really dumb at what step I forgot, or missed or misconfigured that I am getting error for any other database and not for the 'Hsqldb' (or the default configured database)... ? I gone through the instructions on 'configuring an alternate database' again, many times analyzed my steps with fresh copies of Jboss, and even did a lot searching on internet, but am not finding any solution, any clue to the error. I request you humbly to help me here. Really got stuck here.

     

    Kind regards,

    Rupesh Bhadeshiya

  • 3. Re: Getting exception on JBoss-5.1.0.GA AS cluster even when no application is deployed on it: java.sql.SQLException: Table 'TIMERS' already exists
    Rupesh Bhadeshiya Newbie

    Hi Brain,

     

    I found solution to my problem. It was related to the version of 'mysql driver' I was using. I was using mysql driver version 3.1.11 (we are already using it with JBoss-4.0.5.GA AS). I downloaded latest mysql driver version 5.1.10 and JBoss server has started successfully. Yet I have not deployed out ear application on it, but atleast it started. Thanks to all your help.

     

    Actually I was again and again thinking over all my steps, creating a matrix of all combinations of all things where there can be problem and then I came to mysql driver ... at that point I just thought looking at code of SQLUtil.tableExists() and asked a question that can it be possible that this code is firing a query to detect if the table TIMERS already exists but somehow that query is not executed or got a wrong answer which let it think it does not exist and hence then fire create table query to create this table. So I went for new version of mysql connectorJ and that helped out. Actually I also got to the solution by comparing hsdqldb related files and new added mysql related files to get a point as what is different between them and I really didn't find any special thing (there will be ofcourse DB specific different things), and then I ponder over to database - driver. Anyway, now I will proceed with deploying our ear application on it.

     

    Thanks to all.

     

    Best Regards,

    Rupesh Bhadeshiya

  • 4. Re: Getting exception on JBoss-5.1.0.GA AS cluster even when no application is deployed on it: java.sql.SQLException: Table 'TIMERS' already exists
    Brian Stansberry Master

    Great; glad you got that sorted. I was hoping posting the link to the SQLUtil code would lead you to a path where the problem would be more visible.

     

    Just an aside; when you use hsqldb, each AS actually launches it's own database; it's not a shared database. Which is why we say to replace it for real clusters.   But you'd never have *this* kind of problem with the hsqldb config.