File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Other Application Frameworks and the fly likes problem with t Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "problem with t" Watch "problem with t" New topic

problem with t

NareshAnkuskani Kumar
Ranch Hand

Joined: Sep 15, 2005
Posts: 76
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(" = ?");
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

Joined: Feb 05, 2001
Posts: 17276

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.


Perfect World Programming, LLC - iOS Apps
How to Ask Questions the Smart Way FAQ
It is sorta covered in the JavaRanch Style Guide.
subject: problem with t
jQuery in Action, 3rd edition