Bug 777976 (SOA-505)

Summary: NameNotFoundException: JbpmDS not bound when Seam DVD Example deployed
Product: [JBoss] JBoss Enterprise SOA Platform 4 Reporter: Jay Balunas <tech4j>
Component: Deployment, ExamplesAssignee: Kevin Conner <kevin.conner>
Status: CLOSED DUPLICATE QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: 4.2 GA   
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
URL: http://jira.jboss.org/jira/browse/SOA-505
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-04-22 14:02:40 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
soa-p-dvd-seam-ds-issue.txt none

Description Jay Balunas 2008-04-08 19:02:02 UTC
Date of First Response: 2008-04-09 13:26:54
project_key: SOA

Deploy the seam DVDStore example, and restart the SOA-P platform.  Only when the Seam DVD example is deployed, and the system is restarted does this error happen.   This does not happen if auto deployed, but will the next time the server is restarted.

The JbpmDS is configured as part of the jbpm.esb application.  I can not tell the exact cause.  It could be the known jar differences with Seam and SOA-P, or a conflicting ds.  

2008-04-08 14:46:13,685 INFO  [org.hibernate.cfg.HbmBinder] Mapping collection: org.jbpm.logging.log.CompositeLog.children -> JBPM_LOG
2008-04-08 14:46:13,705 INFO  [org.hibernate.util.NamingHelper] JNDI InitialContext properties:{}
2008-04-08 14:46:13,716 FATAL [org.hibernate.connection.DatasourceConnectionProvider] Could not find datasource: java:/JbpmDS
javax.naming.NameNotFoundException: JbpmDS not bound
        at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
        at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
        at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
        at org.jnp.server.NamingServer.lookup(NamingServer.java:296)
        at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)
        at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:589)
        at javax.naming.InitialContext.lookup(InitialContext.java:351)
        at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:52)
        at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:124)
        at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:56)
        at org.hibernate.cfg.SettingsFactory.createConnectionProvider(SettingsFactory.java:414)
        at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:62)
        at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2009)
        at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1292)
        at org.jbpm.persistence.db.DbPersistenceServiceFactory.getSessionFactory(DbPersistenceServiceFactory.java:91)
        at org.jbpm.persistence.jta.JtaDbPersistenceService.isCurrentJtaTransactionAvailable(JtaDbPersistenceService.java:46)
        at org.jbpm.persistence.jta.JtaDbPersistenceService.<init>(JtaDbPersistenceService.java:27)
        at org.jbpm.persistence.jta.JtaDbPersistenceServiceFactory.openService(JtaDbPersistenceServiceFactory.java:17)
        at org.jbpm.svc.Services.getService(Services.java:144)
        at org.jbpm.svc.Services.getPersistenceService(Services.java:183)
        at org.jbpm.JbpmContext.getPersistenceService(JbpmContext.java:628)
        at org.jbpm.JbpmContext.getJobSession(JbpmContext.java:561)
        at org.jbpm.job.executor.JobExecutorThread.acquireJobs(JobExecutorThread.java:112)
        at org.jbpm.job.executor.JobExecutorThread.run(JobExecutorThread.java:58)
2008-04-08 14:46:13,718 ERROR [org.jbpm.job.executor.JobExecutorThread] exception in job executor thread. waiting 5000 milliseconds
org.hibernate.HibernateException: Could not find datasource
        at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:56)
        at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:124)
        at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:56)
        at org.hibernate.cfg.SettingsFactory.createConnectionProvider(SettingsFactory.java:414)
        at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:62)
        at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2009)
        at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1292)
        at org.jbpm.persistence.db.DbPersistenceServiceFactory.getSessionFactory(DbPersistenceServiceFactory.java:91)
        at org.jbpm.persistence.jta.JtaDbPersistenceService.isCurrentJtaTransactionAvailable(JtaDbPersistenceService.java:46)
        at org.jbpm.persistence.jta.JtaDbPersistenceService.<init>(JtaDbPersistenceService.java:27)
        at org.jbpm.persistence.jta.JtaDbPersistenceServiceFactory.openService(JtaDbPersistenceServiceFactory.java:17)
        at org.jbpm.svc.Services.getService(Services.java:144)
        at org.jbpm.svc.Services.getPersistenceService(Services.java:183)
        at org.jbpm.JbpmContext.getPersistenceService(JbpmContext.java:628)
        at org.jbpm.JbpmContext.getJobSession(JbpmContext.java:561)
        at org.jbpm.job.executor.JobExecutorThread.acquireJobs(JobExecutorThread.java:112)
        at org.jbpm.job.executor.JobExecutorThread.run(JobExecutorThread.java:58)
Caused by: javax.naming.NameNotFoundException: JbpmDS not bound
        at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
        at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
        at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
        at org.jnp.server.NamingServer.lookup(NamingServer.java:296)
        at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)
        at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:589)
        at javax.naming.InitialContext.lookup(InitialContext.java:351)
        at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:52)
        ... 16 more
2008-04-08 14:46:13,746 INFO  [org.jboss.resource.connectionmanager.ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=JbpmDS' to JNDI name 'java:JbpmDS'
2008-04-08 14:46:13,976 INFO  [org.jboss.internal.soa.esb.dependencies.DatabaseInitializer] java:/JbpmDS datasource is already initialized
2008-04-08 14:46:14,068 INFO  [org.jboss.soa.esb.services.jbpm.actions.JBpmCallback] initialise() invoked - config=<action action="action" class="org.jboss.soa.esb.services.jbpm.actions.JBpmCallback"/>
2008-04-08 14:46:14,121 INFO  [org.quartz.core.QuartzScheduler] Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started.

Comment 2 Jay Balunas 2008-04-11 14:15:18 UTC
This does not happen on EAP - it does not have a "JbpmDS" data source.

Comment 3 Jay Balunas 2008-04-15 13:39:25 UTC
This maybe related to the jar version issues around jbpm.  Support is requesting a set of steps for a work around - to tell customers that want to use Seam + Jbpm.

Comment 4 Marek Novotny 2008-04-22 10:12:49 UTC
I have tried to reproduce the exception, but no exception happens.

The downloaded soa-p are: 
http://porkchop.redhat.com/devel/candidates/SOAP4.2.0/soa-p-4.2.0-GA_CP01/soa-4.2.0.GA_CP01.zip
http://porkchop.redhat.com/released/JBossSOAP/4.2.0/GA/soa-4.2.0.GA.zip


Comment 5 Kevin Conner 2008-04-22 10:23:21 UTC
SOA-510, JBESB-1635

This is a race condition.

Comment 6 Marek Novotny 2008-04-22 13:07:44 UTC
What does it mean in frame of Seam? I think nothing, this issue is in Kevin's comment unrelated to Seam or am I wrong?

Comment 7 Kevin Conner 2008-04-22 13:24:56 UTC
My question would be, why do you think this has anything to do with seam?

We already know that this occurs in the SOA platform (without seam) so it is hardly a surprise when you see it on the SOA platform (with seam).

The information in the original report shows the jBPM job executors, almost certainly started by the MBean which is missing the dependency, and that is then followed by the JbpmDS initialisation within the esb.

Comment 8 Marek Novotny 2008-04-22 13:32:00 UTC
I'm not surprised, I needed only confirmation from you and I'll reassign the issue on you.

I didn't think that it does anything with Seam, but I have explored the problem.

Comment 9 Marek Novotny 2008-04-22 13:32:42 UTC
Link: Added: This issue duplicates SOA-510


Comment 10 Jay Balunas 2008-04-22 13:38:35 UTC
Hi guys,

The reason that this seemed  related to seam is because when the DVDstore example was deployed and the server restarted the error happened.  When I removed the app and restarted no error happened. 

It was strange and that is why I retested several times.  I even tried with different applications deploy and did not see the issue - only with the dvdstore (which used jbpm)

Maybe for some reason it is a  library issue, or some other config difference.

Comment 11 Kevin Conner 2008-04-22 13:40:29 UTC
Jay, can you attach a server.log from one of these runs?

Comment 12 Jay Balunas 2008-04-22 13:45:49 UTC
This is most of the server log - I do not have more at this time.

Comment 13 Jay Balunas 2008-04-22 13:45:49 UTC
Attachment: Added: soa-p-dvd-seam-ds-issue.txt


Comment 14 Kevin Conner 2008-04-22 14:01:58 UTC
The log shows that the seam application starts first but it is while deploying the contents of jbpm.esb that it hits the issue.  This is when it would be seen if it was caused by the missing MBean dependency.


Comment 15 Kevin Conner 2008-04-22 14:02:40 UTC
Duplicate of SOA-510