This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem with t

 
NareshAnkuskani Kumar
Ranch Hand
Posts: 76
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

i am using spring with hibernate. During this process while executing the query

StringBuffer hqlQuery = new StringBuffer();
hqlQuery.append("select emp from EMP emp where ");
hqlQuery.append("emp.name = ?");
return this.getHibernateTemplate().find(hqlQuery.toString(),firstName);

i am facing the problem mentioned below.

org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: could not execute query; uncategorized SQLException for SQLConversion to internal representation not successfully

please can anY one help me in sorting this out?
 
Mark Spritzler
ranger
Sheriff
Posts: 17276
6
IntelliJ IDE Mac Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Um, I don't think find() runs String queries. I think it is mapped to the get or load method of a session. You want to run an actual query, which is a different method of the HibernateTemplate, it might just be called query(), I don't remember the exact method name.

Mark
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic