← Back to team overview

dhis2-devs team mailing list archive

Re: Error when submitting data with the smartphone client

 

Happened again after a restart of the system,and again, resulted in a fatal
NPE. Any help here? This is causing real havoc.


* INFO  2014-02-25 16:11:06,862 Data values set saved [data element id
scheme: null, org unit id scheme: null, dry run: false, async: false,
strategy: null, skip check: false] (DataValueSetController.java [http-bio-8

080-exec-255])

* ERROR 2014-02-25 16:11:06,863 HHH000352: Unable to release batch
statement... (AbstractBatchImpl.java [http-bio-8080-exec-255])

* ERROR 2014-02-25 16:11:06,863 HHH000246: SQLException escaped proxy
(AbstractBatchImpl.java [http-bio-8080-exec-255])

java.sql.SQLException: You can't operate on a closed Statement!!!

        at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:106)

        at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:65)

        at
com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.clearBatch(NewProxyPreparedStatement.java:1703)

        at
org.hibernate.engine.jdbc.batch.internal.AbstractBatchImpl.releaseStatements(AbstractBatchImpl.java:163)

        at
org.hibernate.engine.jdbc.batch.internal.AbstractBatchImpl.release(AbstractBatchImpl.java:197)

        at
org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.close(JdbcCoordinatorImpl.java:174)

        at
org.hibernate.engine.transaction.internal.TransactionCoordinatorImpl.close(TransactionCoordinatorImpl.java:277)

        at org.hibernate.internal.SessionImpl.close(SessionImpl.java:353)

        at
org.springframework.orm.hibernate4.SessionFactoryUtils.closeSession(SessionFactoryUtils.java:105)

        at
org.springframework.orm.hibernate4.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:158)

        at
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)

        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

        at
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)

        at
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)

        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)

        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)

        at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)

        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)

        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)

        at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)

        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)

        at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)

        at
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)

        at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579)

        at
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:307)

        at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

        at java.lang.Thread.run(Thread.java:744)

Caused by: java.lang.NullPointerException

        at
com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.maybeDirtyTransaction(NewProxyPreparedStatement.java:2069)

        at
com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.clearBatch(NewProxyPreparedStatement.java:1695)

        ... 28 more

Reg

--Sent from my mobile
On Feb 25, 2014 12:09 PM, "Jason Pickering" <jason.p.pickering@xxxxxxxxx>
wrote:

> Hi Devs,
> This popped up this morning, and caused big problems after this error. Any
> idea what the root cause might be? Using
>
> Version:2.14 Build revision:13740
> Regards
> Jason
> * INFO  2014-02-25 11:00:43,174 GTW: Clickatell CLTS: HTTP POST:
> http://api.clickatell.com/http/ping (HTTPGateway.java [KeepAlive
> [Clickatell CLTS]])
> * INFO  2014-02-25 11:00:57,065 importing data values
> (DefaultDataValueSetService.java [http-bio-8080-exec-93])
> * WARN  2014-02-25 11:01:12,156 SQL Error: 0, SQLState: 23505
> (SqlExceptionHelper.java [http-bio-8080-exec-114])
> * ERROR 2014-02-25 11:01:12,157 ERROR: duplicate key value violates unique
> constraint "completedatasetregistration_pkey"
>   Detail: Key (datasetid, periodid, sourceid)=(10937, 21368, 12692)
> already exists. (SqlExceptionHelper.java [http-bio-8080-exec-114])
> * ERROR 2014-02-25 11:01:18,348
> org.springframework.dao.DataIntegrityViolationException: could not execute
> statement; SQL [n/a]; constraint [completedatasetre
> gistration_pkey]; nested exception is
> org.hibernate.exception.ConstraintViolationException: could not execute
> statement
>         at
> org.springframework.orm.hibernate4.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:138)
>         at
> org.springframework.orm.hibernate4.HibernateTransactionManager.convertHibernateAccessException(HibernateTransactionManager.java:680)
>         at
> org.springframework.orm.hibernate4.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:562)
>         at
> org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:755)
>         at
> org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:724)
>         at
> org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:475)
>         at
> org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:270)
>         at
> org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:94)
>         at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
>         at
> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
>         at com.sun.proxy.$Proxy57.saveCompleteDataSetRegistration(Unknown
> Source)
>         at
> org.hisp.dhis.dxf2.datavalueset.DefaultDataValueSetService.handleComplete(DefaultDataValueSetService.java:490)
>         at
> org.hisp.dhis.dxf2.datavalueset.DefaultDataValueSetService.saveDataValueSet(DefaultDataValueSetService.java:307)
>         at
> org.hisp.dhis.dxf2.datavalueset.DefaultDataValueSetService.saveDataValueSetJson(DefaultDataValueSetService.java:228)
>         at
> org.hisp.dhis.dxf2.datavalueset.DefaultDataValueSetService.saveDataValueSetJson(DefaultDataValueSetService.java:205)
>         at
> org.hisp.dhis.api.controller.DataValueSetController.postJsonDataValueSet(DataValueSetController.java:194)
>         at
> org.hisp.dhis.api.controller.DataValueSetController$$FastClassByCGLIB$$1929d95b.invoke(<generated>)
>         at
> org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
>         at
> org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:701)
>         at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
>         at
> org.springframework.security.access.intercept.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:64)
>         at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
>         at
> org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:634)
>         at
> org.hisp.dhis.api.controller.DataValueSetController$$EnhancerByCGLIB$$fd92c331.postJsonDataValueSet(<generated>)
>         at sun.reflect.GeneratedMethodAccessor819.invoke(Unknown Source)
>
>

References