Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version:
Hibernate 3.2
Code between sessionFactory.openSession() and session.close():
PreparedStatement st = session.connection().prepareStatement("{call changeAllDiffProdGroup(?,?,?,?,?)}");
st.setString(1,dgr);
st.setString(2,pgr);
st.setString(3,text);
st.setFloat(4,updatedDifference);
st.setInt(5,productMngrId);
boolean hasResults = st.execute();
List productGroupList=session.createQuery("from ProductGroup prod left join fetch prod.discountGroup where prod.discountGroup.dgr like '"+dgr+"%' and prod.pgr like '"+pgr+"%' and prod.text Like '"+text+"%' order by prod.pgr").list();
Full stack trace of any exception that occurs:
org.hibernate.exception.GenericJDBCException: could not execute query
Name and version of the database you are using:
Mysql 5.0
The error
If we call the prepared statement , the procedure gets executed and the
database gets updated. There is no exception being thrown. But when we try
to refresh the session cache by doing a HQL query it throws a GenericJDBCException