• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

unexpected token

 
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

i am using hibernate,springs,struts in my project.
i am trying to fetch a value from a table in oracle db, when i am trying to do so i get the below error

org.springframework.orm.hibernate3.HibernateQueryException: unexpected token: org near line 1, column 125 [se
lect org.ein from com.syntel.sb.appl.bo.client.SBOrganization org,com.syntel.sb.appl.bo.vendor.SBBillingAddress billwhere org.organizationId
=bill.organizationid and bill.organizationid=?]; nested exception is org.hibernate.hql.ast.QuerySyntaxError: unexpected token: org near lin
e 1, column 125 [select org.ein from com.syntel.sb.appl.bo.client.SBOrganization org,com.syntel.sb.appl.bo.vendor.SBBillingAddress billwhere
org.organizationId=bill.organizationid and bill.organizationid=?]

query i used was :
"select org.ein "+
"from SBOrganization org,SBBillingAddress bill" +
"where org.organizationId=bill.organizationid " +
"and bill.organizationid=?"

The above query was working fine when i executed the query directly in oracle database,(i entered the value in where condition eg: organizationid=482 )
however when i execute the same query in application i get the above mentioned exception.

kindly guide me to shoot this error.
thanks in advance
 
raj chopra
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
problem solved.

solution was that there was a space problem before quation mark at end of the line.
 
reply
    Bookmark Topic Watch Topic
  • New Topic