Form forwarding ... are failures re-sent?

Hi all –

I have been doing the form forwarding API…

In the form forwarding page, I see that it tallies some “failures” listed
along with the successes…

I am curious… do you think those failures were later on re-sent
successfully?

If no… do you know a way to learn about which ones failed, and why?

thx
eric

Hi Eric,

Form forwards are retried 3 times if a failure is detected.

You should be able to see more information about each individual failure on
the Data Forwarding Records tab of the project settings page. On that page,
you can filter the report by forwarder and status. In that report you will
be able to see the failure message, and can manually retrigger any failed
records.

Hope that helps,

Farid

··· On Thu, Jan 12, 2017 at 1:08 AM, Eric Stephan wrote:

Hi all –

I have been doing the form forwarding API…

In the form forwarding page, I see that it tallies some “failures” listed
along with the successes…

I am curious… do you think those failures were later on re-sent
successfully?

If no… do you know a way to learn about which ones failed, and why?

thx
eric


You received this message because you are subscribed to the Google Groups
"commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Hello – thanks. I am back after a delay. Your info was good for me.

I am still interested in understanding more about these failures.

–> I am pasting below the very large “failure reason” entry for one of the
failures. Can you look at it and tell me something about what it means? Do
you think that it is an error that is because of the *receiving *side or
the *sending *(CommCareHQ) side?

··· ====

Status Code 500: Internal Server Error. Apache
Tomcat/6.0.39 - Error report

HTTP Status 500 - Request processing failed; nested exception is net.sf.json.JSONException: JSONObject["@name"] not found.


type Exception report

message Request processing failed; nested exception is net.sf.json.JSONException: JSONObject["@name"] not found.

description The server encountered an internal error that prevented it from fulfilling this request.

exception

org.springframework.web.util.NestedServletException: Request 
processing failed; nested exception is net.sf.json.JSONException: 
JSONObject["@name"] not found. 
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:979) 
org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:869) 
javax.servlet.http.HttpServlet.service(HttpServlet.java:643) 
org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:843) 
javax.servlet.http.HttpServlet.service(HttpServlet.java:723) 
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) 
org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118) 
org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84) 
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) 
org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113) 
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) 
org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103) 
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) 
org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113) 
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) 
org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:154) 
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) 
org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45) 
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) 
org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:201) 
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) 
org.hisp.dhis.security.filter.CorsFilter.doFilter(CorsFilter.java:94) 
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) 
org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:199) 
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) 
org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:199) 
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) 
org.hisp.dhis.security.filter.CustomAuthenticationFilter.doFilter(CustomAuthenticationFilter.java:70) 
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) 
org.springframework.security.oauth2.provider.authentication.OAuth2AuthenticationProcessingFilter.doFilter(OAuth2AuthenticationProcessingFilter.java:140) 
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) 
org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:110) 
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) 
org.hisp.dhis.security.filter.AutomaticAccessFilter.doFilter(AutomaticAccessFilter.java:120) 
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) 
org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:57) 
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) 
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) 
org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87) 
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) 
org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192) 
org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160) 
org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344) 
org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261) 
org.springframework.web.filter.ShallowEtagHeaderFilter.doFilterInternal(ShallowEtagHeaderFilter.java:82) 
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) 
org.springframework.orm.hibernate4.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:151) 
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) 
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:85) 
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) 

root cause

net.sf.json.JSONException: 
JSONObject["@name"] not found. 
net.sf.json.JSONObject.getString(JSONObject.java:2092) 
org.hisp.dhis.webapi.controller.dure.thai.EcascadeExchangeController.getReports(EcascadeExchangeController.java:79) 
sun.reflect.GeneratedMethodAccessor645.invoke(Unknown Source) 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
java.lang.reflect.Method.invoke(Method.java:606) 
org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221) 
org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:137) 
org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:110) 
org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:776) 
org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:705) 
org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85) 
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959) 
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893) 
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:967) 
org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:869) 
javax.servlet.http.HttpServlet.service(HttpServlet.java:643) 
org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:843) 
javax.servlet.http.HttpServlet.service(HttpServlet.java:723) 
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) 
org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118) 
org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84) 
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) 
org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113) 
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) 
org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103) 
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) 
org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113) 
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) 
org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:154) 
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) 
org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45) 
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) 
org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:201) 
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) 
org.hisp.dhis.security.filter.CorsFilter.doFilter(CorsFilter.java:94) 
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) 
org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:199) 
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) 
org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:199) 
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) 
org.hisp.dhis.security.filter.CustomAuthenticationFilter.doFilter(CustomAuthenticationFilter.java:70) 
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) 
org.springframework.security.oauth2.provider.authentication.OAuth2AuthenticationProcessingFilter.doFilter(OAuth2AuthenticationProcessingFilter.java:140) 
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) 
org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:110) 
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) 
org.hisp.dhis.security.filter.AutomaticAccessFilter.doFilter(AutomaticAccessFilter.java:120) 
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) 
org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:57) 
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) 
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) 
org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87) 
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) 
org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192) 
org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160) 
org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344) 
org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261) 
org.springframework.web.filter.ShallowEtagHeaderFilter.doFilterInternal(ShallowEtagHeaderFilter.java:82) 
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) 
org.springframework.orm.hibernate4.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:151) 
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) 
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:85) 
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) 

note The full stack trace of the root cause is available in the Apache Tomcat/6.0.39 logs.


Apache Tomcat/6.0.39

P.S. Also note, if it’s useful for you to look at my project space, this is
form forwarding that is being done at the project space called epm-thai.

For example, perhaps all the errors were grouped during one period of time
that might indicate the receiving server had a technical issue, etc?

thanks for your thoughts –
Eric

Eric,

When pasting large stack traces it can be easier on the eyes to use a site
like pastebin http://pastebin.com/ or GitHub’s gist feature to preserve
formatting

The important piece of your stack appears to be HTTP Status 500 - Request
processing failed; nested exception is net.sf.json.JSONException:
JSONObject["@name"] not found.

Specifically, it looks like Spring’s jackson library is trying to map some
part of the response to the property “@name” but this is not being found in
the raw JSON response from HQ.

Cheers,
Will

··· On Fri, Jan 27, 2017 at 10:58 AM, Eric Stephan wrote:

P.S. Also note, if it’s useful for you to look at my project space, this
is form forwarding that is being done at the project space called
epm-thai.

For example, perhaps all the errors were grouped during one period of time
that might indicate the receiving server had a technical issue, etc?

thanks for your thoughts –
Eric


You received this message because you are subscribed to the Google Groups
"commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Thank you – good info –

So, to askwhat you probably thought was obvious – that error is all on the
side of the machine that is receiving our data, right? Nothing related to
the connection on “my side.” (other than issues with my own data, like
"Eric, you were supposed to send us a value called XXX")

Let me know – thanks

Eric

Correct, this is an issue with whatever process is receiving the data from
what I can tell.

··· On Fri, Jan 27, 2017 at 11:53 AM, Eric Stephan wrote:

Thank you – good info –

So, to askwhat you probably thought was obvious – that error is all on
the side of the machine that is receiving our data, right? Nothing related
to the connection on “my side.” (other than issues with my own data, like
"Eric, you were supposed to send us a value called XXX")

Let me know – thanks

Eric


You received this message because you are subscribed to the Google Groups
"commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

One more question on these Form Forwarding errors. (Thanks much for your
help so far!)

Above, you said that form forwards are re-tried 3 times if a failure is
detected.

(For reference, my forwarding status screen currently shows: 49 pending …
1742 failure … 7896 success.)

– When three failures happen, what happens to that form in the
form-forwarding status screen?

– Are those “three-fails” the only ones that appear in the "failure"
column?

– Or do the “three-fails” disappear from the status screen tallies, and
"failure" means those forms that are still within their re-trying phase?

– What determines the duration between the 3 re-tries?

– I assume those tallies on the status screen will never be cleared or
reset? They will continue to climb higher and higher through the history of
my project?

huge thanks for your help!

Eric