eclipse - jBPM6.3+Hibernate4+Tomcat7+JPA2.0Exception: Unable to build EntityManagerFactory -


i trying make this example work me. since jbpm version 6.3.0.final, this solution absolutely won't solve problem.

my scenario is, firstly, created jpa & dynamic web project using eclipse mars1, , copied example files new project, modified taskprocessservlet.java, shown below, because of obsoleteness , deprecation of runtimepart in original servlet code. when built project , ran on independent tomcat 7.0.64 other server inside of eclipse, , jsp showed without problem, when clicked create processwhich fire taskprocessservlet, got error message:

error:[persistenceunit: org.jbpm.persistence.jpa] unable build entitymanagerfactory 

would postgresql-9.4.1207.jar(for tomcat8) problem? don't think because kept getting same error in tomcat 8, downgrade tomcat 8.0.30 tomcat 7.0.64.

i'm able run jbpm-console jboss both on tomcat 8 , 7. jbpm-console interfere project?

how tackle problem?

any idea appreciated, thank much.

software environment:

ubuntu 64-bit 14.04 eclipse mars1 jbpm 6.3.0.final postgresql 9.3(postgresql-9.4.1207.jar) hibernate 4.2.21.final jpa 2.0 tomcat 7.0.64 no spring no maven 

taskprocessservlet.java

protected void processrequest(httpservletrequest request, httpservletresponse response) throws servletexception, ioexception {         response.setcontenttype("text/html;charset=utf-8");         printwriter out = response.getwriter();          try {             string action = request.getparameter("action");          if (action.equals("createprocess")) {                 /*                 usertransaction ut = (usertransaction) new initialcontext().lookup( "java:comp/usertransaction" );                ut.begin();                   *                  * local task service                  *                 kiesession ksession = jbpmutil.getsingletonsession();                 taskservice taskservice = jbpmutil.gettaskservice();                     ksession.startprocess("com.autopal.bpmn.samplehtformvariables",params);                   system.out.println(" after start");                 //ksession.fireallrules();                 ut.commit();                 */                  // create entity manager factory                 entitymanagerfactory emf = entitymanagerfactorymanager.get().getorcreate("org.jbpm.persistence.jpa");                 transactionmanager tm = transactionmanagerservices.gettransactionmanager();                  // setup runtime environment                 runtimeenvironment environment = runtimeenvironmentbuilder.factory.get()                 .newdefaultbuilder()                 .addasset(resourcefactory.newclasspathresource("taskexample/samplehumantaskformvariables.bpmn"), resourcetype.bpmn2)                     .addenvironmententry(environmentname.transaction_manager, tm)                     .get();                  // kie session                 runtimemanager manager = runtimemanagerfactory.factory.get().newperrequestruntimemanager(environment);                 runtimeengine runtime = manager.getruntimeengine(processinstanceidcontext.get());                 kiesession ksession = runtime.getkiesession();                  // start transaction                 usertransaction ut = initialcontext.dolookup("java:comp/usertransaction");                 ut.begin();                 map<string, object> params = new hashmap<string, object>();                 params.put("priority", "high");                 params.put("modelnumber", "123");                  params.put("quantity", "66");                 // perform multiple commands inside 1 transaction                 ksession.startprocess("com.autopal.bpmn.samplehtformvariables",params);                  // commit transaction                 ut.commit();                                        request.setattribute("message", "process created!");                 requestdispatcher rd = request.getrequestdispatcher("adminuser.jsp");                 rd.forward(request, response);             }             ... 

persistence.xml

    <?xml version="1.0" encoding="utf-8"?> <persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">     <persistence-unit name="org.jbpm.persistence.jpa" transaction-type="jta">     <provider>org.hibernate.ejb.hibernatepersistence</provider>     <jta-data-source>java:comp/env/jdbc/jbpm-ds</jta-data-source>  <mapping-file>meta-inf/jbpmorm.xml</mapping-file> <mapping-file>meta-inf/taskorm.xml</mapping-file> <mapping-file>meta-inf/executor-orm.xml</mapping-file> <mapping-file>meta-inf/servicesorm.xml</mapping-file> <mapping-file>meta-inf/taskauditorm.xml</mapping-file>  <class>org.jbpm.persistence.processinstance.processinstanceinfo</class> <class>org.drools.persistence.info.sessioninfo</class> <class>org.drools.persistence.info.workiteminfo</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.persistence.correlation.correlationkeyinfo</class> <class>org.jbpm.persistence.correlation.correlationpropertyinfo</class>  <!-- manager --> <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>  <!--bam task service --> <class>org.jbpm.services.task.audit.impl.model.bamtasksummaryimpl</class>      <properties>         <property name="hibernate.hbm2ddl.auto" value="update"/>         <property name="hibernate.dialect" value="org.hibernate.dialect.postgresql9dialect"/>         <property name="hibernate.show_sql" value="false"/>         <property name="hibernate.jndi.class" value="bitronix.tm.jndi.bitronixinitialcontextfactory"/>         <property name="hibernate.transaction.jta.platform" value="org.hibernate.service.jta.platform.internal.bitronixjtaplatform"/>     </properties> </persistence-unit> 

catalina.out

    info: hhh000205: loaded properties resource hibernate.properties: {hibernate.connection.password=****, c3p0.numhelperthreads=10, c3p0.maxidletime=60, c3p0.testconnectiononcheckout=true, c3p0.maxstatements=100, hibernate.show_sql=true, hibernate.default_catalog=mybox, hibernate.jdbc.batch_size=50, hibernate.bytecode.use_reflection_optimizer=false, hibernate.jdbc.fetch_size=100, c3p0.maxpoolsize=30, c3p0.initialpoolsize=3, hibernate.hbm2ddl.auto=create, hibernate.default_schema=public, hibernate.connection.release_mode=after_transaction, hibernate.connection.username=postgres, c3p0.idleconnectiontestperiod=900, hibernate.connection.driver_class=org.postgresql.driver, c3p0.minpoolsize=2, c3p0.preferredtestquery=select now(), c3p0.acquireincrement=3, hibernate.dialect=org.hibernate.dialect.postgresql9dialect, hibernate.connection.url=jdbc:postgresql://192.168.1.80:5432/mybox} feb 05, 2016 3:58:09 pm org.hibernate.cfg.environment buildbytecodeprovider info: hhh000021: bytecode provider name : javassist feb 05, 2016 3:58:10 pm org.hibernate.cfg.configuration addresource info: hhh000221: reading mappings resource: meta-inf/jbpmorm.xml feb 05, 2016 3:58:10 pm org.hibernate.cfg.configuration addresource info: hhh000221: reading mappings resource: meta-inf/taskorm.xml feb 05, 2016 3:58:10 pm org.hibernate.cfg.configuration addresource info: hhh000221: reading mappings resource: meta-inf/executor-orm.xml feb 05, 2016 3:58:10 pm org.hibernate.cfg.configuration addresource info: hhh000221: reading mappings resource: meta-inf/servicesorm.xml feb 05, 2016 3:58:10 pm org.hibernate.cfg.configuration addresource info: hhh000221: reading mappings resource: meta-inf/taskauditorm.xml 

thanks anton giertli, thank attention.

i've solved problem after modifying server.xml , adding hibernate.cfg.xml jpa referring here.

but still had consequential issues need figure out.

thank way.


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -