Thank you for the answer!
I tried to make it (following the tutorial) and I try to use my jbpm-installer/db/persistance.xml, but it seems, that entitymanager does not see it.
The code:
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
// kbuilder.add(new ClassPathResource("ruleflow.rf"), ResourceType.DRF);
KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
kbase.addKnowledgePackages(kbuilder.getKnowledgePackages());
// create a new session
EntityManagerFactory emf = Persistence.createEntityManagerFactory( "org.jbpm.persistence.jpa" );
I got this error message, if I delete jbpm.test.5.3.Final.jar from the libraries. (I do it, because if I don't Entitymanager uses its persistance.xml).:
log4j:WARN No appenders could be found for logger (org.hibernate.cfg.annotations.Version).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Exception in thread "main" javax.persistence.PersistenceException: No Persistence provider for EntityManager named org.jbpm.persistence.jpa
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:56)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:34)
at com.sample.ProcessMain.main(ProcessMain.java:30)
I created also a jBPM.properties file.
What config file should I change, or what variable should I set?
Br,
Csaba