-->
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.  [ 1 post ] 
Author Message
 Post subject: org.hibernate.exception.GenericJDBCException: could not exec
PostPosted: Fri Sep 26, 2008 3:51 am 
Newbie

Joined: Thu Sep 25, 2008 5:46 am
Posts: 5
Hi All,

I am developing a web service using Java 1.6 , Hibernate 3.0 , Axis 1.4 and Tomcat Apache 5.5.

My issue is that when i work with the "createCriteria" queries they works fine. But when i use "createSQLQuery" it raise the following exception

"org.hibernate.exception.GenericJDBCException: could not execute query"

and also some times without doing anyting code starts working but some times it gives the same exception.

I also get the following warning

"16:37:50,782 WARN Configurator:126 - No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath: jar:file:/D:/Workspace/encode/lib/ehcache-1.1.jar!/ehcache-failsafe.xml"

The code i am using mentioned below

session = queueSessionFactory.openSession();

String sql = "SELECT * FROM queue WHERE status =:status AND assigned_to =:assigned_to";
SQLQuery query = session.createSQLQuery(sql).addEntity("queue", QueueBean.class);
query.setString("assigned_to", serverName);
query.setString("status","queued");
list = query.list();


Any help would be greatly appriciated.

-Thanks


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.