在配置文件中加入

 

<prop key="hibernate.query.factory_class">org.hibernate.hql.internal.classic.ClassicQueryTranslatorFactory</prop> 

加入之后不能更新删除,不加不能使用代参查询(好烦躁,有知道怎么样的可以留言告诉我,谢谢啦)。

(1)使用 Hibernate3 的查询翻译器: 
    hibernate.query.factory_class= org.hibernate.hql.ast.ASTQueryTranslatorFactory
(2)使用 Hibernate2 的查询翻译器: 
    hibernate.query.factory_class= org.hibernate.hql.classic.ClassicQueryTranslatorFactory
   
 20160707更新
hql语句使用占位符查询,struts中antlr-2.7.2与hibernate中antlr-2.7.7冲突,删除2.7.2
  windows-preferences搜索struts remove掉antlr-2.7.2,还有tomact中部署包里的,最后删掉重新部署
 
也可参照:http://blog.csdn.net/archer119/article/details/50461134
 
 
 
 

 

相关文章:

  • 2021-10-07
  • 2022-12-23
  • 2021-09-08
  • 2022-12-23
  • 2021-09-23
  • 2022-01-17
  • 2021-11-18
猜你喜欢
  • 2021-09-19
  • 2022-12-23
  • 2021-08-11
  • 2021-08-14
  • 2022-12-23
  • 2021-09-29
  • 2022-01-01
相关资源
相似解决方案