Question

I'm trying to create a jbpm human task web application and deployed it in jboss as 7. Adhering to the deployment structure i have placed the orm.xml in resources META-INF folder along with persistent.xml and it's having the required unescalateddealines named query. But still im getting the exception

     Caused by: java.lang.IllegalArgumentException: Named query not found: UnescalatedDeadlines
    at org.hibernate.ejb.AbstractEntityManagerImpl.createNamedQuery(AbstractEntityManagerImpl.java:108) [hibernate-entitymanager-3.4.0.GA.jar:]
    at org.jbpm.task.service.TaskService.<init>(TaskService.java:109) [jbpm-human-task-5.1.0.Final.jar:]
    at org.jbpm.task.service.TaskService.<init>(TaskService.java:92) [jbpm-human-task-5.1.0.Final.jar:]
    at com.sample.taskserver.HumanTaskStartupServlet.init(HumanTaskStartupServlet.java:52) [classes:]

In nutshell, the orm.xml file is not being identified by hibernate. what's the configuration that im missing or what could be the problem. kindly help me in this regard.

Was it helpful?

Solution

It's probably best to add direct references to the orm files you're using, to make sure they are being picked up. For example, in your persistence.xml you could add the following:

<mapping-file>META-INF/Taskorm.xml</mapping-file>

OTHER TIPS

Do you have multiple orm.xml files inside your application? Probably JBoss AS is just picking one. Usually if you merge those files it will work. Cheers

I had the same problem, but I solved it.

My jbpm version is 5.3. I deployed and set it up according to the guide. I used two persistent-unit, one for jbpm/process and one for task. I have this taskorm.xml, but in some situation jbpm will only search jbpm persistent-unit. but taskorm.xml is defined in task unit.

You need to combine it into one.

For me I am using jbpm 5.4.0.FINAL but referred to the example with bundled presistence.xml having only orm.xml

Added Taskorm.xml resovled the problem

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top