-->
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: Could not excecute query error
PostPosted: Tue Nov 29, 2005 1:16 pm 
Newbie

Joined: Mon Nov 28, 2005 1:04 am
Posts: 9
Hi,

I am getting Could not execute error message while testing a simple query. Here is my code

Code:

String sql = "select ds.identity from DetailsStatus ds";

DetailsStatusDAO.initialize();
org.hibernate.Session s1 = null;
s1 = DetailsStatusDAO.createSession(null);
org.hibernate.Query query = s1.createQuery(sql);
List list= query.list();
return list


And actual error message on console is:

javax.servlet.ServletException: org.hibernate.exception.GenericJDBCException: could not execute query
org.springframework.web.servlet.FrameworkServlet.serviceWrapper(FrameworkServlet.java:400)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:344)


Here is my mapping file:
Code:

<hibernate-mapping package="com.iusa.statusmanager" default-lazy="false">

    <class name="DetailsStatus" table="DETAILS_STATUS">
        <id name="id" column="ID" type="int">
            <generator class="sequence">
               <param name="sequence">STATUS_DETAILS</param>
            </generator>   
        </id>

        <property name="identity" column="IDENTITY"     

        <property name="applicationName" column="APPLICATION_NAME" type="java.lang.String"  not-null="true" />

</hibernate-mapping>



(I am using hibernate3.1, spring, oracle 10g & myeclipse3.1.)

Can anybody please help me?

thanks,
gautam


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.