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