Hi 希望这里能有人解决这个问题。谢谢了。
异常描述:
A. Caused by: org.hibernate.hql.ast.QuerySyntaxException: Customer is not mapped [select u from Customer u where u.username=:el1]
B.Caused by: org.hibernate.MappingException: An AnnotationConfiguration instance is required to use <mapping class="XX.XX.XXXX.XXX.model.Customer"/>
问题描述:
我使用Seam2.1.2整合JBPM(使用到业务流),流程定义已经引用到了components.xml,JBPM相关映射也已经写在了hibernate.cfg.xml,但是如果我不在hibernate.cfg.xml中映射我自己定义的Entity Bean Customer ,当我登陆时,异常A出现(用到了该bean),如果以<mapping class="XX.XX.XXXX.XXX.model.Customer"/>方式映射时,异常B出现。如果您知道,请告诉我比较详细的解决方案。
异常描述:
A. Caused by: org.hibernate.hql.ast.QuerySyntaxException: Customer is not mapped [select u from Customer u where u.username=:el1]
B.Caused by: org.hibernate.MappingException: An AnnotationConfiguration instance is required to use <mapping class="XX.XX.XXXX.XXX.model.Customer"/>
问题描述:
我使用Seam2.1.2整合JBPM(使用到业务流),流程定义已经引用到了components.xml,JBPM相关映射也已经写在了hibernate.cfg.xml,但是如果我不在hibernate.cfg.xml中映射我自己定义的Entity Bean Customer ,当我登陆时,异常A出现(用到了该bean),如果以<mapping class="XX.XX.XXXX.XXX.model.Customer"/>方式映射时,异常B出现。如果您知道,请告诉我比较详细的解决方案。
解决方案 »
- struts2 路径问题
- Eclipse Juno Service Release 1版本如何配置Hibernate
- 问一个概念性的问题:关于sessionFactory,Spring的和hibernate的有啥区别?
- 有关JSM的配置问题·····望各位前辈、朋友帮帮忙···
- java ee
- 这样的页面的表单该怎么提交
- 把一张表中的数据都copy到另外一张表中,有什么简单的方法没?或者说有没有可以一次完成操作的方法
- IIS和TOMCAT整合的服务器中,修改TOMCAT的主目录老是不行?????
- 关于tomcat5+mysql3.23.39-nt连接池的字符编码设置问题
- 为啥有的方法里面throw new 自定义异常类("") 外的方法外面有throws 有的没有啊
- 道歉
- toString();具体是怎么实现的
如果想用JPA,就是你说的<mapping class="XX.XX.XXXX.XXX.model.Customer"/>,就要使用AnnotationConfiguration解析hibernate.cfg.xml。普通的Configuration只能解析<mapping resource="Customer.hbm.xml"/>这个就要问seam了,seam不支持JPA吗?
<mapping resource="org/jbpm/graph/def/ProcessDefinition.hbm.xml"/>
<mapping resource="org/jbpm/graph/def/Node.hbm.xml"/>
<mapping resource="org/jbpm/graph/def/Transition.hbm.xml"/>
<mapping resource="org/jbpm/graph/def/Event.hbm.xml"/>
<mapping resource="org/jbpm/graph/def/Action.hbm.xml"/>
<mapping resource="org/jbpm/graph/def/SuperState.hbm.xml"/>
<mapping resource="org/jbpm/graph/def/ExceptionHandler.hbm.xml"/>
<mapping resource="org/jbpm/instantiation/Delegation.hbm.xml"/>