-->
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.  [ 3 posts ] 
Author Message
 Post subject: unexpected token
PostPosted: Tue Oct 09, 2012 5:39 am 
Newbie

Joined: Tue Oct 09, 2012 5:30 am
Posts: 2
Hi all,

i am using hibernate 3.0,spring 1.2,struts1.2 and oracle 9i db.
i am trying to fetch a value froam a table. the query was executed with no exception in oracle db ,however when i execute the same in my application an exception is fired.
below i mention the exception :

org.springframework.orm.hibernate3.HibernateQueryException: unexpected token: billing near line 1, column 124
[select o.ein from com.syntel.sb.appl.bo.client.SBOrganization o,com.syntel.sb.appl.bo.vendor.SBBillingAddress billingwhere billing.organiz
ationid=? and o.organizationId=billing.organizationid ]; nested exception is org.hibernate.hql.ast.QuerySyntaxError: unexpected token: billing near line 1, column 124 [select o.ein from com.syntel.sb.appl.bo.client.SBOrganization o,com.syntel.sb.appl.bo.vendor.SBBillingAddress bi
llingwhere billing.organizationid=? and o.organizationId=billing.organizationid ]

the query i used in application was :

select o.ein "+
"from SBOrganization o,SBBillingAddress billing" +
"where billing.organizationid=? " +
"and o.organizationId=billing.organizationid " ;


kindly guide me to shoot the issue.
thanks in advance.

_________________
Thanks,
Raj


Top
 Profile  
 
 Post subject: Re: unexpected token
PostPosted: Wed Oct 10, 2012 2:00 am 
Expert
Expert

Joined: Tue Jun 16, 2009 3:36 am
Posts: 990
There's is a space missing between the words "billing" and "where" resulting in "billingwhere"

Code:
"from SBOrganization o,SBBillingAddress billing" +
"where billing.organizationid=? " +


you must transform into:

Code:
"from SBOrganization o,SBBillingAddress billing " +
"where billing.organizationid=? " +


Top
 Profile  
 
 Post subject: Re: unexpected token
PostPosted: Wed Oct 10, 2012 2:01 am 
Newbie

Joined: Tue Oct 09, 2012 5:30 am
Posts: 2
Thank you for your reply.

issue got solved.

_________________
Thanks,
Raj


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.