New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Savepoint_timestamp required for suitcase upload #1341

Closed
orilevari opened this Issue Sep 22, 2017 · 2 comments

Comments

Projects
None yet
2 participants
@orilevari

orilevari commented Sep 22, 2017

When using suitcase cli to push a csv to an existing table, the savepoint_timestamp field cannot be set to null. In the past it would be autogenerated if set to null, and this was very useful, as oftentimes completely new rows are added through suitcase, and conforming to ODK timestamp format adds overhead.

STACKTRACE:
com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "type" (class org.opendatakit.aggregate.odktables.rest.entity.RowOutcomeList), not marked as ignorable (3 known properties: "rows", "tableUri", "dataETag"])
at [Source: {"type":"INTERNAL_ERROR","message":"Illegal state: Attempting to set null value in non-null field _SAVEPOINT_TIMESTAMP in odk_sync.__ODKTABLES__TABLE_ENTITLEMENTS"}; line: 1, column: 10] (through reference chain: org.opendatakit.aggregate.odktables.rest.entity.RowOutcomeList["type"])
at com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:51)
at com.fasterxml.jackson.databind.DeserializationContext.reportUnknownProperty(DeserializationContext.java:731)
at com.fasterxml.jackson.databind.deser.std.StdDeserializer.handleUnknownProperty(StdDeserializer.java:915)
at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownProperty(BeanDeserializerBase.java:1292)
at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownVanilla(BeanDeserializerBase.java:1270)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:247)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:118)
at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:3051)
at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2146)
at org.opendatakit.sync.client.SyncClient.bulkRowsSender(SyncClient.java:2664)
at org.opendatakit.sync.client.SyncClient.alterRowsUsingSingleBatch(SyncClient.java:2872)
at org.opendatakit.suitcase.net.SyncWrapper.alterRowsUsingSingleBatch(SyncWrapper.java:300)
at org.opendatakit.suitcase.net.UpdateTask.handleRowBatches(UpdateTask.java:366)
at org.opendatakit.suitcase.net.UpdateTask.doInBackground(UpdateTask.java:312)
at org.opendatakit.suitcase.net.UpdateTask.doInBackground(UpdateTask.java:35)
at javax.swing.SwingWorker$1.call(SwingWorker.java:295)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at javax.swing.SwingWorker.run(SwingWorker.java:334)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)

@linl33

This comment has been minimized.

Member

linl33 commented Sep 22, 2017

Stacktrace from Sync Endpoint

java.lang.IllegalStateException: Attempting to set null value in non-null field _SAVEPOINT_TIMESTAMP in odk_sync.__ODKTABLES__TABLE_ENTITLEMENTS
	at org.opendatakit.common.persistence.CommonFieldsBase.setStringField(CommonFieldsBase.java:209)
	at org.opendatakit.common.ermodel.Relation$EntityImpl.set(Relation.java:525)
	at org.opendatakit.aggregate.odktables.relation.EntityCreator.setRowFields(EntityCreator.java:238)
	at org.opendatakit.aggregate.odktables.DataManager.insertOrUpdateRows(DataManager.java:1022)
	at org.opendatakit.aggregate.odktables.impl.api.DataServiceImpl.alterRows(DataServiceImpl.java:87)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.apache.wink.server.internal.handlers.InvokeMethodHandler.handleRequest(InvokeMethodHandler.java:63)
	at org.apache.wink.server.handlers.AbstractHandler.handleRequest(AbstractHandler.java:33)
	at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)
	at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)
	at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:63)
	at org.apache.wink.server.internal.handlers.CreateInvocationParametersHandler.handleRequest(CreateInvocationParametersHandler.java:54)
	at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)
	at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)
	at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:63)
	at org.apache.wink.server.internal.handlers.FindResourceMethodHandler.handleResourceMethod(FindResourceMethodHandler.java:151)
	at org.apache.wink.server.internal.handlers.FindResourceMethodHandler.handleRequest(FindResourceMethodHandler.java:65)
	at org.apache.wink.server.internal.handlers.FindResourceMethodHandler.handleSubResourceLocator(FindResourceMethodHandler.java:230)
	at org.apache.wink.server.internal.handlers.FindResourceMethodHandler.handleRequest(FindResourceMethodHandler.java:115)
	at org.apache.wink.server.internal.handlers.FindResourceMethodHandler.handleSubResourceLocator(FindResourceMethodHandler.java:230)
	at org.apache.wink.server.internal.handlers.FindResourceMethodHandler.handleRequest(FindResourceMethodHandler.java:115)
	at org.apache.wink.server.internal.handlers.FindResourceMethodHandler.handleSubResourceLocator(FindResourceMethodHandler.java:230)
	at org.apache.wink.server.internal.handlers.FindResourceMethodHandler.handleRequest(FindResourceMethodHandler.java:115)
	at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)
	at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)
	at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:63)
	at org.apache.wink.server.internal.handlers.FindRootResourceHandler.handleRequest(FindRootResourceHandler.java:95)
	at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)
	at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)
	at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:63)
	at org.apache.wink.server.internal.handlers.HeadMethodHandler.handleRequest(HeadMethodHandler.java:53)
	at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)
	at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)
	at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:63)
	at org.apache.wink.server.internal.handlers.OptionsMethodHandler.handleRequest(OptionsMethodHandler.java:46)
	at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)
	at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)
	at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:63)
	at org.apache.wink.server.internal.handlers.SearchResultHandler.handleRequest(SearchResultHandler.java:33)
	at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)
	at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)
	at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:63)
	at org.apache.wink.server.internal.log.ResourceInvocation.handleRequest(ResourceInvocation.java:92)
	at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)
	at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)
	at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:63)
	at org.apache.wink.server.internal.log.Requests.handleRequest(Requests.java:76)
	at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)
	at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)
	at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:63)
	at org.apache.wink.server.handlers.AbstractHandlersChain.run(AbstractHandlersChain.java:48)
	at org.apache.wink.server.internal.RequestProcessor.handleRequestWithoutFaultBarrier(RequestProcessor.java:207)
	at org.apache.wink.server.internal.RequestProcessor.handleRequest(RequestProcessor.java:154)
	at org.apache.wink.server.internal.servlet.RestServlet.service(RestServlet.java:119)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.opendatakit.aggregate.odktables.impl.api.wink.ContentEncodingResponseFilter.doFilter(ContentEncodingResponseFilter.java:144)
	at org.opendatakit.aggregate.odktables.impl.api.wink.GaeAwareContentEncodingResponseFilter.doFilter(GaeAwareContentEncodingResponseFilter.java:77)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.apache.wink.server.internal.servlet.contentencode.ContentEncodingRequestFilter.doFilter(ContentEncodingRequestFilter.java:115)
	at org.opendatakit.aggregate.odktables.impl.api.wink.GaeAwareContentEncodingRequestFilter.doFilter(GaeAwareContentEncodingRequestFilter.java:78)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:317)
	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127)
	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
	at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:114)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
	at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
	at org.opendatakit.common.security.spring.SecurityContextHolderAwareAuthPreservingRequestFilter.doFilter(SecurityContextHolderAwareAuthPreservingRequestFilter.java:66)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
	at org.opendatakit.common.security.spring.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:114)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
	at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
	at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:116)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
	at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
	at org.springframework.security.web.access.channel.ChannelProcessingFilter.doFilter(ChannelProcessingFilter.java:157)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
	at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:214)
	at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:177)
	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:478)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:80)
	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:624)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:799)
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1455)
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Thread.java:748)
@linl33

This comment has been minimized.

Member

linl33 commented Sep 29, 2017

Feature added to Suitcase by opendatakit/suitcase#4

@linl33 linl33 closed this Sep 29, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment