JBoss Community

Re: jBPM5.1 : Setting Process Variable from code(Using API)

created by Vinay N in jBPM - View the full discussion

Hi All ,

 

I am getting this error....

SLF4J: Class path contains multiple SLF4J bindings.

SLF4J: Found binding in [jar:file:/C:/Program%20Files%20(x86)/Apache%20Software%20Foundation/Tomcat%207.0/lib/slf4j-jdk14-1.6.4.jar!/org/slf4j/impl/StaticLoggerBinder.class]

SLF4J: Found binding in [jar:file:/F:/IPMS_Workspace_New/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/jbpmWebExm/WEB-INF/lib/slf4j-jdk14-1.6.4.jar!/org/slf4j/impl/StaticLoggerBinder.class]

SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.

9 Jun, 2013 6:11:15 PM bitronix.tm.BitronixTransactionManager logVersion

INFO: Bitronix Transaction Manager version 2.1.3

9 Jun, 2013 6:11:15 PM bitronix.tm.Configuration buildServerIdArray

WARNING: cannot get this JVM unique ID. Make sure it is configured and you only use ASCII characters. Will use IP address instead (unsafe for production usage!).

9 Jun, 2013 6:11:15 PM bitronix.tm.Configuration buildServerIdArray

INFO: JVM unique ID: <172.16.6.139>

2013-06-09 18:11:15,774 (TaskProcessServlet.java:56) ERROR com.sample.processserver.TaskProcessServlet - [PersistenceUnit: org.jbpm.persistence.jpa] Unable to build EntityManagerFactory

org.hibernate.HibernateException: Could not obtain BTM transaction manager instance

          at org.hibernate.transaction.BTMTransactionManagerLookup.getTransactionManager(BTMTransactionManagerLookup.java:50)

          at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:325)

          at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1300)

          at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:859)

          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.processserver.JbpmAPIUtil.createSession(JbpmAPIUtil.java:262)

          at com.sample.processserver.JbpmAPIUtil.getSession(JbpmAPIUtil.java:242)

          at com.sample.processserver.TaskProcessServlet.init(TaskProcessServlet.java:44)

          at javax.servlet.GenericServlet.init(GenericServlet.java:160)

          at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1266)

          at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1185)

          at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1080)

          at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5001)

          at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5289)

          at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

          at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1525)

          at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1515)

          at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)

          at java.util.concurrent.FutureTask.run(FutureTask.java:138)

          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

          at java.lang.Thread.run(Thread.java:662)

Caused by: java.lang.reflect.InvocationTargetException

          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

          at java.lang.reflect.Method.invoke(Method.java:597)

          at org.hibernate.transaction.BTMTransactionManagerLookup.getTransactionManager(BTMTransactionManagerLookup.java:47)

          ... 24 more

Caused by: bitronix.tm.utils.InitializationException: cannot open disk journal

          at bitronix.tm.BitronixTransactionManager.<init>(BitronixTransactionManager.java:98)

          at bitronix.tm.TransactionManagerServices.getTransactionManager(TransactionManagerServices.java:75)

          ... 29 more

Caused by: java.io.IOException: The process cannot access the file because another process has locked a portion of the file

          at sun.nio.ch.FileDispatcher.read0(Native Method)

          at sun.nio.ch.FileDispatcher.read(FileDispatcher.java:28)

          at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:198)

          at sun.nio.ch.IOUtil.read(IOUtil.java:171)

          at sun.nio.ch.FileChannelImpl.read(FileChannelImpl.java:144)

          at bitronix.tm.journal.TransactionLogHeader.<init>(TransactionLogHeader.java:101)

          at bitronix.tm.journal.TransactionLogAppender.<init>(TransactionLogAppender.java:70)

          at bitronix.tm.journal.DiskJournal.open(DiskJournal.java:157)

          at bitronix.tm.BitronixTransactionManager.<init>(BitronixTransactionManager.java:85)

          ... 30 more

9 Jun, 2013 6:11:15 PM org.apache.catalina.core.ApplicationContext log

SEVERE: StandardWrapper.Throwable

java.lang.RuntimeException: error while creating session

          at com.sample.processserver.TaskProcessServlet.init(TaskProcessServlet.java:57)

          at javax.servlet.GenericServlet.init(GenericServlet.java:160)

          at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1266)

          at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1185)

          at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1080)

          at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5001)

          at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5289)

          at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

          at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1525)

          at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1515)

          at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)

          at java.util.concurrent.FutureTask.run(FutureTask.java:138)

          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

          at java.lang.Thread.run(Thread.java:662)

Caused by: 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.processserver.JbpmAPIUtil.createSession(JbpmAPIUtil.java:262)

          at com.sample.processserver.JbpmAPIUtil.getSession(JbpmAPIUtil.java:242)

          at com.sample.processserver.TaskProcessServlet.init(TaskProcessServlet.java:44)

          ... 14 more

Caused by: org.hibernate.HibernateException: Could not obtain BTM transaction manager instance

          at org.hibernate.transaction.BTMTransactionManagerLookup.getTransactionManager(BTMTransactionManagerLookup.java:50)

          at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:325)

          at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1300)

          at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:859)

          at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:669)

          ... 20 more

Caused by: java.lang.reflect.InvocationTargetException

          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

          at java.lang.reflect.Method.invoke(Method.java:597)

          at org.hibernate.transaction.BTMTransactionManagerLookup.getTransactionManager(BTMTransactionManagerLookup.java:47)

          ... 24 more

Caused by: bitronix.tm.utils.InitializationException: cannot open disk journal

          at bitronix.tm.BitronixTransactionManager.<init>(BitronixTransactionManager.java:98)

          at bitronix.tm.TransactionManagerServices.getTransactionManager(TransactionManagerServices.java:75)

          ... 29 more

Caused by: java.io.IOException: The process cannot access the file because another process has locked a portion of the file

          at sun.nio.ch.FileDispatcher.read0(Native Method)

          at sun.nio.ch.FileDispatcher.read(FileDispatcher.java:28)

          at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:198)

          at sun.nio.ch.IOUtil.read(IOUtil.java:171)

          at sun.nio.ch.FileChannelImpl.read(FileChannelImpl.java:144)

          at bitronix.tm.journal.TransactionLogHeader.<init>(TransactionLogHeader.java:101)

          at bitronix.tm.journal.TransactionLogAppender.<init>(TransactionLogAppender.java:70)

          at bitronix.tm.journal.DiskJournal.open(DiskJournal.java:157)

          at bitronix.tm.BitronixTransactionManager.<init>(BitronixTransactionManager.java:85)

          ... 30 more

9 Jun, 2013 6:11:15 PM org.apache.catalina.core.StandardContext loadOnStartup

SEVERE: Servlet /jbpmWebExm threw load() exception

java.io.IOException: The process cannot access the file because another process has locked a portion of the file

          at sun.nio.ch.FileDispatcher.read0(Native Method)

          at sun.nio.ch.FileDispatcher.read(FileDispatcher.java:28)

          at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:198)

          at sun.nio.ch.IOUtil.read(IOUtil.java:171)

          at sun.nio.ch.FileChannelImpl.read(FileChannelImpl.java:144)

          at bitronix.tm.journal.TransactionLogHeader.<init>(TransactionLogHeader.java:101)

          at bitronix.tm.journal.TransactionLogAppender.<init>(TransactionLogAppender.java:70)

          at bitronix.tm.journal.DiskJournal.open(DiskJournal.java:157)

          at bitronix.tm.BitronixTransactionManager.<init>(BitronixTransactionManager.java:85)

          at bitronix.tm.TransactionManagerServices.getTransactionManager(TransactionManagerServices.java:75)

          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

          at java.lang.reflect.Method.invoke(Method.java:597)

          at org.hibernate.transaction.BTMTransactionManagerLookup.getTransactionManager(BTMTransactionManagerLookup.java:47)

          at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:325)

          at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1300)

          at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:859)

          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.processserver.JbpmAPIUtil.createSession(JbpmAPIUtil.java:262)

          at com.sample.processserver.JbpmAPIUtil.getSession(JbpmAPIUtil.java:242)

          at com.sample.processserver.TaskProcessServlet.init(TaskProcessServlet.java:44)

          at javax.servlet.GenericServlet.init(GenericServlet.java:160)

          at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1266)

          at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1185)

          at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1080)

          at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5001)

          at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5289)

          at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

          at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1525)

          at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1515)

          at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)

          at java.util.concurrent.FutureTask.run(FutureTask.java:138)

          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

          at java.lang.Thread.run(Thread.java:662)

9 Jun, 2013 6:11:15 PM org.apache.coyote.AbstractProtocol start

INFO: Starting ProtocolHandler ["http-bio-8080"]

9 Jun, 2013 6:11:15 PM org.apache.coyote.AbstractProtocol start

INFO: Starting ProtocolHandler ["ajp-bio-8009"]

9 Jun, 2013 6:11:15 PM org.apache.catalina.startup.Catalina start

INFO: Server startup in 3438 ms

9 Jun, 2013 6:11:16 PM org.apache.catalina.core.StandardWrapperValve invoke

SEVERE: Servlet.service() for servlet [jsp] in context with path [/jbpmWebExm] threw exception [java.lang.LinkageError: loader constraint violation: when resolving interface method "javax.servlet.jsp.JspApplicationContext.getExpressionFactory()Ljavax/el/ExpressionFactory;" the class loader (instance of org/apache/jasper/servlet/JasperLoader) of the current class, org/apache/jsp/index_jsp, and the class loader (instance of org/apache/catalina/loader/StandardClassLoader) for resolved class, javax/servlet/jsp/JspApplicationContext, have different Class objects for the type javax/el/ExpressionFactory used in the signature] with root cause

java.lang.LinkageError: loader constraint violation: when resolving interface method "javax.servlet.jsp.JspApplicationContext.getExpressionFactory()Ljavax/el/ExpressionFactory;" the class loader (instance of org/apache/jasper/servlet/JasperLoader) of the current class, org/apache/jsp/index_jsp, and the class loader (instance of org/apache/catalina/loader/StandardClassLoader) for resolved class, javax/servlet/jsp/JspApplicationContext, have different Class objects for the type javax/el/ExpressionFactory used in the signature

          at org.apache.jsp.index_jsp._jspInit(index_jsp.java:31)

          at org.apache.jasper.runtime.HttpJspBase.init(HttpJspBase.java:49)

          at org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:180)

          at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)

          at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)

          at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)

          at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)

          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)

          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)

          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)

          at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)

          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)

          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)

          at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:928)

          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)

          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)

          at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)

          at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:539)

          at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:298)

          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

          at java.lang.Thread.run(Thread.java:662)

 

 

my persistant.xml file :

<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/orm.xml</mapping-file> -->

        <class>org.drools.persistence.info.SessionInfo</class>

        <class>org.jbpm.persistence.processinstance.ProcessInstanceInfo</class>

        <class>org.jbpm.persistence.processinstance.ProcessInstanceEventInfo</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.task.Task</class>

                    <class>org.jbpm.task.Comment</class>

                    <class>org.jbpm.task.Attachment</class>

                    <class>org.jbpm.task.I18NText</class>

                    <class>org.jbpm.task.SubTasksStrategy</class>

                    <class>org.jbpm.task.Deadline</class>

                    <class>org.jbpm.task.Escalation</class>

                    <class>org.jbpm.task.Reassignment</class>

                    <class>org.jbpm.task.Notification</class>

                    <class>org.jbpm.task.BooleanExpression</class>

                    <class>org.jbpm.task.User</class>

                    <class>org.jbpm.task.PeopleAssignments</class>

        <properties>

           

          

            

            <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/>

            

       

            <!--

            <property name="hibernate.connection.autocommit" value="false"/>

            -->

            <property name="hibernate.connection.autocommit" value="false"/>

            <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.BTMTransactionManagerLookup"/>

           

        </properties>

               </persistence-unit>

Reply to this message by going to Community

Start a new discussion in jBPM at Community