org.hibernate.HibernateException: could not instantiate QueryTranslatorFactory: org.hibernate.hql.classic.ClassicQueryTransactionFactory

后端 未结 4 574
温柔的废话
温柔的废话 2020-12-09 22:28

why this exception is occure when i run query from hql editor

org.hibernate.HibernateException: could not instantiate QueryTranslatorFactory: org.hibernate.hql.cla         


        
相关标签:
4条回答
  • 2020-12-09 22:41

    There is minor change in new APIS. pls replace property value with

    org.hibernate.hql.internal.classic.ClassicQueryTranslatorFactory.
    

    NOTE: there is new package called 'internal' hierarchy introduced.

    0 讨论(0)
  • 2020-12-09 22:49

    I had the same exception when moved from hibernate 3 to hibernate 4 but when I tried to change the

    <property name="hibernate.query.factory_class">org.hibernate.hql.classic.ClassicQueryTranslatorFactory</property>
    

    with

    <property name="hibernate.query.factory_class">org.hibernate.hql.internal.classic.ClassicQueryTranslatorFactory</property>
    

    it worked for me. I hope that help you.

    0 讨论(0)
  • 2020-12-09 22:57

    The correct name is

    org.hibernate.hql.classic.ClassicQueryTranslactorFactory

    Pls note that 'l' is missing in the previous comment.

    0 讨论(0)
  • 2020-12-09 23:03

    The correct name of classic query translator factory is org.hibernate.hql.classic.ClassicQueryTransactorFactory, use it in properties instead of the incorrect one (org.hibernate.hql.classic.ClassicQueryTransactionFactory).

    0 讨论(0)
提交回复
热议问题