I am calling below method and need to insert records to a table via a stored procedure.
In my local machine update works always. In the server update stop after inserting a
record. It does not print any exception.
My method
public void executeTableUpdate(String sql) throws Exception {
StatelessSession session = null;
try {
session = getSessionFactory().openStatelessSession();
session.beginTransaction();
int result = session.createSQLQuery(sql).executeUpdate();
} catch (Exception ex) {
e.getMessage();
} finally {
if (session != null) {
try {
session.getTransaction().commit();
session.close();
} catch (Exception exception) {
exception.getMessage();
}
}
}
}
The passing SQL is
call SP_UPDATE_STATUS(NOW(),'value1',NOW(),'value1',1,'summary',)