Hi,
I am facing problem while calling method
1) DB.flush();
2) public static void flush() {
LOG.debug(".... Flush ....");
HibernateUtil.getSession().flush();
}
3)
public static Session getSession()
throws InfrastructureException {
Session s = threadSession.get();
try {
if (s == null) {
LOG.debug("Opening new Session for this thread.");
if (getInterceptor() != null) {
LOG.info("Using interceptor: " + getInterceptor().getClass());
s = getSessionFactory().openSession(getInterceptor());
} else {
LOG.debug("No intereptor");
s = getSessionFactory().openSession();
LOG.debug("Got session");
}
threadSession.set(s);
LOG.debug("Put session in threadsession");
}
} catch (HibernateException ex) {
throw new InfrastructureException(ex);
}
// never auto flush
s.setFlushMode(FlushMode.MANUAL);
return s;
}
After wards i am getting error like :
org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1
and
2009-08-07 10:58:19,005 ERROR http-8084-Processor25 event.def.AbstractFlushingEventListener - Could not synchronize database state with session
org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1
could you have any clue to resolve this issue.
Regards,
xyz
I am facing problem while calling method
1) DB.flush();
2) public static void flush() {
LOG.debug(".... Flush ....");
HibernateUtil.getSession().flush();
}
3)
public static Session getSession()
throws InfrastructureException {
Session s = threadSession.get();
try {
if (s == null) {
LOG.debug("Opening new Session for this thread.");
if (getInterceptor() != null) {
LOG.info("Using interceptor: " + getInterceptor().getClass());
s = getSessionFactory().openSession(getInterceptor());
} else {
LOG.debug("No intereptor");
s = getSessionFactory().openSession();
LOG.debug("Got session");
}
threadSession.set(s);
LOG.debug("Put session in threadsession");
}
} catch (HibernateException ex) {
throw new InfrastructureException(ex);
}
// never auto flush
s.setFlushMode(FlushMode.MANUAL);
return s;
}
After wards i am getting error like :
org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1
and
2009-08-07 10:58:19,005 ERROR http-8084-Processor25 event.def.AbstractFlushingEventListener - Could not synchronize database state with session
org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1
could you have any clue to resolve this issue.
Regards,
xyz