Bug 777985 (SOA-514)

Summary: helloworld_tx_sql_action quickstart - intermittent timing error - quickstart sometimes fails to start - infinite loop
Product: [JBoss] JBoss Enterprise SOA Platform 4 Reporter: Len DiMaggio <ldimaggi>
Component: JBossESB, ExamplesAssignee: Kevin Conner <kevin.conner>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: 4.2 CP01   
Target Milestone: ---   
Target Release: 4.2 CP02   
Hardware: Unspecified   
OS: Unspecified   
URL: http://jira.jboss.org/jira/browse/SOA-514
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
/opt/CP01/soa-4.2.0.GA_CP01.CR3.zip /opt/CP01/standalone-soa-4.2.0.GA_CP01.CR3.zip
Last Closed: 2008-06-10 20:56:32 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
server.log_SOA_514.gz
none
server.log.gz none

Description Len DiMaggio 2008-04-10 18:20:06 UTC
Date of First Response: 2008-04-17 01:46:45
project_key: SOA

It looks like the quickstart - on deploy - does not always complete executing the create.sql script before the sql provider defintion attempts to query the TX_ESB_MESSAGES table:

         <sql-provider name="SQLprovider" 
                                url="jdbc:hsqldb:hsql://localhost:1703"
                                datasource="java:/QuickstartDB">
                <sql-bus busid="TxHelloSQLChannel" >
                        <sql-message-filter
                                tablename="TX_ESB_MESSAGES"
                                message-id-column="MESSAGE_ID"
                                status-column="STATUS_COL"
                                insert-timestamp-column="TIMESTAMP_COL"
                                message-column="DATA_COLUMN"
                        />
                </sql-bus>
          </sql-provider>

The result is the infinite loop on the exception seen in the attached log:

2008-04-10 12:08:33,364 ERROR [STDERR] java.sql.SQLException: Table not found in statement [select MESSAGE_ID,TIMESTAMP_COL from TX_ESB_MESSAGES where STATUS_COL='P' order by 2]

When this problem is not seen - the problem listed in SOA-513 is seen.

I'm also seeing this problem with the SOA-P GA bits.

Comment 1 Len DiMaggio 2008-04-10 18:25:06 UTC
Attachment: Added: server.log_SOA_514.gz


Comment 2 Len DiMaggio 2008-04-10 18:49:05 UTC
The way to avoid this problem is to execute:

ant create

before

ant deploy

(to ensure that the tables are created before the test is run)



Comment 3 Len DiMaggio 2008-04-10 18:51:38 UTC
Link: Added: This issue is related to SOA-513


Comment 4 Len DiMaggio 2008-04-10 19:33:20 UTC
Link: Added: This issue is a dependency of JBESB-1649


Comment 5 Kevin Conner 2008-04-17 05:45:32 UTC
Link: Added: This issue depends JBESB-1669


Comment 6 Kevin Conner 2008-04-17 05:46:45 UTC
Len.  Apologies for this but the underlying ESB issue was fixed and rolled into the platform CP1 release.  It was part of the work I did on Monday/Tuesday.

Comment 8 Kevin Conner 2008-05-13 13:12:22 UTC
Len, this issue should have been addressed in the last CP release, can you please check again?

Comment 9 Kevin Conner 2008-05-13 13:12:44 UTC
Link: Removed: This issue is a dependency of JBESB-1649 


Comment 10 Len DiMaggio 2008-05-13 16:19:30 UTC
Kevin, it looks like the problem is still there in CP01:

10:26:23,611 INFO  [SessionFactoryObjectFactory] Bound factory to JNDI name: java:/hibernate/MonitoringSessionFactory
10:26:23,612 WARN  [SessionFactoryObjectFactory] InitialContext did not implement EventContext
10:39:08,329 INFO  [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=QuickstartDB' to JNDI name 'java:QuickstartDB'
10:39:08,408 INFO  [JBoss4ESBDeployer] create esb service, Quickstart_helloworld_TX_SQL_action.esb
10:39:08,509 WARN  [JBossManagedConnectionPool] Throwable while attempting to get a new connection: null
org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (java.sql.SQLException: socket creation error)
        at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:179)
        at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:577)
        at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:262)
        at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:500)
        at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:341)
        at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:315)
        at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:396)
        at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:842)
        at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:88)
        at org.jboss.internal.soa.esb.dependencies.DatabaseInitializer.initDatabase(DatabaseInitializer.java:96)
        at org.jboss.internal.soa.esb.dependencies.DatabaseInitializer.startService(DatabaseInitializer.java:159)
        at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
        at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
        at sun.reflect.GeneratedMethodAccessor3.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:155)
        at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
        at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
        at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
        at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
        at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
        at $Proxy0.start(Unknown Source)
        at org.jboss.system.ServiceController.start(ServiceController.java:417)
        at sun.reflect.GeneratedMethodAccessor9.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:155)
        at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
        at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
        at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
        at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
        at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
        at $Proxy4.start(Unknown Source)
        at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
        at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
        at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1015)
        at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
        at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
        at sun.reflect.GeneratedMethodAccessor23.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:155)
        at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
        at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
        at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
        at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
        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:659)
        at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
        at $Proxy9.deploy(Unknown Source)
        at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
        at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
        at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
        at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
        at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
Caused by: java.sql.SQLException: socket creation error
        at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
        at org.hsqldb.jdbc.jdbcConnection.<init>(Unknown Source)
        at org.hsqldb.jdbcDriver.getConnection(Unknown Source)
        at org.hsqldb.jdbcDriver.connect(Unknown Source)
        at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:171)
        ... 56 more
10:39:08,516 WARN  [ServiceController] Problem starting service jboss.esb:service=QuickstartDatabaseInitializer
org.jboss.util.NestedSQLException: Could not create connection; - nested throwable: (java.sql.SQLException: socket creation error); - nested throwable: (org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (java.sql.SQLException: socket creation error))
        at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:94)
        at org.jboss.internal.soa.esb.dependencies.DatabaseInitializer.initDatabase(DatabaseInitializer.java:96)
        at org.jboss.internal.soa.esb.dependencies.DatabaseInitializer.startService(DatabaseInitializer.java:159)
        at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
        at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
        at sun.reflect.GeneratedMethodAccessor3.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:155)
        at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
        at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
        at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
        at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
        at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
        at $Proxy0.start(Unknown Source)
        at org.jboss.system.ServiceController.start(ServiceController.java:417)
        at sun.reflect.GeneratedMethodAccessor9.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:155)
        at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
        at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
        at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
        at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
        at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
        at $Proxy4.start(Unknown Source)
        at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
        at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
        at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1015)
        at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
        at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
        at sun.reflect.GeneratedMethodAccessor23.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:155)
        at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
        at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
        at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
        at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
        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:659)
        at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
        at $Proxy9.deploy(Unknown Source)
        at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
        at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
        at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
        at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
        at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
Caused by: org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (java.sql.SQLException: socket creation error)
        at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:179)
        at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:577)
        at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:262)
        at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:500)
        at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:341)
        at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:315)
        at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:396)
        at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:842)
        at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:88)
        ... 48 more
Caused by: java.sql.SQLException: socket creation error
        at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
        at org.hsqldb.jdbc.jdbcConnection.<init>(Unknown Source)
        at org.hsqldb.jdbcDriver.getConnection(Unknown Source)
        at org.hsqldb.jdbcDriver.connect(Unknown Source)
        at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:171)
        ... 56 more
10:39:08,544 ERROR [URLDeploymentScanner] Incomplete Deployment listing:

--- MBeans waiting for other MBeans ---
ObjectName: jboss.esb:service=QuickstartDatabaseInitializer
  State: FAILED
  Reason: org.jboss.util.NestedSQLException: Could not create connection; - nested throwable: (java.sql.SQLException: socket creation error); - nested throwable: (org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (java.sql.SQLException: socket creation error))
  I Depend On:
    jboss.jca:service=DataSourceBinding,name=QuickstartDB
  Depends On Me:
    jboss.esb:deployment=Quickstart_helloworld_TX_SQL_action.esb

--- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
ObjectName: jboss.esb:service=QuickstartDatabaseInitializer
  State: FAILED
  Reason: org.jboss.util.NestedSQLException: Could not create connection; - nested throwable: (java.sql.SQLException: socket creation error); - nested throwable: (org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (java.sql.SQLException: socket creation error))
  I Depend On:
    jboss.jca:service=DataSourceBinding,name=QuickstartDB
  Depends On Me:
    jboss.esb:deployment=Quickstart_helloworld_TX_SQL_action.esb


10:39:08,552 INFO  [STDOUT] [Server@17ddc70]: [Thread[hypersonic-QuickstartDB,5,jboss]]: checkRunning(false) entered
10:39:08,552 INFO  [STDOUT] [Server@17ddc70]: [Thread[hypersonic-QuickstartDB,5,jboss]]: checkRunning(false) exited


Comment 11 Len DiMaggio 2008-05-13 16:19:30 UTC
Attachment: Added: server.log.gz


Comment 12 Kevin Conner 2008-05-13 16:35:51 UTC
Okay, this is a different issue but I think I know what it is.

Can you try changing the quickstart-ds.xml to specify org.jboss.internal.soa.esb.dependencies.HypersonicDatabase instead of org.jboss.jdbc.HypersonicDatabase?

Does this fix it?

Comment 13 Kevin Conner 2008-05-29 13:34:27 UTC
Link: Added: This issue depends JBESB-1776


Comment 14 Kevin Conner 2008-05-29 13:35:22 UTC
The second issue has been fixed in the CP branch and will make it into the next CP02.
The first issue was fixed in CP01.

Comment 15 Len DiMaggio 2008-06-10 20:56:04 UTC
Link: Added: This issue is related to SOA-566


Comment 16 Len DiMaggio 2008-06-10 20:56:32 UTC
Verified fixed in CR1 build of CP02.