-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: query must begin with SELECT or FROM:
PostPosted: Tue Mar 23, 2010 3:54 pm 
Newbie

Joined: Thu Jul 16, 2009 5:23 pm
Posts: 11
Hello all,

I've been trying to figure out how to solve this problem:
org.hibernate.QueryException: query must begin with SELECT or FROM:

I'm trying to bulk delete as described here:
http://docs.jboss.org/hibernate/core/3. ... batch.html

I've found many posts that say stuff like:
"the problem could be something to do with using the classic parser"
"You need to make sure you are using the new antlr-based query parser"

My question is:
If this is has something to do with the parser, how do I change the parser?

I have the following in my persistence.xml:
<properties>
<property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.WeblogicTransactionManagerLookup"/>
<property name="hibernate.query.factory_class" value="org.hibernate.hql.classic.ClassicQueryTranslatorFactory" />
<property name="hibernate.show_sql" value="true"/>

Do I need to change something on my classpath?

Thanks.


Top
 Profile  
 
 Post subject: Re: query must begin with SELECT or FROM:
PostPosted: Tue Mar 23, 2010 5:05 pm 
Expert
Expert

Joined: Wed Mar 03, 2004 6:35 am
Posts: 1240
Location: Lund, Sweden
Quote:
how do I change the parser?


Change the value for hibernate.query.factory_class to org.hibernate.hql.ast.ASTQueryTranslatorFactory


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.