Hi all,
I have a BPM application that I am deploying in Alfresco/Activiti 5.5 and it is configured with Spring 3. Both Activiti is configured that way, and I have included my own Spring beans to be wired into Activiti rest app as well. I am trying to have a typical JPA/Hibernate -- managed by Spring configuration I've used in web apps before. I get no errors on startup, but when I try to invoke a Java Service bean from the BPMN model, it uses a service class (which uses a Dao) to get a collection of data. Typical stuff I've done a hundred times in a web app. However, when I try to invoke my service class, I am getting an error stack that looks like I have misconfigured my JPA Entity manager. I also see there is a Hibernate error in the stack, but I am thinking the root cause of my problem is my EM is not configured correctly. I have attached my small project here, along with the errors thrown in the tomcat log file and the configuration files used by my application.
It seems the real problem here is this part of the stack trace:
Can anyone tell me what this means? Activiti uses a database for keeping track of process variables, which is separate from the database I am trying to connect JPA to. I'm trying to configure my Hibernate sessionFactory using a hibernate config file as such:Code:Caused by: org.activiti.engine.impl.javax.el.ELException: org.springframework.transaction.CannotCreateTransactionException: Could not open JPA EntityManager for transaction; nested exception is java.lang.IllegalStateException: Already value [org.springframework.jdbc.datasource.ConnectionHolder@5af1cf78] for key [org.springframework.jdbc.datasource.SimpleDriverDataSource@7c3f6843] bound to thread [http-8080-3]
I'm not sure if this is the problem or if I am not giving the correct datasource to JPA? Any help sorting this out would be much appreciated!Code:<property name="configLocation" value="WEB-INF/classes/hibernate.cfg.xml"/>
Thanks in advance,
Griff


Reply With Quote
