(Preface: this is not a duplicate of "org.hibernate.HibernateException: could not instantiate QueryTranslatorFactory: org.hibernate.hql.classic.ClassicQueryTransactionFactory" because the answer to that involved adding internal to the package, which mine does).
I am following the Netbeans tutorial "Using Hibernate in a Java Swing Application"
And I am at the line Creating Hibernate Mapping Files and POJOs From a Database
When I use the "Hibernate Mapping Files and POJOs from Database" wizard, I get the following dialog:
Because the message in red is cut off, I copy/pasted it here:
Hibernate configuration fails with message:
could not instantiate QueryTranslatorFactory: org.hibernate.hql.internal.classic.ClassicQueryTranslatorFactory
see message.log for exception details.
My questions:
UPDATE:
In a strange twist of fate, I got it to work by removing the word "internal" from the factory_class
classpath.
<property name="hibernate.query.factory_class">org.hibernate.hql.classic.ClassicQueryTranslatorFactory</property>
I won't say that is an answer, though, because I am really confused as to why this is. Everything I've read says that
<property name="hibernate.query.factory_class">org.hibernate.hql.classic.ClassicQueryTranslatorFactory</property>
...is for Hibernate 3
Whereas:
<property name="hibernate.query.factory_class">org.hibernate.hql.internal.classic.ClassicQueryTranslatorFactory</property>
... is for Hibernate 4.
And I'm certain my platform is Hibernate 4:
So, I'm still really confused as to what's going on....
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With