I am creating a portlet in which Jboss portal server and EJB 3.0 is used. My Portlet application throws exception sometimes. Icould not track how this exception is being thrown since it happens only sometimes and not always. Please see the stacktrace below for the details
Note: I am not modifying anything in database
Exception stact trace
javax.servlet.ServletException: Batch update returned unexpected row count from update: 0 actual row count: 0 expected: 1
org.jboss.portal.server.servlet.PortalServlet.process(PortalServlet.java:321)
org.jboss.portal.server.servlet.PortalServlet.doPost(PortalServlet.java:168)
Causes:
org.hibernate.StaleStateException: Batch update returned unexpected row count from update: 0 actual row count: 0 expected: 1
org.hibernate.jdbc.BatchingBatcher.checkRowCount(BatchingBatcher.java:93)
org.hibernate.jdbc.BatchingBatcher.checkRowCounts(BatchingBatcher.java:79)
org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:58)
org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:242)
org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:235)
Environment used
Application server: Jboss 4.0.4 GA
Portal Server: Jboss portal server 2.4.2
EJB: 3.0