jbpm process exception Unable to lookup JNDI name -


i playing around jbpm 6.1 tool , after modifying example provided eclipse jbpm maven project tool i'm keep getting exception:

javax.persistence.persistenceexception: [persistenceunit: org.jbpm.persistence.jpa] unable build entitymanagerfactory     @ org.hibernate.ejb.ejb3configuration.buildentitymanagerfactory(ejb3configuration.java:924)     @ org.hibernate.ejb.ejb3configuration.buildentitymanagerfactory(ejb3configuration.java:899)     @ org.hibernate.ejb.hibernatepersistence.createentitymanagerfactory(hibernatepersistence.java:59)     @ javax.persistence.persistence.createentitymanagerfactory(persistence.java:63)     @ javax.persistence.persistence.createentitymanagerfactory(persistence.java:47)     @ com.sample.initialclasskeysession.createruntimemanager(initialclasskeysession.java:62)     @ com.sample.initialclasskeysession.<init>(initialclasskeysession.java:47)     @ com.sample.initialclasskeysession.startprocessinit(initialclasskeysession.java:35)     @ com.sample.initialclasskeysession.main(initialclasskeysession.java:30) caused by: org.hibernate.service.jndi.jndiexception: unable lookup jndi name [java:jboss/datasources/exampleds]     @ org.hibernate.service.jndi.internal.jndiserviceimpl.locate(jndiserviceimpl.java:68)     @ org.hibernate.service.jdbc.connections.internal.datasourceconnectionproviderimpl.configure(datasourceconnectionproviderimpl.java:116)     @ org.hibernate.service.internal.standardserviceregistryimpl.configureservice(standardserviceregistryimpl.java:85)     @ org.hibernate.service.internal.abstractserviceregistryimpl.initializeservice(abstractserviceregistryimpl.java:184)     @ org.hibernate.service.internal.abstractserviceregistryimpl.getservice(abstractserviceregistryimpl.java:156)     @ org.hibernate.engine.jdbc.internal.jdbcservicesimpl.buildjdbcconnectionaccess(jdbcservicesimpl.java:223)     @ org.hibernate.engine.jdbc.internal.jdbcservicesimpl.configure(jdbcservicesimpl.java:89)     @ org.hibernate.service.internal.standardserviceregistryimpl.configureservice(standardserviceregistryimpl.java:85)     @ org.hibernate.service.internal.abstractserviceregistryimpl.initializeservice(abstractserviceregistryimpl.java:184)     @ org.hibernate.service.internal.abstractserviceregistryimpl.getservice(abstractserviceregistryimpl.java:156)     @ org.hibernate.cfg.configuration.buildtyperegistrations(configuration.java:1825)     @ org.hibernate.cfg.configuration.buildsessionfactory(configuration.java:1783)     @ org.hibernate.ejb.entitymanagerfactoryimpl.<init>(entitymanagerfactoryimpl.java:96)     @ org.hibernate.ejb.ejb3configuration.buildentitymanagerfactory(ejb3configuration.java:914)     ... 8 more caused by: javax.naming.namenotfoundexception: unable find bound object @ name 'java:jboss/datasources/exampleds'     @ bitronix.tm.jndi.bitronixcontext.lookup(bitronixcontext.java:83)     @ bitronix.tm.jndi.bitronixcontext.lookup(bitronixcontext.java:67)     @ javax.naming.initialcontext.lookup(initialcontext.java:415)     @ org.hibernate.service.jndi.internal.jndiserviceimpl.locate(jndiserviceimpl.java:65)     ... 21 more 

i spent lot of time googling problem, not able find solution problem. added persistence.xml meta-inf folder. here persistence.xml:

<?xml version="1.0" encoding="utf-8" standalone="yes"?> <persistence version="2.0"              xsi:schemalocation="http://java.sun.com/xml/ns/persistence                                  http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd                                  http://java.sun.com/xml/ns/persistence/orm                                   http://java.sun.com/xml/ns/persistence/orm_2_0.xsd"              xmlns:orm="http://java.sun.com/xml/ns/persistence/orm"              xmlns:xsi="http://www.w3.org/2001/xmlschema-instance"              xmlns="http://java.sun.com/xml/ns/persistence">    <persistence-unit name="org.jbpm.persistence.jpa" transaction-type="jta">     <provider>org.hibernate.ejb.hibernatepersistence</provider>         <jta-data-source>java:jboss/datasources/exampleds</jta-data-source>     <mapping-file>meta-inf/jbpmorm.xml</mapping-file>     <mapping-file>meta-inf/taskorm.xml</mapping-file>    <mapping-file>meta-inf/taskauditorm.xml</mapping-file>      <class>org.drools.persistence.info.sessioninfo</class>     <class>org.drools.persistence.info.workiteminfo</class>      <class>org.jbpm.persistence.processinstance.processinstanceinfo</class>      <class>org.jbpm.persistence.correlation.correlationkeyinfo</class>     <class>org.jbpm.persistence.correlation.correlationpropertyinfo</class>      <class>org.jbpm.process.audit.processinstancelog</class>     <class>org.jbpm.process.audit.nodeinstancelog</class>     <class>org.jbpm.process.audit.variableinstancelog</class>      <class>org.jbpm.runtime.manager.impl.jpa.contextmappinginfo</class>      <class>org.jbpm.services.task.impl.model.attachmentimpl</class>     <class>org.jbpm.services.task.impl.model.contentimpl</class>     <class>org.jbpm.services.task.impl.model.booleanexpressionimpl</class>     <class>org.jbpm.services.task.impl.model.commentimpl</class>     <class>org.jbpm.services.task.impl.model.deadlineimpl</class>     <class>org.jbpm.services.task.impl.model.delegationimpl</class>     <class>org.jbpm.services.task.impl.model.escalationimpl</class>     <class>org.jbpm.services.task.impl.model.groupimpl</class>     <class>org.jbpm.services.task.impl.model.i18ntextimpl</class>     <class>org.jbpm.services.task.impl.model.notificationimpl</class>     <class>org.jbpm.services.task.impl.model.emailnotificationimpl</class>     <class>org.jbpm.services.task.impl.model.emailnotificationheaderimpl</class>     <class>org.jbpm.services.task.impl.model.peopleassignmentsimpl</class>     <class>org.jbpm.services.task.impl.model.reassignmentimpl</class>     <class>org.jbpm.services.task.impl.model.taskimpl</class>     <class>org.jbpm.services.task.impl.model.taskdataimpl</class>     <class>org.jbpm.services.task.impl.model.userimpl</class>      <!-- class>org.jbpm.services.task.audit.impl.model.audittaskimpl</class-->     <class>org.jbpm.services.task.audit.impl.model.bamtasksummaryimpl</class>     <class>org.jbpm.services.task.audit.impl.model.taskeventimpl</class>      <!-- class>org.jbpm.kie.services.impl.store.deploymentstoreentry</class-->      <exclude-unlisted-classes>true</exclude-unlisted-classes>      <properties>       <property name="hibernate.max_fetch_depth" value="3"/>       <property name="hibernate.hbm2ddl.auto" value="update" />       <property name="hibernate.show_sql" value="false" />       <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.jbosstransactionmanagerlookup" />       <property name="hibernate.dialect" value="org.hibernate.dialect.h2dialect"/>       <property name="hibernate.id.new_generator_mappings" value="false"/>     </properties>   </persistence-unit> </persistence> 

and java class i'm trying run following: package com.sample;

import java.util.hashmap; import java.util.map; import javax.persistence.entitymanagerfactory; import javax.persistence.persistence; import org.kie.api.kiebase; import org.kie.api.kieservices; import org.kie.api.runtime.kiecontainer; import org.kie.api.runtime.kiesession; import org.kie.api.runtime.manager.runtimeengine; import org.kie.api.runtime.manager.runtimeenvironmentbuilder; import org.kie.api.runtime.manager.runtimemanager; import org.kie.api.runtime.manager.runtimemanagerfactory; import org.kie.api.runtime.process.processinstance; import org.kie.api.task.taskservice;  public class initialclasskeysession {                 private static initialclasskeysession variablekeysession = null;                private static kiesession ksession = null;                public static void main(string[] args) {                    initialclasskeysession.startprocessinit().startprocess(30);                 }                 public  static initialclasskeysession startprocessinit() {                               if (variablekeysession == null)                                             variablekeysession = new initialclasskeysession();                                return variablekeysession;                }                   private initialclasskeysession() {                               kieservices ks = kieservices.factory.get();                               kiecontainer kcontainer = ks.getkieclasspathcontainer();                               kiebase kbase = kcontainer.getkiebase("kbase");                                runtimemanager manager = createruntimemanager(kbase);                               runtimeengine engine = manager.getruntimeengine(null);                               ksession = engine.getkiesession();                                taskservice taskservice = engine.gettaskservice();                  }                 private static runtimemanager createruntimemanager(kiebase kbase) {                                                            entitymanagerfactory emf = persistence                                                            .createentitymanagerfactory("org.jbpm.persistence.jpa");                               runtimeenvironmentbuilder builder = runtimeenvironmentbuilder.factory                                                            .get().newdefaultbuilder().entitymanagerfactory(emf)                                                            .knowledgebase(kbase);                               return runtimemanagerfactory.factory.get().newsingletonruntimemanager(                                                            builder.get(), "com.sample:example:1.0");                }                 public void startprocess(integer temp) {                               system.out.println("inside start process");                               map<string, object> params = new hashmap<string, object>();                               params.put("temperature", temp);                               system.out.println("inside start process temperature =" + temp);                               processinstance pi = ksession.startprocess("com.sample.bpmn.hello",                                                            params);                } } 

i'm using wildfly not run on server app yet don't know if peak settings as. , i'm running eclipse environment. if miss other details necessary analysis please let me know!

could u please me resolve issue!!!

thanks lot in advance, mila


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -