could not instantiate QueryTranslatorFactory: org.hibernate.hql.internal.classic.ClassicQueryTranslatorFactory

hibernate, java, netbeans, swing

Solution

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....

Problem

(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: - Does anyone know what may cause this? I double-checked my dependencies and my .xml file. Obviously, I'm brand new to Hibernate so I have no idea what else to try. - It says to check "message.log". Where might this be located? Is there a default location for this? UPDATE:

Original source

Related problems