org.hibernate.HibernateException: Unexpected row count: 0 expected: 1

Spring JIRA | Sanjeev Koppal | 10 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    I am not sure if this is a bug for Spring framework or Hibernate. We are using Hibernate thro' spring so i am posting this here. We are really having hard time to use DML-style operations using Hibernate query language. Finally i used Jdbctemplate to make it work for one query, but one more query failed even after using both.(JdbcTemplate and HibernateTemplate). Here is the small snippet of my code. Which is using HQL to update. getHibernateTemplate().execute(new HibernateCallback() { public Object doInHibernate(Session session) throws HibernateException, SQLException { String hql="UPDATE Nodes "+ "SET nodeLeft = CASE "+ "WHEN nodeLeft > (:node_left) "+ "THEN (:node_left_updated)"+ "ELSE nodeLeft END, "+ " nodeRight = CASE "+ "WHEN nodeRight > (:node_right) "+ "THEN (:node_right_updated) "+ "ELSE nodeRight END "+ "WHERE nodeFrnNoderootNid = (:node_frn_noderoot_nid) "; Query query=session.createQuery(hql); query.setInteger("node_frn_noderoot_nid", nodeFrnNodeRootNid); query.setInteger("node_left", nodeLeft); query.setInteger("node_right", nodeRight); query.setInteger("node_left_updated", nodeLeft - (nodeRight-nodeLeft+1)); query.setInteger("node_right_updated", nodeRight - (nodeRight-nodeLeft+1)); return query.executeUpdate(); This throws me the following exception,Even the jdbcTemplate with native sql throws the same exception. 2007-09-13 10:46:52,552 INFO [STDOUT] 10:46:52,552 ERROR [AbstractFlushingEventListener] Could not synchronize database state with session org.hibernate.HibernateException: Unexpected row count: 0 expected: 1 at org.hibernate.jdbc.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:32) at org.hibernate.persister.entity.BasicEntityPersister.delete(BasicEntityPersister.java:2069) at org.hibernate.persister.entity.BasicEntityPersister.delete(BasicEntityPersister.java:2213) at org.hibernate.action.EntityDeleteAction.execute(EntityDeleteAction.java:59) at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:239) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:223) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:141) at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:274) at org.hibernate.event.def.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:48) at org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:711) at org.hibernate.impl.SessionImpl.prepareQueries(SessionImpl.java:895) at org.hibernate.impl.SessionImpl.getQueries(SessionImpl.java:885) at org.hibernate.impl.SessionImpl.executeUpdate(SessionImpl.java:865) at org.hibernate.impl.QueryImpl.executeUpdate(QueryImpl.java:89) at com.ri.app.oes.domain.CustomNodesDAO$4.doInHibernate(CustomNodesDAO.java:169) at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:367) at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:333) at com.ri.app.oes.domain.CustomNodesDAO.fixTree(CustomNodesDAO.java:141) at com.ri.app.oes.service.impl.OESNodeServiceManagerImpl.deleteNode(OESNodeServiceManagerImpl.java:83) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:299) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:139) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) at $Proxy52.deleteNode(Unknown Source) at com.ri.app.oes.service.impl.OESJobServiceManagerImpl.deleteActivity(OESJobServiceManagerImpl.java:596) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:299) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:139) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) at $Proxy53.deleteActivity(Unknown Source) at com.ri.app.oes.view.bean.job.JobDetailBean.deleteActivity(JobDetailBean.java:224) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.sun.el.parser.AstValue.invoke(AstValue.java:151) at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283) at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68) at com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.java:69) at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:63) at javax.faces.component.UICommand.broadcast(UICommand.java:106) at org.ajax4jsf.framework.ajax.AjaxViewRoot.processEvents(AjaxViewRoot.java:180) at org.ajax4jsf.framework.ajax.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:158) at org.ajax4jsf.framework.ajax.AjaxViewRoot.processApplication(AjaxViewRoot.java:346) at org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:316) at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:106) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:127) at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:277) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.ri.app.oes.view.filter.HttpSessionFilter.doFilter(HttpSessionFilter.java:123) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:122) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:183) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179) at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104) at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:619) 2007-09-13 10:46:52,567 INFO [STDOUT] 139805 [http-127.0.0.1-8080-1] ERROR org.hibernate.event.def.AbstractFlushingEventListener - Could not synchronize database state with session org.hibernate.HibernateException: Unexpected row count: 0 expected: 1 at org.hibernate.jdbc.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:32) at org.hibernate.persister.entity.BasicEntityPersister.delete(BasicEntityPersister.java:2069) at org.hibernate.persister.entity.BasicEntityPersister.delete(BasicEntityPersister.java:2213) at org.hibernate.action.EntityDeleteAction.execute(EntityDeleteAction.java:59) at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:239) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:223) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:141) at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:274) at org.hibernate.event.def.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:48) at org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:711) at org.hibernate.impl.SessionImpl.prepareQueries(SessionImpl.java:895) at org.hibernate.impl.SessionImpl.getQueries(SessionImpl.java:885) at org.hibernate.impl.SessionImpl.executeUpdate(SessionImpl.java:865) at org.hibernate.impl.QueryImpl.executeUpdate(QueryImpl.java:89) at com.ri.app.oes.domain.CustomNodesDAO$4.doInHibernate(CustomNodesDAO.java:169) at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:367) at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:333) at com.ri.app.oes.domain.CustomNodesDAO.fixTree(CustomNodesDAO.java:141) at com.ri.app.oes.service.impl.OESNodeServiceManagerImpl.deleteNode(OESNodeServiceManagerImpl.java:83) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:299) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:139) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) at $Proxy52.deleteNode(Unknown Source) at com.ri.app.oes.service.impl.OESJobServiceManagerImpl.deleteActivity(OESJobServiceManagerImpl.java:596) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:299) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:139) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) at $Proxy53.deleteActivity(Unknown Source) at com.ri.app.oes.view.bean.job.JobDetailBean.deleteActivity(JobDetailBean.java:224) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.sun.el.parser.AstValue.invoke(AstValue.java:151) at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283) at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68) at com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.java:69) at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:63) at javax.faces.component.UICommand.broadcast(UICommand.java:106) at org.ajax4jsf.framework.ajax.AjaxViewRoot.processEvents(AjaxViewRoot.java:180) at org.ajax4jsf.framework.ajax.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:158) at org.ajax4jsf.framework.ajax.AjaxViewRoot.processApplication(AjaxViewRoot.java:346) at org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:316) at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:106) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:127) at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:277) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.ri.app.oes.view.filter.HttpSessionFilter.doFilter(HttpSessionFilter.java:123) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:122) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:183) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179) at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104) at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:619) Let me know if this problem with the framework or i am doing something wrong.

    Spring JIRA | 10 years ago | Sanjeev Koppal
    org.hibernate.HibernateException: Unexpected row count: 0 expected: 1
  2. 0

    I am not sure if this is a bug for Spring framework or Hibernate. We are using Hibernate thro' spring so i am posting this here. We are really having hard time to use DML-style operations using Hibernate query language. Finally i used Jdbctemplate to make it work for one query, but one more query failed even after using both.(JdbcTemplate and HibernateTemplate). Here is the small snippet of my code. Which is using HQL to update. getHibernateTemplate().execute(new HibernateCallback() { public Object doInHibernate(Session session) throws HibernateException, SQLException { String hql="UPDATE Nodes "+ "SET nodeLeft = CASE "+ "WHEN nodeLeft > (:node_left) "+ "THEN (:node_left_updated)"+ "ELSE nodeLeft END, "+ " nodeRight = CASE "+ "WHEN nodeRight > (:node_right) "+ "THEN (:node_right_updated) "+ "ELSE nodeRight END "+ "WHERE nodeFrnNoderootNid = (:node_frn_noderoot_nid) "; Query query=session.createQuery(hql); query.setInteger("node_frn_noderoot_nid", nodeFrnNodeRootNid); query.setInteger("node_left", nodeLeft); query.setInteger("node_right", nodeRight); query.setInteger("node_left_updated", nodeLeft - (nodeRight-nodeLeft+1)); query.setInteger("node_right_updated", nodeRight - (nodeRight-nodeLeft+1)); return query.executeUpdate(); This throws me the following exception,Even the jdbcTemplate with native sql throws the same exception. 2007-09-13 10:46:52,552 INFO [STDOUT] 10:46:52,552 ERROR [AbstractFlushingEventListener] Could not synchronize database state with session org.hibernate.HibernateException: Unexpected row count: 0 expected: 1 at org.hibernate.jdbc.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:32) at org.hibernate.persister.entity.BasicEntityPersister.delete(BasicEntityPersister.java:2069) at org.hibernate.persister.entity.BasicEntityPersister.delete(BasicEntityPersister.java:2213) at org.hibernate.action.EntityDeleteAction.execute(EntityDeleteAction.java:59) at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:239) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:223) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:141) at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:274) at org.hibernate.event.def.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:48) at org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:711) at org.hibernate.impl.SessionImpl.prepareQueries(SessionImpl.java:895) at org.hibernate.impl.SessionImpl.getQueries(SessionImpl.java:885) at org.hibernate.impl.SessionImpl.executeUpdate(SessionImpl.java:865) at org.hibernate.impl.QueryImpl.executeUpdate(QueryImpl.java:89) at com.ri.app.oes.domain.CustomNodesDAO$4.doInHibernate(CustomNodesDAO.java:169) at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:367) at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:333) at com.ri.app.oes.domain.CustomNodesDAO.fixTree(CustomNodesDAO.java:141) at com.ri.app.oes.service.impl.OESNodeServiceManagerImpl.deleteNode(OESNodeServiceManagerImpl.java:83) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:299) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:139) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) at $Proxy52.deleteNode(Unknown Source) at com.ri.app.oes.service.impl.OESJobServiceManagerImpl.deleteActivity(OESJobServiceManagerImpl.java:596) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:299) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:139) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) at $Proxy53.deleteActivity(Unknown Source) at com.ri.app.oes.view.bean.job.JobDetailBean.deleteActivity(JobDetailBean.java:224) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.sun.el.parser.AstValue.invoke(AstValue.java:151) at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283) at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68) at com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.java:69) at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:63) at javax.faces.component.UICommand.broadcast(UICommand.java:106) at org.ajax4jsf.framework.ajax.AjaxViewRoot.processEvents(AjaxViewRoot.java:180) at org.ajax4jsf.framework.ajax.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:158) at org.ajax4jsf.framework.ajax.AjaxViewRoot.processApplication(AjaxViewRoot.java:346) at org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:316) at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:106) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:127) at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:277) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.ri.app.oes.view.filter.HttpSessionFilter.doFilter(HttpSessionFilter.java:123) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:122) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:183) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179) at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104) at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:619) 2007-09-13 10:46:52,567 INFO [STDOUT] 139805 [http-127.0.0.1-8080-1] ERROR org.hibernate.event.def.AbstractFlushingEventListener - Could not synchronize database state with session org.hibernate.HibernateException: Unexpected row count: 0 expected: 1 at org.hibernate.jdbc.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:32) at org.hibernate.persister.entity.BasicEntityPersister.delete(BasicEntityPersister.java:2069) at org.hibernate.persister.entity.BasicEntityPersister.delete(BasicEntityPersister.java:2213) at org.hibernate.action.EntityDeleteAction.execute(EntityDeleteAction.java:59) at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:239) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:223) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:141) at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:274) at org.hibernate.event.def.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:48) at org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:711) at org.hibernate.impl.SessionImpl.prepareQueries(SessionImpl.java:895) at org.hibernate.impl.SessionImpl.getQueries(SessionImpl.java:885) at org.hibernate.impl.SessionImpl.executeUpdate(SessionImpl.java:865) at org.hibernate.impl.QueryImpl.executeUpdate(QueryImpl.java:89) at com.ri.app.oes.domain.CustomNodesDAO$4.doInHibernate(CustomNodesDAO.java:169) at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:367) at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:333) at com.ri.app.oes.domain.CustomNodesDAO.fixTree(CustomNodesDAO.java:141) at com.ri.app.oes.service.impl.OESNodeServiceManagerImpl.deleteNode(OESNodeServiceManagerImpl.java:83) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:299) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:139) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) at $Proxy52.deleteNode(Unknown Source) at com.ri.app.oes.service.impl.OESJobServiceManagerImpl.deleteActivity(OESJobServiceManagerImpl.java:596) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:299) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:139) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) at $Proxy53.deleteActivity(Unknown Source) at com.ri.app.oes.view.bean.job.JobDetailBean.deleteActivity(JobDetailBean.java:224) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.sun.el.parser.AstValue.invoke(AstValue.java:151) at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283) at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68) at com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.java:69) at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:63) at javax.faces.component.UICommand.broadcast(UICommand.java:106) at org.ajax4jsf.framework.ajax.AjaxViewRoot.processEvents(AjaxViewRoot.java:180) at org.ajax4jsf.framework.ajax.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:158) at org.ajax4jsf.framework.ajax.AjaxViewRoot.processApplication(AjaxViewRoot.java:346) at org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:316) at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:106) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:127) at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:277) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.ri.app.oes.view.filter.HttpSessionFilter.doFilter(HttpSessionFilter.java:123) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:122) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:183) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179) at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104) at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:619) Let me know if this problem with the framework or i am doing something wrong.

    Spring JIRA | 10 years ago | Sanjeev Koppal
    org.hibernate.HibernateException: Unexpected row count: 0 expected: 1
  3. 0

    Remote procedure call error

    GitHub | 3 years ago | paxanga
    org.hibernate.HibernateException: Connection cannot be null when 'hibernate.dialect' not set INFO | jvm 1 | 2013/10/31 01:47:16 | at org.hibernate.service.jdbc.dialect.internal.DialectFactoryImpl.determineDialect(DialectFactoryImpl.java:97) INFO | jvm 1 | 2013/10/31 01:47:16 | at org.hibernate.service.jdbc.dialect.internal.DialectFactoryImpl.buildDialect(DialectFactoryImpl.java:67) INFO | jvm 1 | 2013/10/31 01:47:16 | at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:170) INFO | jvm 1 | 2013/10/31 01:47:16 | at org.hibernate.service.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:75) INFO | jvm 1 | 2013/10/31 01:47:16 | at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:159) INFO | jvm 1 | 2013/10/31 01:47:16 | at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:131) INFO | jvm 1 | 2013/10/31 01:47:16 | at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:77) INFO | jvm 1 | 2013/10/31 01:47:16 | at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2276) INFO | jvm 1 | 2013/10/31 01:47:16 | at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2272) INFO | jvm 1 | 2013/10/31 01:47:16 | at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1741) INFO | jvm 1 | 2013/10/31 01:47:16 | at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:94) INFO | jvm 1 | 2013/10/31 01:47:16 | at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:905) INFO | jvm 1 | 2013/10/31 01:47:16 | at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:890) INFO | jvm 1 | 2013/10/31 01:47:16 | at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:57) INFO | jvm 1 | 2013/10/31 01:47:16 | at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:63) INFO | jvm 1 | 2013/10/31 01:47:16 | at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:47) INFO | jvm 1 | 2013/10/31 01:47:16 | at org.traccar.web.server.model.DataServiceImpl.init(DataServiceImpl.java:66) INFO | jvm 1 | 2013/10/31 01:47:16 | at javax.servlet.GenericServlet.init(GenericServlet.java:244) INFO | jvm 1 | 2013/10/31 01:47:16 | at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:534) INFO | jvm 1 | 2013/10/31 01:47:16 | at org.eclipse.jetty.servlet.ServletHolder.getServlet(ServletHolder.java:417) INFO | jvm 1 | 2013/10/31 01:47:16 | at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:659) INFO | jvm 1 | 2013/10/31 01:47:16 | at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:501) INFO | jvm 1 | 2013/10/31 01:47:16 | at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137) INFO | jvm 1 | 2013/10/31 01:47:16 | at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557) INFO | jvm 1 | 2013/10/31 01:47:16 | at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231) INFO | jvm 1 | 2013/10/31 01:47:16 | at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086) INFO | jvm 1 | 2013/10/31 01:47:16 | at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:428) INFO | jvm 1 | 2013/10/31 01:47:16 | at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193) INFO | jvm 1 | 2013/10/31 01:47:16 | at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020) INFO | jvm 1 | 2013/10/31 01:47:16 | at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135) INFO | jvm 1 | 2013/10/31 01:47:16 | at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116) INFO | jvm 1 | 2013/10/31 01:47:16 | at org.eclipse.jetty.server.Server.handle(Server.java:370) INFO | jvm 1 | 2013/10/31 01:47:16 | at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489) INFO | jvm 1 | 2013/10/31 01:47:16 | at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:960) INFO | jvm 1 | 2013/10/31 01:47:16 | at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1021) INFO | jvm 1 | 2013/10/31 01:47:16 | at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865) INFO | jvm 1 | 2013/10/31 01:47:16 | at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240) INFO | jvm 1 | 2013/10/31 01:47:16 | at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82) INFO | jvm 1 | 2013/10/31 01:47:16 | at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:668) INFO | jvm 1 | 2013/10/31 01:47:16 | at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52) INFO | jvm 1 | 2013/10/31 01:47:16 | at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608) INFO | jvm 1 | 2013/10/31 01:47:16 | at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Illegal attempt to associate a collection with two open sessions - Spring Forum

    spring.io | 2 years ago
    org.hibernate.HibernateException: Illegal attempt to associate a collection with two open sessions at org.hibernate.collection.AbstractPersistentCollect ion.setCurrentSession(AbstractPersistentCollection .java:237) at org.hibernate.event.def.OnUpdateVisitor.processCol lection(OnUpdateVisitor.java:41) at org.hibernate.event.def.AbstractVisitor.processVal ue(AbstractVisitor.java:104) at org.hibernate.event.def.AbstractVisitor.processVal ue(AbstractVisitor.java:64) at org.hibernate.event.def.AbstractVisitor.processEnt ityPropertyValues(AbstractVisitor.java:58) at org.hibernate.event.def.AbstractVisitor.process(Ab stractVisitor.java:129) at org.hibernate.event.def.DefaultDeleteEventListener .onDelete(DefaultDeleteEventListener.java:74) at org.hibernate.impl.SessionImpl.delete(SessionImpl. java:579) at org.springframework.orm.hibernate3.HibernateTempla te$26.doInHibernate(HibernateTemplate.java:703) at org.springframework.orm.hibernate3.HibernateTempla te.execute(HibernateTemplate.java:312) at org.springframework.orm.hibernate3.HibernateTempla te.deleteAll(HibernateTemplate.java:699) at org.tiaa.secarchive.dao.impl.SecProductionCltDAOIm pl.deleteSourceData(SecProductionCltDAOImpl.java:7 6) at org.tiaa.secarchive.delegate.impl.SecArchiveDelega teImpl.archive(SecArchiveDelegateImpl.java:86) at org.tiaa.secarchive.schedule.impl.JobImpl.archive( JobImpl.java:328) at org.tiaa.secarchive.schedule.impl.JobImpl.execute( JobImpl.java:210) at org.tiaa.secarchive.schedule.impl.DaemonImpl.run(D aemonImpl.java:239)
  6. 0

    Re: Apache ODE 1.3.6 on Oracle DB with Hibernate 3.2.0

    ode-user | 3 years ago | Sathwik B P
    org.hibernate.HibernateException: CGLIB Enhancement failed: > org.apache.ode.daohib.bpel.hobj.HMessage > at > org.apache.ode.bpel.engine.BpelEngineImpl.onScheduledJob(BpelEngineImpl. > java:478) > at > org.apache.ode.bpel.engine.BpelServerImpl.onScheduledJob(BpelServerImpl. > java:450) > at > org.apache.ode.scheduler.simple.SimpleScheduler$RunJob$1.call(SimpleSche > duler.java:523) > at > org.apache.ode.scheduler.simple.SimpleScheduler$RunJob$1.call(SimpleSche > duler.java:517) > at > org.apache.ode.scheduler.simple.SimpleScheduler.execTransaction(SimpleSc > heduler.java:289) > at > org.apache.ode.scheduler.simple.SimpleScheduler.execTransaction(SimpleSc > heduler.java:244) > at > org.apache.ode.scheduler.simple.SimpleScheduler$RunJob.call(SimpleSchedu > ler.java:517) > at > org.apache.ode.scheduler.simple.SimpleScheduler$RunJob.call(SimpleSchedu > ler.java:501) > at > java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) > at java.util.concurrent.FutureTask.run(FutureTask.java:138)

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. org.hibernate.HibernateException

      Unexpected row count: 0 expected: 1

      at org.hibernate.jdbc.NonBatchingBatcher.addToBatch()
    2. Hibernate
      BasicEntityPersister.delete
      1. org.hibernate.jdbc.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:32)
      2. org.hibernate.persister.entity.BasicEntityPersister.delete(BasicEntityPersister.java:2069)
      3. org.hibernate.persister.entity.BasicEntityPersister.delete(BasicEntityPersister.java:2213)
      3 frames
    3. Hibernate
      EntityDeleteAction.execute
      1. org.hibernate.action.EntityDeleteAction.execute(EntityDeleteAction.java:59)
      1 frame
    4. Hibernate
      ActionQueue.executeActions
      1. org.hibernate.engine.ActionQueue.execute(ActionQueue.java:239)
      2. org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:223)
      3. org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:141)
      3 frames
    5. Hibernate
      QueryImpl.executeUpdate
      1. org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:274)
      2. org.hibernate.event.def.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:48)
      3. org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:711)
      4. org.hibernate.impl.SessionImpl.prepareQueries(SessionImpl.java:895)
      5. org.hibernate.impl.SessionImpl.getQueries(SessionImpl.java:885)
      6. org.hibernate.impl.SessionImpl.executeUpdate(SessionImpl.java:865)
      7. org.hibernate.impl.QueryImpl.executeUpdate(QueryImpl.java:89)
      7 frames
    6. com.ri.app
      CustomNodesDAO$4.doInHibernate
      1. com.ri.app.oes.domain.CustomNodesDAO$4.doInHibernate(CustomNodesDAO.java:169)
      1 frame
    7. Hibernate
      HibernateTemplate.execute
      1. org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:367)
      2. org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:333)
      2 frames
    8. com.ri.app
      OESNodeServiceManagerImpl.deleteNode
      1. com.ri.app.oes.domain.CustomNodesDAO.fixTree(CustomNodesDAO.java:141)
      2. com.ri.app.oes.service.impl.OESNodeServiceManagerImpl.deleteNode(OESNodeServiceManagerImpl.java:83)
      2 frames
    9. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:597)
      4 frames
    10. Spring AOP
      ReflectiveMethodInvocation.proceed
      1. org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:299)
      2. org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:172)
      3. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:139)
      3 frames
    11. Spring Tx
      TransactionInterceptor.invoke
      1. org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
      1 frame
    12. Spring AOP
      JdkDynamicAopProxy.invoke
      1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161)
      2. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
      2 frames
    13. Unknown
      $Proxy52.deleteNode
      1. $Proxy52.deleteNode(Unknown Source)
      1 frame
    14. com.ri.app
      OESJobServiceManagerImpl.deleteActivity
      1. com.ri.app.oes.service.impl.OESJobServiceManagerImpl.deleteActivity(OESJobServiceManagerImpl.java:596)
      1 frame
    15. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:597)
      4 frames
    16. Spring AOP
      ReflectiveMethodInvocation.proceed
      1. org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:299)
      2. org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:172)
      3. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:139)
      3 frames
    17. Spring Tx
      TransactionInterceptor.invoke
      1. org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
      1 frame
    18. Spring AOP
      JdkDynamicAopProxy.invoke
      1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161)
      2. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
      2 frames
    19. Unknown
      $Proxy53.deleteActivity
      1. $Proxy53.deleteActivity(Unknown Source)
      1 frame
    20. com.ri.app
      JobDetailBean.deleteActivity
      1. com.ri.app.oes.view.bean.job.JobDetailBean.deleteActivity(JobDetailBean.java:224)
      1 frame
    21. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:597)
      4 frames
    22. EL
      MethodExpressionImpl.invoke
      1. com.sun.el.parser.AstValue.invoke(AstValue.java:151)
      2. com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
      2 frames
    23. Facelets
      LegacyMethodBinding.invoke
      1. com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
      2. com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.java:69)
      2 frames
    24. Impl
      ActionListenerImpl.processAction
      1. org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:63)
      1 frame
    25. JavaEE 7
      UICommand.broadcast
      1. javax.faces.component.UICommand.broadcast(UICommand.java:106)
      1 frame
    26. org.ajax4jsf.framework
      AjaxViewRoot.processApplication
      1. org.ajax4jsf.framework.ajax.AjaxViewRoot.processEvents(AjaxViewRoot.java:180)
      2. org.ajax4jsf.framework.ajax.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:158)
      3. org.ajax4jsf.framework.ajax.AjaxViewRoot.processApplication(AjaxViewRoot.java:346)
      3 frames
    27. Impl
      LifecycleImpl.execute
      1. org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:316)
      2. org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86)
      2 frames
    28. JavaEE 7
      FacesServlet.service
      1. javax.faces.webapp.FacesServlet.service(FacesServlet.java:106)
      1 frame
    29. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      2 frames
    30. org.ajax4jsf.framework
      BaseFilter.doFilter
      1. org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:127)
      2. org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:277)
      2 frames
    31. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      2 frames
    32. com.ri.app
      HttpSessionFilter.doFilter
      1. com.ri.app.oes.view.filter.HttpSessionFilter.doFilter(HttpSessionFilter.java:123)
      1 frame
    33. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      2 frames
    34. Tomahawk
      ExtensionsFilter.doFilter
      1. org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:122)
      1 frame
    35. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      2 frames
    36. Hibernate
      OpenSessionInViewFilter.doFilterInternal
      1. org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:183)
      1 frame
    37. Spring
      OncePerRequestFilter.doFilter
      1. org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
      1 frame
    38. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      2 frames
    39. JBoss Application Server Tomcat
      ReplyHeaderFilter.doFilter
      1. org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      1 frame
    40. Glassfish Core
      StandardContextValve.invoke
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      3. org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
      4. org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
      4 frames
    41. JBoss Application Server Tomcat
      JaccContextValve.invoke
      1. org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
      2. org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
      2 frames
    42. Glassfish Core
      ErrorReportValve.invoke
      1. org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
      2. org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
      2 frames
    43. JBoss Application Server Tomcat
      CachedConnectionValve.invoke
      1. org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
      1 frame
    44. Glassfish Core
      CoyoteAdapter.service
      1. org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      2. org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
      2 frames
    45. Grizzly HTTP
      JIoEndpoint$Worker.run
      1. org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
      2. org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
      3. org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
      3 frames
    46. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:619)
      1 frame