3

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.

Arun Selva
  • 117
  • 3
  • 15

4 Answers4

7

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>
Kris Verlaenen
  • 2,918
  • 1
  • 15
  • 5
1

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.

Origin
  • 2,009
  • 5
  • 19
  • 19
ghuazh
  • 11
  • 1
1

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

vincentlcy
  • 1,157
  • 2
  • 17
  • 19
1

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

salaboy
  • 4,123
  • 1
  • 14
  • 15