Discussion:
[jboss-user] [jBPM] - Could not find datasource: jdbc/jbpm-ds
Ashish T
2013-07-24 07:56:31 UTC
Permalink
Ashish T [https://community.jboss.org/people/ashpcs] created the discussion

"Could not find datasource: jdbc/jbpm-ds"

To view the discussion, visit: https://community.jboss.org/message/829443#829443

--------------------------------------------------------------
Hi All,

I am using JBPM 5.3 and its assosiated  Guvnor and console.  I am deploying it on tomcat 7.0.27.

I am able to connect to Guvnor and develop small process in it. I am able to login into JBPM console but then it gives following error. 



  24/07 12:57:11,597[http-apr-8080-exec-12] ERROR hibernate.connection.DatasourceConnectionProvider.configure  - Could not find datasource: jdbc/jbpm-ds
javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
        at org.apache.naming.NamingContext.lookup(NamingContext.java:803)
        at org.apache.naming.NamingContext.lookup(NamingContext.java:159)
        at org.apache.naming.SelectorContext.lookup(SelectorContext.java:158)
        at javax.naming.InitialContext.lookup(InitialContext.java:411)
        at org.hibernate.connection.DatasourceConnectionProvider.configure(Datas
ourceConnectionProvider.java:75)




I am not using jbpm-ds datasource anywhere.  Is it hardcoded anywhere in the source?   what is the solution for the problem?
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/829443#829443]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Ashish T
2013-07-24 12:49:34 UTC
Permalink
Ashish T [https://community.jboss.org/people/ashpcs] created the discussion

"Re: Could not find datasource: jdbc/jbpm-ds"

To view the discussion, visit: https://community.jboss.org/message/829505#829505

--------------------------------------------------------------
More update...


It seems that persistance.xml present in gwt-console-server is not read as even if I make any error in it there are  error from tomcat.  The persistance.xml is in  gwt-console-server\WEB-INF\classes .

I still dont understand on what basis it is searching for     jdbc/jbpm-ds  as my persistance.xml contains java:comp/env/jdbc/jbpm-ds.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/829505#829505]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Ashish T
2013-07-24 13:11:05 UTC
Permalink
Ashish T [https://community.jboss.org/people/ashpcs] created the discussion

"Re: Could not find datasource: jdbc/jbpm-ds"

To view the discussion, visit: https://community.jboss.org/message/829513#829513

--------------------------------------------------------------
As per my understanding JBPM console server is trying to connect to guvnor and that time is is giving an error as it can not load the datasource.

I have again pasted  exception from the start.


NFO  24-07 18:20:17,065 (RulesRepositoryConfigurator.java:getInstance:46)
Creating an instance of the RulesRepositoryConfigurator.
    24/07 18:20:26,156[http-apr-8080-exec-2] ERROR console.shared.GuvnorConnectionUtils.guvnorExists  - Error checking guvnor existence: Read timed out
5   24/07 18:20:26,171[http-apr-8080-exec-2] WARN  integration.console.StatefulKnowledgeSessionUtil.loadKnowledgeBase  - Could not connect to Guvnor.
INFO  24-07 18:20:26,750 (DemoAuthenticator.java:authenticate:65)        Demo login for user (admin) succeeded.
118 24/07 18:20:30,274[http-apr-8080-exec-2] ERROR hibernate.connection.DatasouceConnectionProvider.configure  - Could not find datasource: jdbc/jbpm-ds
javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
       at org.apache.naming.NamingContext.lookup(NamingContext.java:803)
       at org.apache.naming.NamingContext.lookup(NamingContext.java:159)
       at org.apache.naming.SelectorContext.lookup(SelectorContext.java:158)
       at javax.naming.InitialContext.lookup(InitialContext.java:411)
       at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:75)
       at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:137)
       at org.hibernate.ejb.InjectionSettingsFactory.createConnectionProvider(InjectionSettingsFactory.java:29)
       at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/829513#829513]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Ashish T
2013-07-24 15:19:51 UTC
Permalink
Ashish T [https://community.jboss.org/people/ashpcs] created the discussion

"Re: Could not find datasource: jdbc/jbpm-ds"

To view the discussion, visit: https://community.jboss.org/message/829548#829548

--------------------------------------------------------------
Looks like problem is related to https://community.jboss.org/thread/222652 https://community.jboss.org/thread/222652

After adding defaultpackages  as guvnor.packages=defaultPackage in jbpm.console.properties of  gwt-csonsole-server   it worked.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/829548#829548]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Ashish T
2013-07-25 06:04:08 UTC
Permalink
Ashish T [https://community.jboss.org/people/ashpcs] created the discussion

"Re: Could not find datasource: jdbc/jbpm-ds"

To view the discussion, visit: https://community.jboss.org/message/829642#829642

--------------------------------------------------------------
above was not the issue.
If nothing is mentioned  it will take all the packages. I am not sure why previously I was getting the "could not connect to guvnor" error. 

Original issue of jbpm-DS not found error was related to somthing else.    I had lept the jbpm-test jar by mistake in tomcat lib which contains jdbc/jbpm-ds  as adatasource whcih was getting picked.

We have removed it now.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/829642#829642]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
xd huang
2013-08-02 05:06:23 UTC
Permalink
xd huang [https://community.jboss.org/people/huang882088] created the discussion

"Re: Could not find datasource: jdbc/jbpm-ds"

To view the discussion, visit: https://community.jboss.org/message/831068#831068

--------------------------------------------------------------
I am also this error
Specific details can be said about it?
Thank you

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

Reply to this message by going to Community
[https://community.jboss.org/message/831068#831068]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Ashish T
2013-08-02 07:16:13 UTC
Permalink
Ashish T [https://community.jboss.org/people/ashpcs] created the discussion

"Re: Could not find datasource: jdbc/jbpm-ds"

To view the discussion, visit: https://community.jboss.org/message/831095#831095

--------------------------------------------------------------
Which datasource are you using?  Are you using *https://community.jboss.org/message/831068#831068 jdbc/jbpm-ds* as datasource and it is not found? 

Also if you are  using tocmat you need to use java:comp/env/jdbc/jbpm-ds.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/831095#831095]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
xd huang
2013-08-02 07:37:52 UTC
Permalink
xd huang [https://community.jboss.org/people/huang882088] created the discussion

"Re: Could not find datasource: jdbc/jbpm-ds"

To view the discussion, visit: https://community.jboss.org/message/831101#831101

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

I am using the data source is btm
jbpm version is 5.4
tomcat6

Here is my configuration

*btm-config.properties*

bitronix.tm.serverId=tomcat-btm-node0
bitronix.tm.journal.disk.logPart1Filename=${btm.root}/work/btm1.tlog
bitronix.tm.journal.disk.logPart2Filename=${btm.root}/work/btm2.tlog
bitronix.tm.resource.configuration=D:/apache-tomcat-6.0.37/conf/resources.properties

*resources.properties*

resource.ds1.className=bitronix.tm.resource.jdbc.lrc.LrcXADataSource
resource.ds1.allowLocalTransactions=true
resource.ds1.uniqueName=jdbc/jbpm-ds
resource.ds1.minPoolSize=0
resource.ds1.maxPoolSize=5
resource.ds1.driverProperties.driverClassName=org.h2.Driver
resource.ds1.driverProperties.user=sa
resource.ds1.driverProperties.password=
resource.ds1.driverProperties.url=jdbc:h2:tcp://localhost/~/jbpm-db
*
context.xml
* <WatchedResource>WEB-INF/web.xml</WatchedResource>
<Transaction factory="bitronix.tm.BitronixUserTransactionObjectFactory" />

<Resource name="jdbc/jbpm-ds" auth="Container" type="javax.sql.DataSource"  
factory="bitronix.tm.resource.ResourceObjectFactory"
uniqueName="jdbc/jbpm-ds" />


*Logs*
....................
信息: Mapping collection: org.jbpm.task.Deadline.documentation -> I18NText
2013-8-2 14:08:36 org.hibernate.cfg.AnnotationConfiguration secondPassCompile
信息: Hibernate Validator not found: ignoring
2013-8-2 14:08:36 org.hibernate.cfg.search.HibernateSearchEventListenerRegister enableHibernateSearch
信息: Unable to find org.hibernate.search.event.FullTextIndexEventListener on the classpath. Hibernate Search is not enabled.
2013-8-2 14:08:36 org.hibernate.util.NamingHelper getInitialContext
信息: JNDI InitialContext properties:{}
2013-8-2 14:08:36 org.hibernate.connection.DatasourceConnectionProvider configure
䞥重: Could not find datasource: jdbc/jbpm-ds
javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
at org.apache.naming.NamingContext.lookup(NamingContext.java:770)
at org.apache.naming.NamingContext.lookup(NamingContext.java:153)
at org.apache.naming.SelectorContext.lookup(SelectorContext.java:152)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:75)
at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:137)
at org.hibernate.ejb.InjectionSettingsFactory.createConnectionProvider(InjectionSettingsFactory.java:29)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:89)
at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2119)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2115)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1339)
at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:867)
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:669)
at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:126)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:52)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:34)
........................
Please help me
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/831101#831101]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Ashish T
2013-08-02 08:10:49 UTC
Permalink
Ashish T [https://community.jboss.org/people/ashpcs] created the discussion

"Re: Could not find datasource: jdbc/jbpm-ds"

To view the discussion, visit: https://community.jboss.org/message/831109#831109

--------------------------------------------------------------
I Hope that youi done have resourcelink tag in context.xml.  That caused us this issue in tomcat6.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/831109#831109]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
xd huang
2013-08-02 08:34:04 UTC
Permalink
xd huang [https://community.jboss.org/people/huang882088] created the discussion

"Re: Could not find datasource: jdbc/jbpm-ds"

To view the discussion, visit: https://community.jboss.org/message/831111#831111

--------------------------------------------------------------
I added resourcelink tag is still the same error



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

Reply to this message by going to Community
[https://community.jboss.org/message/831111#831111]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
xd huang
2013-08-02 08:46:55 UTC
Permalink
xd huang [https://community.jboss.org/people/huang882088] created the discussion

"Re: Could not find datasource: jdbc/jbpm-ds"

To view the discussion, visit: https://community.jboss.org/message/831116#831116

--------------------------------------------------------------
It's too hard for meCan you send me complete the demo reference it?
I have to get it done next week

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

Reply to this message by going to Community
[https://community.jboss.org/message/831116#831116]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Loading...