[jboss-user] [jBPM] - problem in making a simple human task

Amin Hosseiny Marani do-not-reply at jboss.com
Mon Feb 6 09:57:51 EST 2012


Amin Hosseiny Marani [https://community.jboss.org/people/aminhosseiny] created the discussion

"problem in making a simple human task"

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

--------------------------------------------------------------
i try to do something that  http://www.mastertheboss.com/jbpm/346-human-tasks-in-jbpm-5.html this url mentioned it...but unfortunatley these exception come to me!

my code
public class ProcessTest {
 
          public static final void main(String[] args) {
                    try {
                              startUp();
                              KnowledgeBase kbase = readKnowledgeBase();
 
 
  line 31:                            StatefulKnowledgeSession ksession = JBPMHelper.newStatefulKnowledgeSession(kbase);
 
 
                              ksession.startProcess("human_process");
                              System.out.println("Process started ...");
  
 
 
                    } catch (Throwable t) {
                              t.printStackTrace();
                    }
          }
 
          private static KnowledgeBase readKnowledgeBase() throws Exception {
                    KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
                    kbuilder.add(ResourceFactory.newClassPathResource("sample2.bpmn"), ResourceType.BPMN2);
                    return kbuilder.newKnowledgeBase();
          }
 
  private static void startUp()
          {
                    JBPMHelper.startH2Server();
                    JBPMHelper.setupDataSource();
  
          }
 


the exceptions :
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 org.jbpm.test.JBPMHelper.loadStatefulKnowledgeSession(JBPMHelper.java:138)
          at org.jbpm.test.JBPMHelper.newStatefulKnowledgeSession(JBPMHelper.java:127)
          at com.sample.ProcessTest.main(ProcessTest.java:31)
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:367)
          at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1341)
          at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:867)
          at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:669)
          ... 5 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)
          ... 9 more
Caused by: bitronix.tm.utils.InitializationException: cannot open disk journal
          at bitronix.tm.BitronixTransactionManager.<init>(BitronixTransactionManager.java:75)
          at bitronix.tm.TransactionManagerServices.getTransactionManager(TransactionManagerServices.java:62)
          ... 14 more
Caused by: java.io.IOException: transaction log file btm2.tlog is locked. Is another instance already running?
          at bitronix.tm.journal.TransactionLogAppender.<init>(TransactionLogAppender.java:72)
          at bitronix.tm.journal.DiskJournal.open(DiskJournal.java:152)
          at bitronix.tm.BitronixTransactionManager.<init>(BitronixTransactionManager.java:62)
          ... 15 more
--------------------------------------------------------------

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

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/20120206/7f42b105/attachment-0001.html 


More information about the jboss-user mailing list