This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
As described in the feedback page http://netbeans.org/projects/usersguide/lists/nbdocs_feedback/archive/2010-10/message/44 the following tutorials fail when executing the query "from Film": http://netbeans.org/kb/docs/java/hibernate-java-se.html http://netbeans.org/kb/docs/web/hibernate-webapp.html These excellent tutorials would have surely worked at some stage, and I don't know what is not wrong with them. My workaround was to replace a property in hibernate.cfg.xml as follows: <property name="hibernate.query.factory_class">org.hibernate.hql.classic.ClassicQueryTranslatorFactory</property> replaced with <property name="hibernate.query.factory_class">org.hibernate.hql.ast.ASTQueryTranslatorFactory</property> There is some more background in bug 192027.
Do you have the same issue with downloaded project and one created yourself?
Ok, I'm not sure why it can be resolved by transaction factory chnages, but 'from Film' produce 'select from' as sql with ClassicQueryTranslatorFactory and 'Invalid query' with ASTQueryTranslatorFactory, yes, it's better to recognize query is invalid rather then create wrong query. It's the case for java se sample in latest nb. What I see here it's just a minor issue and it should be just a better handling from wrong querries with better message (not just 'Invalid query' and especially not empty sql script), at least for me the root reason is in missed mapping for Film, as in the same time query for Actor works fine and if make mapping for Film query will be successful. In your case its' likely you miss mapping creation for Film at some step.
Hi Sergey, It looks like that if a user follows the tutorial step by step, then there is no problem anymore as before. I agree with you on the issue with the error message for a missing mapping.
The tutorials were modified to state the correct property for people using the tutorial with older versions of the IDE before the values were fixed. Currently the tutorial says to manually type the correct value. In the current version of the IDE the property editor now provides the correct value in the dropdown list so with 7.0 there will be no error. I am leaving this issue open and assigning the issue to myself to update the tutorial for the 7.0 release to clarify that they must manually type the property if they are not using 7.0, but that if they are using 7.0 they can select the property from the dropdown list.
Assigning to Ken (when Ken wrote his comment, the Reset Assignee to Default checkbox was selected)
fixed in staged docs
Marking as fixed. The current versions of the tutorial now has a note about the incorrect property that is generated in 6.9.