← Back to team overview

dhis2-devs team mailing list archive

[Bug 731345] [NEW] cannot-delete-dataset

 

Public bug reported:

2.1 branch @ rev 2976.


* ERROR 15:33:49,444 Failed to invoke method deleteDataSet on DeletionHandler 'D
ataEntryFormDeletionHandler' (DefaultDeletionManager.java [6654302@qtp-20929799-
69])
java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.hisp.dhis.system.deletion.DefaultDeletionManager.execute(DefaultD
eletionManager.java:132)
        at org.hisp.dhis.system.deletion.DeletionInterceptor.intercept(DeletionI
nterceptor.java:53)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMet
hodWithGivenArgs(AbstractAspectJAdvice.java:621)
        at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMet
hod(AbstractAspectJAdvice.java:603)
        at org.springframework.aop.aspectj.AspectJMethodBeforeAdvice.before(Aspe
ctJMethodBeforeAdvice.java:39)
        at org.springframework.aop.framework.adapter.MethodBeforeAdviceIntercept
or.invoke(MethodBeforeAdviceInterceptor.java:49)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
ReflectiveMethodInvocation.java:172)
        at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invok
e(ExposeInvocationInterceptor.java:89)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
ReflectiveMethodInvocation.java:172)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynami
cAopProxy.java:202)
        at $Proxy18.deleteDataSet(Unknown Source)
        at org.hisp.dhis.dataset.action.DelDataSetAction.execute(DelDataSetActio
n.java:93)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultA
ctionInvocation.java:441)
        at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(Defa
ultActionInvocation.java:280)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
nvocation.java:243)
        at org.hisp.dhis.webportal.interceptor.XWorkPortalUserInterceptor.interc
ept(XWorkPortalUserInterceptor.java:82)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
nvocation.java:237)
        at org.hisp.dhis.webportal.interceptor.XWorkPortalModuleInterceptor.inte
rcept(XWorkPortalModuleInterceptor.java:85)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
nvocation.java:237)
        at org.hisp.dhis.webportal.interceptor.XWorkPortalMenuInterceptor.interc
ept(XWorkPortalMenuInterceptor.java:91)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
nvocation.java:237)
        at org.hisp.dhis.webportal.interceptor.XWorkPortalParamsInterceptor.inte
rcept(XWorkPortalParamsInterceptor.java:117)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
nvocation.java:237)
        at org.hisp.dhis.interceptor.ContextInterceptor.intercept(ContextInterce
ptor.java:70)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
nvocation.java:237)
        at org.hisp.dhis.interceptor.StyleInterceptor.intercept(StyleInterceptor
.java:107)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
nvocation.java:237)
        at org.hisp.dhis.interceptor.SystemSettingInterceptor.intercept(SystemSe
ttingInterceptor.java:94)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
nvocation.java:237)
        at org.hisp.dhis.interceptor.DisplayPropertyInterceptor.intercept(Displa
yPropertyInterceptor.java:90)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
nvocation.java:237)
        at org.hisp.dhis.interceptor.SortOrderInterceptor.intercept(SortOrderInt
erceptor.java:124)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
nvocation.java:237)
        at org.hisp.dhis.security.intercept.XWorkSecurityInterceptor.intercept(X
WorkSecurityInterceptor.java:98)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
nvocation.java:237)
        at org.hisp.dhis.interceptor.I18nInterceptor.intercept(I18nInterceptor.j
ava:141)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
nvocation.java:237)
        at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(Cha
iningInterceptor.java:126)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
nvocation.java:237)
        at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept
(ParametersInterceptor.java:195)
        at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept
(MethodFilterInterceptor.java:87)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
nvocation.java:237)
        at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.inter
cept(StaticParametersInterceptor.java:179)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
nvocation.java:237)
        at org.hisp.dhis.interceptor.ExceptionInterceptor.intercept(ExceptionInt
erceptor.java:98)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
nvocation.java:237)
        at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.j
ava:52)
        at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.jav
a:488)
        at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatc
her.java:395)
        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet
Handler.java:1157)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
doFilter(FilterChainProxy.java:368)
        at org.hisp.dhis.security.filter.RequiredLoginFilter.doFilter(RequiredLo
ginFilter.java:129)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
doFilter(FilterChainProxy.java:380)
        at org.hisp.dhis.security.filter.AutomaticAccessFilter.doFilter(Automati
cAccessFilter.java:112)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
doFilter(FilterChainProxy.java:380)
        at org.springframework.security.web.authentication.logout.LogoutFilter.d
oFilter(LogoutFilter.java:105)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
doFilter(FilterChainProxy.java:380)
        at org.springframework.security.web.authentication.AbstractAuthenticatio
nProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:187)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
doFilter(FilterChainProxy.java:380)
        at org.springframework.security.web.context.SecurityContextPersistenceFi
lter.doFilter(SecurityContextPersistenceFilter.java:79)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
doFilter(FilterChainProxy.java:380)
        at org.springframework.security.web.FilterChainProxy.doFilter(FilterChai
nProxy.java:169)
        at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(D
elegatingFilterProxy.java:237)
        at org.springframework.web.filter.DelegatingFilterProxy.doFilter(Delegat
ingFilterProxy.java:167)
        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet
Handler.java:1157)
        at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.do
FilterInternal(OpenSessionInViewFilter.java:198)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerR
equestFilter.java:76)
        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet
Handler.java:1157)
        at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:3
88)
        at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.jav
a:216)
        at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:1
82)
        at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:7
65)
        at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:440)

        at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:1
52)
        at org.mortbay.jetty.Server.handle(Server.java:326)
        at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:54
2)
        at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnectio
n.java:943)
        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756)
        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
        at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.ja
va:410)
        at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.j
ava:582)
Caused by: org.springframework.dao.InvalidDataAccessApiUsageException: deleted o
bject would be re-saved by cascade (remove deleted object from associations): [o
rg.hisp.dhis.dataentryform.DataEntryForm#11258]; nested exception is org.hiberna
te.ObjectDeletedException: deleted object would be re-saved by cascade (remove d
eleted object from associations): [org.hisp.dhis.dataentryform.DataEntryForm#112
58]
        at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHiberna
teAccessException(SessionFactoryUtils.java:657)
        at org.springframework.orm.hibernate3.HibernateTransactionManager.conver
tHibernateAccessException(HibernateTransactionManager.java:793)
        at org.springframework.orm.hibernate3.HibernateTransactionManager.doComm
it(HibernateTransactionManager.java:664)
        at org.springframework.transaction.support.AbstractPlatformTransactionMa
nager.processCommit(AbstractPlatformTransactionManager.java:754)
        at org.springframework.transaction.support.AbstractPlatformTransactionMa
nager.commit(AbstractPlatformTransactionManager.java:723)
        at org.springframework.transaction.interceptor.TransactionAspectSupport.
commitTransactionAfterReturning(TransactionAspectSupport.java:393)
        at org.springframework.transaction.interceptor.TransactionInterceptor.in
voke(TransactionInterceptor.java:120)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
ReflectiveMethodInvocation.java:172)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynami
cAopProxy.java:202)
        at $Proxy35.deleteDataEntryForm(Unknown Source)
        at org.hisp.dhis.dataentryform.DataEntryFormDeletionHandler.deleteDataSe
t(DataEntryFormDeletionHandler.java:69)
        ... 94 more
Caused by: org.hibernate.ObjectDeletedException: deleted object would be re-save
d by cascade (remove deleted object from associations): [org.hisp.dhis.dataentry
form.DataEntryForm#11258]
        at org.hibernate.impl.SessionImpl.forceFlush(SessionImpl.java:1220)
        at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTran
sient(DefaultSaveOrUpdateEventListener.java:188)
        at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performSaveO
rUpdate(DefaultSaveOrUpdateEventListener.java:117)
        at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpda
te(DefaultSaveOrUpdateEventListener.java:93)
        at org.hibernate.impl.SessionImpl.fireSaveOrUpdate(SessionImpl.java:677)

        at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:669)
        at org.hibernate.engine.CascadingAction$5.cascade(CascadingAction.java:2
52)
        at org.hibernate.engine.Cascade.cascadeToOne(Cascade.java:392)
        at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:335)
        at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:204)
        at org.hibernate.engine.Cascade.cascade(Cascade.java:161)
        at org.hibernate.event.def.AbstractFlushingEventListener.cascadeOnFlush(
AbstractFlushingEventListener.java:154)
        at org.hibernate.event.def.AbstractFlushingEventListener.prepareEntityFl
ushes(AbstractFlushingEventListener.java:145)
        at org.hibernate.event.def.AbstractFlushingEventListener.flushEverything
ToExecutions(AbstractFlushingEventListener.java:88)
        at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlus
hEventListener.java:50)
        at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1206)
        at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:375)
        at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java
:137)
        at org.springframework.orm.hibernate3.HibernateTransactionManager.doComm
it(HibernateTransactionManager.java:656)
        ... 102 more
* INFO  15:33:49,462 Deleted objects associatied with object of type DataSet (De
faultDeletionManager.java [6654302@qtp-20929799-69])
* AUDIT_TRAIL 15:33:49,481 User  "admin" deleted DataSet "IPsServicesOfferedFHI"
 (DefaultDataSetService.java [6654302@qtp-20929799-69])
* WARN  15:33:49,548 SQL Error: 0, SQLState: 23503 (JDBCExceptionReporter.java [
6654302@qtp-20929799-69])
* ERROR 15:33:49,549 Batch entry 0 delete from dataset where datasetid='11257' w
as aborted.  Call getNextException to see the cause. (JDBCExceptionReporter.java
 [6654302@qtp-20929799-69])
* WARN  15:33:49,551 SQL Error: 0, SQLState: 23503 (JDBCExceptionReporter.java [
6654302@qtp-20929799-69])
* ERROR 15:33:49,552 ERROR: update or delete on table "dataset" violates foreign
 key constraint "fk_datasetid" on table "userroledataset"
  Detail: Key (datasetid)=(11257) is still referenced from table "userroledatase
t". (JDBCExceptionReporter.java [6654302@qtp-20929799-69])
* ERROR 15:33:49,554 Could not synchronize database state with session (Abstract
FlushingEventListener.java [6654302@qtp-20929799-69])
org.hibernate.exception.ConstraintViolationException: Could not execute JDBC bat
ch update
        at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.j
ava:96)
        at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelp
er.java:66)
        at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:
275)
        at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.j
ava:114)
        at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.j
ava:109)
        at org.hibernate.jdbc.AbstractBatcher.prepareBatchStatement(AbstractBatc
her.java:244)
        at org.hibernate.persister.entity.AbstractEntityPersister.delete(Abstrac
tEntityPersister.java:2650)
        at org.hibernate.persister.entity.AbstractEntityPersister.delete(Abstrac
tEntityPersister.java:2895)
        at org.hibernate.action.EntityDeleteAction.execute(EntityDeleteAction.ja
va:97)
        at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:267)
        at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:259)

        at
org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:183)

        at org.hibernate.event.def.AbstractFlushingEventListener.performExecutio
ns(AbstractFlushingEventListener.java:321)
        at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlus
hEventListener.java:51)
        at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1206)
        at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:375)
        at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java
:137)
        at org.springframework.orm.hibernate3.HibernateTransactionManager.doComm
it(HibernateTransactionManager.java:656)
        at org.springframework.transaction.support.AbstractPlatformTransactionMa
nager.processCommit(AbstractPlatformTransactionManager.java:754)
        at org.springframework.transaction.support.AbstractPlatformTransactionMa
nager.commit(AbstractPlatformTransactionManager.java:723)
        at org.springframework.transaction.interceptor.TransactionAspectSupport.
commitTransactionAfterReturning(TransactionAspectSupport.java:393)
        at org.springframework.transaction.interceptor.TransactionInterceptor.in
voke(TransactionInterceptor.java:120)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
ReflectiveMethodInvocation.java:172)
        at org.springframework.aop.framework.adapter.MethodBeforeAdviceIntercept
or.invoke(MethodBeforeAdviceInterceptor.java:50)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
ReflectiveMethodInvocation.java:172)
        at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invok
e(ExposeInvocationInterceptor.java:89)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
ReflectiveMethodInvocation.java:172)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynami
cAopProxy.java:202)
        at $Proxy18.deleteDataSet(Unknown Source)
        at org.hisp.dhis.dataset.action.DelDataSetAction.execute(DelDataSetActio
n.java:93)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultA
ctionInvocation.java:441)
        at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(Defa
ultActionInvocation.java:280)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
nvocation.java:243)
        at org.hisp.dhis.webportal.interceptor.XWorkPortalUserInterceptor.interc
ept(XWorkPortalUserInterceptor.java:82)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
nvocation.java:237)
        at org.hisp.dhis.webportal.interceptor.XWorkPortalModuleInterceptor.inte
rcept(XWorkPortalModuleInterceptor.java:85)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
nvocation.java:237)
        at org.hisp.dhis.webportal.interceptor.XWorkPortalMenuInterceptor.interc
ept(XWorkPortalMenuInterceptor.java:91)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
nvocation.java:237)
        at org.hisp.dhis.webportal.interceptor.XWorkPortalParamsInterceptor.inte
rcept(XWorkPortalParamsInterceptor.java:117)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
nvocation.java:237)
        at org.hisp.dhis.interceptor.ContextInterceptor.intercept(ContextInterce
ptor.java:70)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
nvocation.java:237)
        at org.hisp.dhis.interceptor.StyleInterceptor.intercept(StyleInterceptor
.java:107)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
nvocation.java:237)
        at org.hisp.dhis.interceptor.SystemSettingInterceptor.intercept(SystemSe
ttingInterceptor.java:94)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
nvocation.java:237)
        at org.hisp.dhis.interceptor.DisplayPropertyInterceptor.intercept(Displa
yPropertyInterceptor.java:90)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
nvocation.java:237)
        at org.hisp.dhis.interceptor.SortOrderInterceptor.intercept(SortOrderInt
erceptor.java:124)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
nvocation.java:237)
        at org.hisp.dhis.security.intercept.XWorkSecurityInterceptor.intercept(X
WorkSecurityInterceptor.java:98)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
nvocation.java:237)
        at org.hisp.dhis.interceptor.I18nInterceptor.intercept(I18nInterceptor.j
ava:141)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
nvocation.java:237)
        at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(Cha
iningInterceptor.java:126)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
nvocation.java:237)
        at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept
(ParametersInterceptor.java:195)
        at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept
(MethodFilterInterceptor.java:87)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
nvocation.java:237)
        at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.inter
cept(StaticParametersInterceptor.java:179)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
nvocation.java:237)
        at org.hisp.dhis.interceptor.ExceptionInterceptor.intercept(ExceptionInt
erceptor.java:98)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
nvocation.java:237)
        at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.j
ava:52)
        at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.jav
a:488)
        at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatc
her.java:395)
        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet
Handler.java:1157)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
doFilter(FilterChainProxy.java:368)
        at org.hisp.dhis.security.filter.RequiredLoginFilter.doFilter(RequiredLo
ginFilter.java:129)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
doFilter(FilterChainProxy.java:380)
        at org.hisp.dhis.security.filter.AutomaticAccessFilter.doFilter(Automati
cAccessFilter.java:112)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
doFilter(FilterChainProxy.java:380)
        at org.springframework.security.web.authentication.logout.LogoutFilter.d
oFilter(LogoutFilter.java:105)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
doFilter(FilterChainProxy.java:380)
        at org.springframework.security.web.authentication.AbstractAuthenticatio
nProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:187)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
doFilter(FilterChainProxy.java:380)
        at org.springframework.security.web.context.SecurityContextPersistenceFi
lter.doFilter(SecurityContextPersistenceFilter.java:79)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
doFilter(FilterChainProxy.java:380)
        at org.springframework.security.web.FilterChainProxy.doFilter(FilterChai
nProxy.java:169)
        at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(D
elegatingFilterProxy.java:237)
        at org.springframework.web.filter.DelegatingFilterProxy.doFilter(Delegat
ingFilterProxy.java:167)
        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet
Handler.java:1157)
        at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.do
FilterInternal(OpenSessionInViewFilter.java:198)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerR
equestFilter.java:76)
        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet
Handler.java:1157)
        at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:3
88)
        at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.jav
a:216)
        at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:1
82)
        at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:7
65)
        at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:440)

        at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:1
52)
        at org.mortbay.jetty.Server.handle(Server.java:326)
        at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:54
2)
        at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnectio
n.java:943)
        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756)
        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
        at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.ja
va:410)
        at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.j
ava:582)
Caused by: java.sql.BatchUpdateException: Batch entry 0 delete from dataset wher
e datasetid='11257' was aborted.  Call getNextException to see the cause.
        at org.postgresql.jdbc2.AbstractJdbc2Statement$BatchResultHandler.handle
Error(AbstractJdbc2Statement.java:2598)
        at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutor
Impl.java:1836)
        at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.ja
va:407)
        at org.postgresql.jdbc2.AbstractJdbc2Statement.executeBatch(AbstractJdbc
2Statement.java:2737)
        at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeBatch(NewPr
oxyPreparedStatement.java:1723)
        at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.jav
a:70)
        at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:
268)
        ... 101 more
* ERROR 15:33:49,572 Error while executing action (ExceptionInterceptor.java [66
54302@qtp-20929799-69])
org.springframework.dao.DataIntegrityViolationException: Could not execute JDBC
batch update; SQL [delete from dataset where datasetid=?]; constraint [null]; ne
sted exception is org.hibernate.exception.ConstraintViolationException: Could no
t execute JDBC batch update
        at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHiberna
teAccessException(SessionFactoryUtils.java:637)
        at org.springframework.orm.hibernate3.HibernateTransactionManager.conver
tHibernateAccessException(HibernateTransactionManager.java:793)
        at org.springframework.orm.hibernate3.HibernateTransactionManager.doComm
it(HibernateTransactionManager.java:664)
        at org.springframework.transaction.support.AbstractPlatformTransactionMa
nager.processCommit(AbstractPlatformTransactionManager.java:754)
        at org.springframework.transaction.support.AbstractPlatformTransactionMa
nager.commit(AbstractPlatformTransactionManager.java:723)
        at org.springframework.transaction.interceptor.TransactionAspectSupport.
commitTransactionAfterReturning(TransactionAspectSupport.java:393)
        at org.springframework.transaction.interceptor.TransactionInterceptor.in
voke(TransactionInterceptor.java:120)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
ReflectiveMethodInvocation.java:172)
        at org.springframework.aop.framework.adapter.MethodBeforeAdviceIntercept
or.invoke(MethodBeforeAdviceInterceptor.java:50)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
ReflectiveMethodInvocation.java:172)
        at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invok
e(ExposeInvocationInterceptor.java:89)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
ReflectiveMethodInvocation.java:172)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynami
cAopProxy.java:202)
        at $Proxy18.deleteDataSet(Unknown Source)
        at org.hisp.dhis.dataset.action.DelDataSetAction.execute(DelDataSetActio
n.java:93)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultA
ctionInvocation.java:441)
        at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(Defa
ultActionInvocation.java:280)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
nvocation.java:243)
        at org.hisp.dhis.webportal.interceptor.XWorkPortalUserInterceptor.interc
ept(XWorkPortalUserInterceptor.java:82)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
nvocation.java:237)
        at org.hisp.dhis.webportal.interceptor.XWorkPortalModuleInterceptor.inte
rcept(XWorkPortalModuleInterceptor.java:85)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
nvocation.java:237)
        at org.hisp.dhis.webportal.interceptor.XWorkPortalMenuInterceptor.interc
ept(XWorkPortalMenuInterceptor.java:91)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
nvocation.java:237)
        at org.hisp.dhis.webportal.interceptor.XWorkPortalParamsInterceptor.inte
rcept(XWorkPortalParamsInterceptor.java:117)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
nvocation.java:237)
        at org.hisp.dhis.interceptor.ContextInterceptor.intercept(ContextInterce
ptor.java:70)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
nvocation.java:237)
        at org.hisp.dhis.interceptor.StyleInterceptor.intercept(StyleInterceptor
.java:107)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
nvocation.java:237)
        at org.hisp.dhis.interceptor.SystemSettingInterceptor.intercept(SystemSe
ttingInterceptor.java:94)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
nvocation.java:237)
        at org.hisp.dhis.interceptor.DisplayPropertyInterceptor.intercept(Displa
yPropertyInterceptor.java:90)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
nvocation.java:237)
        at org.hisp.dhis.interceptor.SortOrderInterceptor.intercept(SortOrderInt
erceptor.java:124)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
nvocation.java:237)
        at org.hisp.dhis.security.intercept.XWorkSecurityInterceptor.intercept(X
WorkSecurityInterceptor.java:98)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
nvocation.java:237)
        at org.hisp.dhis.interceptor.I18nInterceptor.intercept(I18nInterceptor.j
ava:141)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
nvocation.java:237)
        at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(Cha
iningInterceptor.java:126)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
nvocation.java:237)
        at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept
(ParametersInterceptor.java:195)
        at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept
(MethodFilterInterceptor.java:87)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
nvocation.java:237)
        at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.inter
cept(StaticParametersInterceptor.java:179)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
nvocation.java:237)
        at org.hisp.dhis.interceptor.ExceptionInterceptor.intercept(ExceptionInt
erceptor.java:98)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
nvocation.java:237)
        at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.j
ava:52)
        at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.jav
a:488)
        at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatc
her.java:395)
        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet
Handler.java:1157)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
doFilter(FilterChainProxy.java:368)
        at org.hisp.dhis.security.filter.RequiredLoginFilter.doFilter(RequiredLo
ginFilter.java:129)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
doFilter(FilterChainProxy.java:380)
        at org.hisp.dhis.security.filter.AutomaticAccessFilter.doFilter(Automati
cAccessFilter.java:112)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
doFilter(FilterChainProxy.java:380)
        at org.springframework.security.web.authentication.logout.LogoutFilter.d
oFilter(LogoutFilter.java:105)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
doFilter(FilterChainProxy.java:380)
        at org.springframework.security.web.authentication.AbstractAuthenticatio
nProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:187)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
doFilter(FilterChainProxy.java:380)
        at org.springframework.security.web.context.SecurityContextPersistenceFi
lter.doFilter(SecurityContextPersistenceFilter.java:79)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
doFilter(FilterChainProxy.java:380)
        at org.springframework.security.web.FilterChainProxy.doFilter(FilterChai
nProxy.java:169)
        at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(D
elegatingFilterProxy.java:237)
        at org.springframework.web.filter.DelegatingFilterProxy.doFilter(Delegat
ingFilterProxy.java:167)
        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet
Handler.java:1157)
        at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.do
FilterInternal(OpenSessionInViewFilter.java:198)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerR
equestFilter.java:76)
        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet
Handler.java:1157)
        at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:3
88)
        at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.jav
a:216)
        at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:1
82)
        at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:7
65)
        at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:440)

        at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:1
52)
        at org.mortbay.jetty.Server.handle(Server.java:326)
        at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:54
2)
        at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnectio
n.java:943)
        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756)
        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
        at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.ja
va:410)
        at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.j
ava:582)
Caused by: org.hibernate.exception.ConstraintViolationException: Could not execu
te JDBC batch update
        at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.j
ava:96)
        at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelp
er.java:66)
        at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:
275)
        at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.j
ava:114)
        at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.j
ava:109)
        at org.hibernate.jdbc.AbstractBatcher.prepareBatchStatement(AbstractBatc
her.java:244)
        at org.hibernate.persister.entity.AbstractEntityPersister.delete(Abstrac
tEntityPersister.java:2650)
        at org.hibernate.persister.entity.AbstractEntityPersister.delete(Abstrac
tEntityPersister.java:2895)
        at org.hibernate.action.EntityDeleteAction.execute(EntityDeleteAction.ja
va:97)
        at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:267)
        at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:259)

        at
org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:183)

        at org.hibernate.event.def.AbstractFlushingEventListener.performExecutio
ns(AbstractFlushingEventListener.java:321)
        at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlus
hEventListener.java:51)
        at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1206)
        at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:375)
        at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java
:137)
        at org.springframework.orm.hibernate3.HibernateTransactionManager.doComm
it(HibernateTransactionManager.java:656)
        ... 86 more
Caused by: java.sql.BatchUpdateException: Batch entry 0 delete from dataset wher
e datasetid='11257' was aborted.  Call getNextException to see the cause.
        at org.postgresql.jdbc2.AbstractJdbc2Statement$BatchResultHandler.handle
Error(AbstractJdbc2Statement.java:2598)
        at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutor
Impl.java:1836)
        at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.ja
va:407)
        at org.postgresql.jdbc2.AbstractJdbc2Statement.executeBatch(AbstractJdbc
2Statement.java:2737)
        at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeBatch(NewPr
oxyPreparedStatement.java:1723)
        at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.jav
a:70)
        at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:
268)
        ... 101 more

** Affects: dhis2
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of DHIS 2
developers, which is subscribed to DHIS.
https://bugs.launchpad.net/bugs/731345

Title:
  cannot-delete-dataset

Status in DHIS 2 - District Health Information Software:
  New

Bug description:
  2.1 branch @ rev 2976.

  
  * ERROR 15:33:49,444 Failed to invoke method deleteDataSet on DeletionHandler 'D
  ataEntryFormDeletionHandler' (DefaultDeletionManager.java [6654302@qtp-20929799-
  69])
  java.lang.reflect.InvocationTargetException
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
          at java.lang.reflect.Method.invoke(Unknown Source)
          at org.hisp.dhis.system.deletion.DefaultDeletionManager.execute(DefaultD
  eletionManager.java:132)
          at org.hisp.dhis.system.deletion.DeletionInterceptor.intercept(DeletionI
  nterceptor.java:53)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
          at java.lang.reflect.Method.invoke(Unknown Source)
          at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMet
  hodWithGivenArgs(AbstractAspectJAdvice.java:621)
          at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMet
  hod(AbstractAspectJAdvice.java:603)
          at org.springframework.aop.aspectj.AspectJMethodBeforeAdvice.before(Aspe
  ctJMethodBeforeAdvice.java:39)
          at org.springframework.aop.framework.adapter.MethodBeforeAdviceIntercept
  or.invoke(MethodBeforeAdviceInterceptor.java:49)
          at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
  ReflectiveMethodInvocation.java:172)
          at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invok
  e(ExposeInvocationInterceptor.java:89)
          at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
  ReflectiveMethodInvocation.java:172)
          at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynami
  cAopProxy.java:202)
          at $Proxy18.deleteDataSet(Unknown Source)
          at org.hisp.dhis.dataset.action.DelDataSetAction.execute(DelDataSetActio
  n.java:93)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
          at java.lang.reflect.Method.invoke(Unknown Source)
          at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultA
  ctionInvocation.java:441)
          at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(Defa
  ultActionInvocation.java:280)
          at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
  nvocation.java:243)
          at org.hisp.dhis.webportal.interceptor.XWorkPortalUserInterceptor.interc
  ept(XWorkPortalUserInterceptor.java:82)
          at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
  nvocation.java:237)
          at org.hisp.dhis.webportal.interceptor.XWorkPortalModuleInterceptor.inte
  rcept(XWorkPortalModuleInterceptor.java:85)
          at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
  nvocation.java:237)
          at org.hisp.dhis.webportal.interceptor.XWorkPortalMenuInterceptor.interc
  ept(XWorkPortalMenuInterceptor.java:91)
          at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
  nvocation.java:237)
          at org.hisp.dhis.webportal.interceptor.XWorkPortalParamsInterceptor.inte
  rcept(XWorkPortalParamsInterceptor.java:117)
          at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
  nvocation.java:237)
          at org.hisp.dhis.interceptor.ContextInterceptor.intercept(ContextInterce
  ptor.java:70)
          at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
  nvocation.java:237)
          at org.hisp.dhis.interceptor.StyleInterceptor.intercept(StyleInterceptor
  .java:107)
          at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
  nvocation.java:237)
          at org.hisp.dhis.interceptor.SystemSettingInterceptor.intercept(SystemSe
  ttingInterceptor.java:94)
          at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
  nvocation.java:237)
          at org.hisp.dhis.interceptor.DisplayPropertyInterceptor.intercept(Displa
  yPropertyInterceptor.java:90)
          at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
  nvocation.java:237)
          at org.hisp.dhis.interceptor.SortOrderInterceptor.intercept(SortOrderInt
  erceptor.java:124)
          at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
  nvocation.java:237)
          at org.hisp.dhis.security.intercept.XWorkSecurityInterceptor.intercept(X
  WorkSecurityInterceptor.java:98)
          at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
  nvocation.java:237)
          at org.hisp.dhis.interceptor.I18nInterceptor.intercept(I18nInterceptor.j
  ava:141)
          at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
  nvocation.java:237)
          at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(Cha
  iningInterceptor.java:126)
          at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
  nvocation.java:237)
          at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept
  (ParametersInterceptor.java:195)
          at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept
  (MethodFilterInterceptor.java:87)
          at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
  nvocation.java:237)
          at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.inter
  cept(StaticParametersInterceptor.java:179)
          at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
  nvocation.java:237)
          at org.hisp.dhis.interceptor.ExceptionInterceptor.intercept(ExceptionInt
  erceptor.java:98)
          at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
  nvocation.java:237)
          at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.j
  ava:52)
          at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.jav
  a:488)
          at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatc
  her.java:395)
          at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet
  Handler.java:1157)
          at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
  doFilter(FilterChainProxy.java:368)
          at org.hisp.dhis.security.filter.RequiredLoginFilter.doFilter(RequiredLo
  ginFilter.java:129)
          at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
  doFilter(FilterChainProxy.java:380)
          at org.hisp.dhis.security.filter.AutomaticAccessFilter.doFilter(Automati
  cAccessFilter.java:112)
          at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
  doFilter(FilterChainProxy.java:380)
          at org.springframework.security.web.authentication.logout.LogoutFilter.d
  oFilter(LogoutFilter.java:105)
          at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
  doFilter(FilterChainProxy.java:380)
          at org.springframework.security.web.authentication.AbstractAuthenticatio
  nProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:187)
          at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
  doFilter(FilterChainProxy.java:380)
          at org.springframework.security.web.context.SecurityContextPersistenceFi
  lter.doFilter(SecurityContextPersistenceFilter.java:79)
          at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
  doFilter(FilterChainProxy.java:380)
          at org.springframework.security.web.FilterChainProxy.doFilter(FilterChai
  nProxy.java:169)
          at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(D
  elegatingFilterProxy.java:237)
          at org.springframework.web.filter.DelegatingFilterProxy.doFilter(Delegat
  ingFilterProxy.java:167)
          at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet
  Handler.java:1157)
          at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.do
  FilterInternal(OpenSessionInViewFilter.java:198)
          at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerR
  equestFilter.java:76)
          at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet
  Handler.java:1157)
          at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:3
  88)
          at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.jav
  a:216)
          at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:1
  82)
          at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:7
  65)
          at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:440)

          at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:1
  52)
          at org.mortbay.jetty.Server.handle(Server.java:326)
          at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:54
  2)
          at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnectio
  n.java:943)
          at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756)
          at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
          at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
          at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.ja
  va:410)
          at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.j
  ava:582)
  Caused by: org.springframework.dao.InvalidDataAccessApiUsageException: deleted o
  bject would be re-saved by cascade (remove deleted object from associations): [o
  rg.hisp.dhis.dataentryform.DataEntryForm#11258]; nested exception is org.hiberna
  te.ObjectDeletedException: deleted object would be re-saved by cascade (remove d
  eleted object from associations): [org.hisp.dhis.dataentryform.DataEntryForm#112
  58]
          at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHiberna
  teAccessException(SessionFactoryUtils.java:657)
          at org.springframework.orm.hibernate3.HibernateTransactionManager.conver
  tHibernateAccessException(HibernateTransactionManager.java:793)
          at org.springframework.orm.hibernate3.HibernateTransactionManager.doComm
  it(HibernateTransactionManager.java:664)
          at org.springframework.transaction.support.AbstractPlatformTransactionMa
  nager.processCommit(AbstractPlatformTransactionManager.java:754)
          at org.springframework.transaction.support.AbstractPlatformTransactionMa
  nager.commit(AbstractPlatformTransactionManager.java:723)
          at org.springframework.transaction.interceptor.TransactionAspectSupport.
  commitTransactionAfterReturning(TransactionAspectSupport.java:393)
          at org.springframework.transaction.interceptor.TransactionInterceptor.in
  voke(TransactionInterceptor.java:120)
          at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
  ReflectiveMethodInvocation.java:172)
          at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynami
  cAopProxy.java:202)
          at $Proxy35.deleteDataEntryForm(Unknown Source)
          at org.hisp.dhis.dataentryform.DataEntryFormDeletionHandler.deleteDataSe
  t(DataEntryFormDeletionHandler.java:69)
          ... 94 more
  Caused by: org.hibernate.ObjectDeletedException: deleted object would be re-save
  d by cascade (remove deleted object from associations): [org.hisp.dhis.dataentry
  form.DataEntryForm#11258]
          at org.hibernate.impl.SessionImpl.forceFlush(SessionImpl.java:1220)
          at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTran
  sient(DefaultSaveOrUpdateEventListener.java:188)
          at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performSaveO
  rUpdate(DefaultSaveOrUpdateEventListener.java:117)
          at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpda
  te(DefaultSaveOrUpdateEventListener.java:93)
          at org.hibernate.impl.SessionImpl.fireSaveOrUpdate(SessionImpl.java:677)

          at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:669)
          at org.hibernate.engine.CascadingAction$5.cascade(CascadingAction.java:2
  52)
          at org.hibernate.engine.Cascade.cascadeToOne(Cascade.java:392)
          at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:335)
          at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:204)
          at org.hibernate.engine.Cascade.cascade(Cascade.java:161)
          at org.hibernate.event.def.AbstractFlushingEventListener.cascadeOnFlush(
  AbstractFlushingEventListener.java:154)
          at org.hibernate.event.def.AbstractFlushingEventListener.prepareEntityFl
  ushes(AbstractFlushingEventListener.java:145)
          at org.hibernate.event.def.AbstractFlushingEventListener.flushEverything
  ToExecutions(AbstractFlushingEventListener.java:88)
          at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlus
  hEventListener.java:50)
          at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1206)
          at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:375)
          at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java
  :137)
          at org.springframework.orm.hibernate3.HibernateTransactionManager.doComm
  it(HibernateTransactionManager.java:656)
          ... 102 more
  * INFO  15:33:49,462 Deleted objects associatied with object of type DataSet (De
  faultDeletionManager.java [6654302@qtp-20929799-69])
  * AUDIT_TRAIL 15:33:49,481 User  "admin" deleted DataSet "IPsServicesOfferedFHI"
   (DefaultDataSetService.java [6654302@qtp-20929799-69])
  * WARN  15:33:49,548 SQL Error: 0, SQLState: 23503 (JDBCExceptionReporter.java [
  6654302@qtp-20929799-69])
  * ERROR 15:33:49,549 Batch entry 0 delete from dataset where datasetid='11257' w
  as aborted.  Call getNextException to see the cause. (JDBCExceptionReporter.java
   [6654302@qtp-20929799-69])
  * WARN  15:33:49,551 SQL Error: 0, SQLState: 23503 (JDBCExceptionReporter.java [
  6654302@qtp-20929799-69])
  * ERROR 15:33:49,552 ERROR: update or delete on table "dataset" violates foreign
   key constraint "fk_datasetid" on table "userroledataset"
    Detail: Key (datasetid)=(11257) is still referenced from table "userroledatase
  t". (JDBCExceptionReporter.java [6654302@qtp-20929799-69])
  * ERROR 15:33:49,554 Could not synchronize database state with session (Abstract
  FlushingEventListener.java [6654302@qtp-20929799-69])
  org.hibernate.exception.ConstraintViolationException: Could not execute JDBC bat
  ch update
          at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.j
  ava:96)
          at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelp
  er.java:66)
          at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:
  275)
          at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.j
  ava:114)
          at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.j
  ava:109)
          at org.hibernate.jdbc.AbstractBatcher.prepareBatchStatement(AbstractBatc
  her.java:244)
          at org.hibernate.persister.entity.AbstractEntityPersister.delete(Abstrac
  tEntityPersister.java:2650)
          at org.hibernate.persister.entity.AbstractEntityPersister.delete(Abstrac
  tEntityPersister.java:2895)
          at org.hibernate.action.EntityDeleteAction.execute(EntityDeleteAction.ja
  va:97)
          at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:267)
          at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:259)

          at
  org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:183)

          at org.hibernate.event.def.AbstractFlushingEventListener.performExecutio
  ns(AbstractFlushingEventListener.java:321)
          at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlus
  hEventListener.java:51)
          at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1206)
          at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:375)
          at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java
  :137)
          at org.springframework.orm.hibernate3.HibernateTransactionManager.doComm
  it(HibernateTransactionManager.java:656)
          at org.springframework.transaction.support.AbstractPlatformTransactionMa
  nager.processCommit(AbstractPlatformTransactionManager.java:754)
          at org.springframework.transaction.support.AbstractPlatformTransactionMa
  nager.commit(AbstractPlatformTransactionManager.java:723)
          at org.springframework.transaction.interceptor.TransactionAspectSupport.
  commitTransactionAfterReturning(TransactionAspectSupport.java:393)
          at org.springframework.transaction.interceptor.TransactionInterceptor.in
  voke(TransactionInterceptor.java:120)
          at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
  ReflectiveMethodInvocation.java:172)
          at org.springframework.aop.framework.adapter.MethodBeforeAdviceIntercept
  or.invoke(MethodBeforeAdviceInterceptor.java:50)
          at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
  ReflectiveMethodInvocation.java:172)
          at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invok
  e(ExposeInvocationInterceptor.java:89)
          at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
  ReflectiveMethodInvocation.java:172)
          at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynami
  cAopProxy.java:202)
          at $Proxy18.deleteDataSet(Unknown Source)
          at org.hisp.dhis.dataset.action.DelDataSetAction.execute(DelDataSetActio
  n.java:93)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
          at java.lang.reflect.Method.invoke(Unknown Source)
          at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultA
  ctionInvocation.java:441)
          at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(Defa
  ultActionInvocation.java:280)
          at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
  nvocation.java:243)
          at org.hisp.dhis.webportal.interceptor.XWorkPortalUserInterceptor.interc
  ept(XWorkPortalUserInterceptor.java:82)
          at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
  nvocation.java:237)
          at org.hisp.dhis.webportal.interceptor.XWorkPortalModuleInterceptor.inte
  rcept(XWorkPortalModuleInterceptor.java:85)
          at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
  nvocation.java:237)
          at org.hisp.dhis.webportal.interceptor.XWorkPortalMenuInterceptor.interc
  ept(XWorkPortalMenuInterceptor.java:91)
          at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
  nvocation.java:237)
          at org.hisp.dhis.webportal.interceptor.XWorkPortalParamsInterceptor.inte
  rcept(XWorkPortalParamsInterceptor.java:117)
          at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
  nvocation.java:237)
          at org.hisp.dhis.interceptor.ContextInterceptor.intercept(ContextInterce
  ptor.java:70)
          at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
  nvocation.java:237)
          at org.hisp.dhis.interceptor.StyleInterceptor.intercept(StyleInterceptor
  .java:107)
          at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
  nvocation.java:237)
          at org.hisp.dhis.interceptor.SystemSettingInterceptor.intercept(SystemSe
  ttingInterceptor.java:94)
          at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
  nvocation.java:237)
          at org.hisp.dhis.interceptor.DisplayPropertyInterceptor.intercept(Displa
  yPropertyInterceptor.java:90)
          at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
  nvocation.java:237)
          at org.hisp.dhis.interceptor.SortOrderInterceptor.intercept(SortOrderInt
  erceptor.java:124)
          at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
  nvocation.java:237)
          at org.hisp.dhis.security.intercept.XWorkSecurityInterceptor.intercept(X
  WorkSecurityInterceptor.java:98)
          at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
  nvocation.java:237)
          at org.hisp.dhis.interceptor.I18nInterceptor.intercept(I18nInterceptor.j
  ava:141)
          at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
  nvocation.java:237)
          at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(Cha
  iningInterceptor.java:126)
          at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
  nvocation.java:237)
          at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept
  (ParametersInterceptor.java:195)
          at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept
  (MethodFilterInterceptor.java:87)
          at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
  nvocation.java:237)
          at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.inter
  cept(StaticParametersInterceptor.java:179)
          at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
  nvocation.java:237)
          at org.hisp.dhis.interceptor.ExceptionInterceptor.intercept(ExceptionInt
  erceptor.java:98)
          at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
  nvocation.java:237)
          at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.j
  ava:52)
          at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.jav
  a:488)
          at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatc
  her.java:395)
          at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet
  Handler.java:1157)
          at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
  doFilter(FilterChainProxy.java:368)
          at org.hisp.dhis.security.filter.RequiredLoginFilter.doFilter(RequiredLo
  ginFilter.java:129)
          at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
  doFilter(FilterChainProxy.java:380)
          at org.hisp.dhis.security.filter.AutomaticAccessFilter.doFilter(Automati
  cAccessFilter.java:112)
          at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
  doFilter(FilterChainProxy.java:380)
          at org.springframework.security.web.authentication.logout.LogoutFilter.d
  oFilter(LogoutFilter.java:105)
          at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
  doFilter(FilterChainProxy.java:380)
          at org.springframework.security.web.authentication.AbstractAuthenticatio
  nProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:187)
          at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
  doFilter(FilterChainProxy.java:380)
          at org.springframework.security.web.context.SecurityContextPersistenceFi
  lter.doFilter(SecurityContextPersistenceFilter.java:79)
          at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
  doFilter(FilterChainProxy.java:380)
          at org.springframework.security.web.FilterChainProxy.doFilter(FilterChai
  nProxy.java:169)
          at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(D
  elegatingFilterProxy.java:237)
          at org.springframework.web.filter.DelegatingFilterProxy.doFilter(Delegat
  ingFilterProxy.java:167)
          at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet
  Handler.java:1157)
          at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.do
  FilterInternal(OpenSessionInViewFilter.java:198)
          at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerR
  equestFilter.java:76)
          at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet
  Handler.java:1157)
          at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:3
  88)
          at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.jav
  a:216)
          at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:1
  82)
          at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:7
  65)
          at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:440)

          at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:1
  52)
          at org.mortbay.jetty.Server.handle(Server.java:326)
          at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:54
  2)
          at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnectio
  n.java:943)
          at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756)
          at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
          at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
          at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.ja
  va:410)
          at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.j
  ava:582)
  Caused by: java.sql.BatchUpdateException: Batch entry 0 delete from dataset wher
  e datasetid='11257' was aborted.  Call getNextException to see the cause.
          at org.postgresql.jdbc2.AbstractJdbc2Statement$BatchResultHandler.handle
  Error(AbstractJdbc2Statement.java:2598)
          at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutor
  Impl.java:1836)
          at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.ja
  va:407)
          at org.postgresql.jdbc2.AbstractJdbc2Statement.executeBatch(AbstractJdbc
  2Statement.java:2737)
          at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeBatch(NewPr
  oxyPreparedStatement.java:1723)
          at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.jav
  a:70)
          at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:
  268)
          ... 101 more
  * ERROR 15:33:49,572 Error while executing action (ExceptionInterceptor.java [66
  54302@qtp-20929799-69])
  org.springframework.dao.DataIntegrityViolationException: Could not execute JDBC
  batch update; SQL [delete from dataset where datasetid=?]; constraint [null]; ne
  sted exception is org.hibernate.exception.ConstraintViolationException: Could no
  t execute JDBC batch update
          at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHiberna
  teAccessException(SessionFactoryUtils.java:637)
          at org.springframework.orm.hibernate3.HibernateTransactionManager.conver
  tHibernateAccessException(HibernateTransactionManager.java:793)
          at org.springframework.orm.hibernate3.HibernateTransactionManager.doComm
  it(HibernateTransactionManager.java:664)
          at org.springframework.transaction.support.AbstractPlatformTransactionMa
  nager.processCommit(AbstractPlatformTransactionManager.java:754)
          at org.springframework.transaction.support.AbstractPlatformTransactionMa
  nager.commit(AbstractPlatformTransactionManager.java:723)
          at org.springframework.transaction.interceptor.TransactionAspectSupport.
  commitTransactionAfterReturning(TransactionAspectSupport.java:393)
          at org.springframework.transaction.interceptor.TransactionInterceptor.in
  voke(TransactionInterceptor.java:120)
          at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
  ReflectiveMethodInvocation.java:172)
          at org.springframework.aop.framework.adapter.MethodBeforeAdviceIntercept
  or.invoke(MethodBeforeAdviceInterceptor.java:50)
          at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
  ReflectiveMethodInvocation.java:172)
          at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invok
  e(ExposeInvocationInterceptor.java:89)
          at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
  ReflectiveMethodInvocation.java:172)
          at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynami
  cAopProxy.java:202)
          at $Proxy18.deleteDataSet(Unknown Source)
          at org.hisp.dhis.dataset.action.DelDataSetAction.execute(DelDataSetActio
  n.java:93)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
          at java.lang.reflect.Method.invoke(Unknown Source)
          at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultA
  ctionInvocation.java:441)
          at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(Defa
  ultActionInvocation.java:280)
          at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
  nvocation.java:243)
          at org.hisp.dhis.webportal.interceptor.XWorkPortalUserInterceptor.interc
  ept(XWorkPortalUserInterceptor.java:82)
          at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
  nvocation.java:237)
          at org.hisp.dhis.webportal.interceptor.XWorkPortalModuleInterceptor.inte
  rcept(XWorkPortalModuleInterceptor.java:85)
          at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
  nvocation.java:237)
          at org.hisp.dhis.webportal.interceptor.XWorkPortalMenuInterceptor.interc
  ept(XWorkPortalMenuInterceptor.java:91)
          at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
  nvocation.java:237)
          at org.hisp.dhis.webportal.interceptor.XWorkPortalParamsInterceptor.inte
  rcept(XWorkPortalParamsInterceptor.java:117)
          at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
  nvocation.java:237)
          at org.hisp.dhis.interceptor.ContextInterceptor.intercept(ContextInterce
  ptor.java:70)
          at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
  nvocation.java:237)
          at org.hisp.dhis.interceptor.StyleInterceptor.intercept(StyleInterceptor
  .java:107)
          at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
  nvocation.java:237)
          at org.hisp.dhis.interceptor.SystemSettingInterceptor.intercept(SystemSe
  ttingInterceptor.java:94)
          at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
  nvocation.java:237)
          at org.hisp.dhis.interceptor.DisplayPropertyInterceptor.intercept(Displa
  yPropertyInterceptor.java:90)
          at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
  nvocation.java:237)
          at org.hisp.dhis.interceptor.SortOrderInterceptor.intercept(SortOrderInt
  erceptor.java:124)
          at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
  nvocation.java:237)
          at org.hisp.dhis.security.intercept.XWorkSecurityInterceptor.intercept(X
  WorkSecurityInterceptor.java:98)
          at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
  nvocation.java:237)
          at org.hisp.dhis.interceptor.I18nInterceptor.intercept(I18nInterceptor.j
  ava:141)
          at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
  nvocation.java:237)
          at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(Cha
  iningInterceptor.java:126)
          at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
  nvocation.java:237)
          at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept
  (ParametersInterceptor.java:195)
          at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept
  (MethodFilterInterceptor.java:87)
          at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
  nvocation.java:237)
          at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.inter
  cept(StaticParametersInterceptor.java:179)
          at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
  nvocation.java:237)
          at org.hisp.dhis.interceptor.ExceptionInterceptor.intercept(ExceptionInt
  erceptor.java:98)
          at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
  nvocation.java:237)
          at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.j
  ava:52)
          at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.jav
  a:488)
          at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatc
  her.java:395)
          at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet
  Handler.java:1157)
          at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
  doFilter(FilterChainProxy.java:368)
          at org.hisp.dhis.security.filter.RequiredLoginFilter.doFilter(RequiredLo
  ginFilter.java:129)
          at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
  doFilter(FilterChainProxy.java:380)
          at org.hisp.dhis.security.filter.AutomaticAccessFilter.doFilter(Automati
  cAccessFilter.java:112)
          at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
  doFilter(FilterChainProxy.java:380)
          at org.springframework.security.web.authentication.logout.LogoutFilter.d
  oFilter(LogoutFilter.java:105)
          at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
  doFilter(FilterChainProxy.java:380)
          at org.springframework.security.web.authentication.AbstractAuthenticatio
  nProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:187)
          at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
  doFilter(FilterChainProxy.java:380)
          at org.springframework.security.web.context.SecurityContextPersistenceFi
  lter.doFilter(SecurityContextPersistenceFilter.java:79)
          at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
  doFilter(FilterChainProxy.java:380)
          at org.springframework.security.web.FilterChainProxy.doFilter(FilterChai
  nProxy.java:169)
          at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(D
  elegatingFilterProxy.java:237)
          at org.springframework.web.filter.DelegatingFilterProxy.doFilter(Delegat
  ingFilterProxy.java:167)
          at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet
  Handler.java:1157)
          at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.do
  FilterInternal(OpenSessionInViewFilter.java:198)
          at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerR
  equestFilter.java:76)
          at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet
  Handler.java:1157)
          at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:3
  88)
          at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.jav
  a:216)
          at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:1
  82)
          at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:7
  65)
          at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:440)

          at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:1
  52)
          at org.mortbay.jetty.Server.handle(Server.java:326)
          at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:54
  2)
          at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnectio
  n.java:943)
          at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756)
          at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
          at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
          at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.ja
  va:410)
          at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.j
  ava:582)
  Caused by: org.hibernate.exception.ConstraintViolationException: Could not execu
  te JDBC batch update
          at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.j
  ava:96)
          at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelp
  er.java:66)
          at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:
  275)
          at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.j
  ava:114)
          at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.j
  ava:109)
          at org.hibernate.jdbc.AbstractBatcher.prepareBatchStatement(AbstractBatc
  her.java:244)
          at org.hibernate.persister.entity.AbstractEntityPersister.delete(Abstrac
  tEntityPersister.java:2650)
          at org.hibernate.persister.entity.AbstractEntityPersister.delete(Abstrac
  tEntityPersister.java:2895)
          at org.hibernate.action.EntityDeleteAction.execute(EntityDeleteAction.ja
  va:97)
          at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:267)
          at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:259)

          at
  org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:183)

          at org.hibernate.event.def.AbstractFlushingEventListener.performExecutio
  ns(AbstractFlushingEventListener.java:321)
          at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlus
  hEventListener.java:51)
          at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1206)
          at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:375)
          at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java
  :137)
          at org.springframework.orm.hibernate3.HibernateTransactionManager.doComm
  it(HibernateTransactionManager.java:656)
          ... 86 more
  Caused by: java.sql.BatchUpdateException: Batch entry 0 delete from dataset wher
  e datasetid='11257' was aborted.  Call getNextException to see the cause.
          at org.postgresql.jdbc2.AbstractJdbc2Statement$BatchResultHandler.handle
  Error(AbstractJdbc2Statement.java:2598)
          at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutor
  Impl.java:1836)
          at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.ja
  va:407)
          at org.postgresql.jdbc2.AbstractJdbc2Statement.executeBatch(AbstractJdbc
  2Statement.java:2737)
          at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeBatch(NewPr
  oxyPreparedStatement.java:1723)
          at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.jav
  a:70)
          at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:
  268)
          ... 101 more



Follow ups

References