[jboss-user] [jBPM] - Could not find datasource: java:jboss/datasources/jbpmDS

Yogesh Garg do-not-reply at jboss.com
Mon Nov 5 06:18:19 EST 2012


Yogesh Garg [https://community.jboss.org/people/nsit_yogesh] created the discussion

"Could not find datasource: java:jboss/datasources/jbpmDS"

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

--------------------------------------------------------------
Hi all,

I am receiving following error. I am using jBPM5.3 and JBOSS AS 5.x. Please let me know what am I missing.


> 16   05/11 16:40:32,344[main] ERROR hibernate.connection.DatasourceConnectionProvider.configure  - Could not find datasource: java:jboss/datasources/jbpmDS
> javax.naming.NameNotFoundException: unable to find a bound object at name 'java:jboss/datasources/jbpmDS'
>     at bitronix.tm.jndi.BitronixContext.lookup(BitronixContext.java:83)
>     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)
>     at com.sample.ProcessMain.startTaskService(ProcessMain.java:219)
>     at com.sample.ProcessMain.main(ProcessMain.java:50)
> Exception in thread "main" javax.persistence.PersistenceException: [PersistenceUnit: org.jbpm.persistence.jpa] Unable to build EntityManagerFactory
>     at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:677)
>     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)
>     at com.sample.ProcessMain.startTaskService(ProcessMain.java:219)
>     at com.sample.ProcessMain.main(ProcessMain.java:50)
> Caused by: org.hibernate.HibernateException: Could not find datasource
>     at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:79)
>     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)
>     ... 5 more
> Caused by: javax.naming.NameNotFoundException: unable to find a bound object at name 'java:jboss/datasources/jbpmDS'
>     at bitronix.tm.jndi.BitronixContext.lookup(BitronixContext.java:83)
>     at javax.naming.InitialContext.lookup(InitialContext.java:392)
>     at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:75)
>     ... 13 more

*I am using the following persistence.xml*


> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> <persistence
>     version="1.0"
>     xsi:schemaLocation=
>       " http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence
>         http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd
>         http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistence/orm
>         http://java.sun.com/xml/ns/persistence/orm_1_0.xsd http://java.sun.com/xml/ns/persistence/orm_1_0.xsd"
>     xmlns:orm=" http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistence/orm"
>     xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance http://www.w3.org/2001/XMLSchema-instance"
>     xmlns=" http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence">
> 
>   <persistence-unit name="org.jbpm.persistence.jpa" transaction-type="RESOURCE_LOCAL">
>     <provider>org.hibernate.ejb.HibernatePersistence</provider>
>     <non-jta-data-source>java:jboss/datasources/jbpmDS</non-jta-data-source>
>     <mapping-file>META-INF/Taskorm.xml</mapping-file>
>     <class>org.jbpm.task.Attachment</class>
>     <class>org.jbpm.task.Content</class>
>     <class>org.jbpm.task.BooleanExpression</class>
>     <class>org.jbpm.task.Comment</class>
>     <class>org.jbpm.task.Deadline</class>
>     <class>org.jbpm.task.Comment</class>
>     <class>org.jbpm.task.Deadline</class>
>     <class>org.jbpm.task.Delegation</class>
>     <class>org.jbpm.task.Escalation</class>
>     <class>org.jbpm.task.Group</class>
>     <class>org.jbpm.task.I18NText</class>
>     <class>org.jbpm.task.Notification</class>
>     <class>org.jbpm.task.EmailNotification</class>
>     <class>org.jbpm.task.EmailNotificationHeader</class>
>     <class>org.jbpm.task.Reassignment</class>
>     <class>org.jbpm.task.Status</class>
>     <class>org.jbpm.task.Task</class>
>     <class>org.jbpm.task.TaskData</class>
>     <class>org.jbpm.task.SubTasksStrategy</class>
>     <class>org.jbpm.task.OnParentAbortAllSubTasksEndStrategy</class>
>     <class>org.jbpm.task.OnAllSubTasksEndParentEndStrategy</class>
>     <class>org.jbpm.task.User</class>
> 
> 
>     <properties>
>       <property name="hibernate.dialect" value="org.hibernate.dialect.H2Dialect"/>
>       <property name="hibernate.connection.driver_class" value="org.h2.Driver"/>
>       <property name="hibernate.connection.url" value="jdbc:h2:~/test" />
>       <property name="hibernate.connection.username" value="sa"/>
>       <property name="hibernate.connection.password" value=""/>
>       <property name="hibernate.connection.autocommit" value="true" />
>       <property name="hibernate.max_fetch_depth" value="3"/>
>       <property name="hibernate.hbm2ddl.auto" value="create" />
>       <property name="hibernate.show_sql" value="true" />
>     </properties>        
>   </persistence-unit>  
> </persistence>
> 

Regards,
Yogesh Garg
--------------------------------------------------------------

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

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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20121105/f28125e2/attachment.html 


More information about the jboss-user mailing list