aspose file tools*
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


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "problem with t" Watch "problem with t" New topic
Author

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("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

Joined: Feb 05, 2001
Posts: 17249
    
    6

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


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem with t
 
Similar Threads
Query two tables using hibernate
About Named Queries
copy data between two different servers
Composite key in hibernate 3
using aliases