---
title: "JBoss Seam使用JBPM with out ejb"
author: "nbaertuo"
date: "2008-06-08T16:34:46Z"
tags: []
slug: "jboss-seam-jbpm-with-out-ejb"
draft: false
lastmod: "2008-06-08T16:34:46Z"
id: 201364
url: "https://nbaertuo.iteye.com/blog/201364"
---

现在的项目基础构架是HIBERNATE+SEAM，在开发中想使用JBPM。开始仿照SEAM的例子配置了JBPM，结果发现项目跟不能启动，启动的时候报错。

org.hibernate.MappingException: An AnnotationConfiguration instance is required to use &lt;mapping class="com.ctazc.zs.model.system.Users"/&gt;

在JBOSS FORMS上搜索以后发现这是JBPM的缺陷，JBPM不支持HIBERNATE annotations,给出的办法是重新构造org.jbpm.db.hibernate.HibernateHelper类中的createConfiguration方法，原始的如下：

Configuration configuration = new Configuration();

替换上面那句为

 AnnotationConfiguration configuration = new AnnotationConfiguration();

OK了，这样就可以然JBPM支持HIBERNATE annotations啦。。。