-->
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.  [ 1 post ] 
Author Message
 Post subject: org.hibernate.queryexception:expecting ''' found '<EOF>
PostPosted: Thu Dec 17, 2009 9:33 am 
Newbie

Joined: Thu Dec 17, 2009 9:15 am
Posts: 2
Hi ,
I am using hibernate for my DB actions.

My code is as follows:

oSession = getDBSession();
Transaction tx = oSession.beginTransaction();
String hql = "update ideadetails set status='"
+ oCInnovativeIdea.getIdeaState().getId() + "',remarks='"
+ oCInnovativeIdea.getRemarks() + "', public='"
+ oCInnovativeIdea.getIdeaPublic() + "' where id ='"
+ oCInnovativeIdea.getID() + "'";
Query query = oSession.createQuery(hql);
int row = query.executeUpdate();
tx.commit();



And it is giving an error:

18:58:12,107 ERROR [PARSER] line 1:261: unexpected token: t
18:58:12,107 ERROR [PARSER] line 2:39: unexpected token: could
18:58:12,107 ERROR [PARSER] line 2:62: unexpected token: right
18:58:12,123 ERROR [PARSER] line 2:103: unexpected token: seems
18:58:12,123 ERROR [PARSER] line 4:23: unexpected token: less
18:58:12,123 ERROR [PARSER] line 4:52: expecting IDENT, found '800'
18:58:12,123 ERROR [PARSER] line 5:33: unexpected token: cost
18:58:12,123 ERROR [PARSER] line 5:51: expecting IDENT, found '', public=''
18:58:12,138 INFO [STDOUT] org.hibernate.QueryException: expecting ''', found '
<EOF>' [update ideadetails set status='11',remarks='Idea: Remote configuration o
f Drives using GSM



at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorI
pl.java:204)
at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImp
.java:111)
at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:77)
at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:56)
at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanC
che.java:72)
at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessi
nImpl.java:133)

Could any one help me with this problem....


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

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.