出现错误未找到命名查询:UnescalatedDeadlines
我正在尝试创建一个 jbpm 人工任务 Web 应用程序并将其部署在 jboss 7 中。 遵循部署结构,我已将 orm.xml 与 persist.xml 一起放置在资源 META-INF 文件夹中,并且它具有所需的 unescalateddealines 命名查询。但我仍然遇到异常
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:]
简而言之,orm.xml 文件没有被 hibernate 识别。 我缺少什么配置或者可能是什么问题。 请在这方面帮助我。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
最好添加对您正在使用的 orm 文件的直接引用,以确保它们被选取。例如,在 persistence.xml 中,您可以添加以下内容:
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:
您的应用程序中是否有多个 orm.xml 文件?也许 JBoss AS 只是选择其中之一。通常,如果您合并这些文件,它就会起作用。
干杯
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
我有同样的问题,但我解决了。
我的jbpm版本是5.3。
我按照指南部署并设置了它。
我使用了两个持久单元,一个用于 jbpm/process,一个用于任务。
我有这个taskorm.xml,但在某些情况下jbpm只会搜索jbpm持久单元。
但taskorm.xml是在任务单元中定义的。
你需要将它合二为一。
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.
对我来说,我使用的是 jbpm 5.4.0.FINAL,但引用了捆绑 presistence.xml 的示例,其中只有 orm.xml
添加了
Taskorm.xml
解决了问题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