← Back to team overview

dhis2-devs team mailing list archive

Re: error using curl command

 

Hi all DHIS2 Members,
I tried all my heart.
but it is still meet the problem.

[image: Inline image 1]

On Tue, Sep 8, 2015 at 11:58 AM, channara rin <rin.channara@xxxxxxxxx>
wrote:

> plz check my attached file. I already change to UTF-8.
>
> On Tue, Sep 8, 2015 at 11:56 AM, channara rin <rin.channara@xxxxxxxxx>
> wrote:
>
>> Hi jason,
>> I remove my gow and then download from github gow.
>> and then i run again. i got this problem
>>
>> ****************************************************************************************************
>> c:\Program Files (x86)\Gow\bin>curl -d @ppp.json
>> "localhost:8080/dhis/api/trackedEntityInstances" -X POST -H "Content-Type:
>> application/json" -u admin:***** -v
>> * Hostname was NOT found in DNS cache
>> *   Trying ::1...
>> * Connected to localhost (::1) port 8080 (#0)
>> * Server auth using Basic with user 'admin'
>> > POST /dhis/api/trackedEntityInstances HTTP/1.1
>> > Authorization: Basic YWRtaW46TmFyYXZ5bHVjazc=
>> > User-Agent: curl/7.35.0
>> > Host: localhost:8080
>> > Accept: */*
>> > Content-Type: application/json
>> > Content-Length: 3498
>> > Expect: 100-continue
>> >
>> < HTTP/1.1 100 Continue
>> < HTTP/1.1 500 Internal Server Error
>> * Server Apache-Coyote/1.1 is not blacklisted
>> < Server: Apache-Coyote/1.1
>> < X-XSS-Protection: 1; mode=block
>> < X-Frame-Options: DENY
>> < X-Content-Type-Options: nosniff
>> < Set-Cookie: JSESSIONID=E02D93CACBE26EEB7E417B338359FF8B; Path=/dhis/;
>> HttpOnly
>> < Content-Type: text/html;charset=utf-8
>> < Content-Language: en
>> < Transfer-Encoding: chunked
>> < Date: Tue, 08 Sep 2015 04:54:19 GMT
>> < Connection: close
>> <
>> <html><head><title>Apache Tomcat/7.0.64 - Error
>> report</title><style><!--H1
>> {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;}
>> H2
>> {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;}
>> H3
>> {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;}
>> BODY
>> {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B
>> {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;}
>> P
>> {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A
>> {color : black;}A.name {color : black;}HR {color : #525D76;}--></style>
>> </head><body><h1>HTTP Status 500 - Can not deserialize instance of
>> org.hisp.dhis.dxf2.events.trackedentity.TrackedEntityInstance out of
>> START_ARRAY token</h1><HR size="1" noshade="noshade"><p><b>type</b>
>> Exception report</p><p><b>message</b> <u>Can not deserialize instance of
>> org.hisp.dhis.dxf2.events.trackedentity.TrackedEntityInstance out of
>> START_ARRAY token</u></p><p><b>description</b> <u>The server encountered an
>> internal error that prevented it from fulfilling this
>> request.</u></p><p><b>exception</b>
>> <pre>com.fasterxml.jackson.databind.JsonMappingException: Can not
>> deserialize instance of
>> org.hisp.dhis.dxf2.events.trackedentity.TrackedEntityInstance out of
>> START_ARRAY token
>>  at [Source: [    {        &quot;trackedEntity&quot;:
>> &quot;PtPf474EHLM&quot;,        &quot;orgUnit&quot;:
>> &quot;NcA7HpabeAG&quot;,        &quot;attributes&quot;: [            {
>>            &quot;attribute&quot;: &quot;jZbsh2zpVWa&quot;,
>>  &quot;value&quot;: &quot;0201&quot;            },            {
>>    &quot;attribute&quot;: &quot;j9sScvXsXVO&quot;,
>>  &quot;value&quot;: &quot;ABC&quot;            },            {
>>    &quot;attribute&quot;: &quot;szmBW8EDWLx&quot;,
>>  &quot;value&quot;: &quot;Male&quot;            },            {
>>    &quot;attribute&quot;: &quot;adZnoplDPyx&quot;,
>>  &quot;value&quot;: &quot;48&quot;            },            {
>>  &quot;attribute&quot;: &quot;j16LxVcr8hV&quot;,
>>  &quot;value&quot;: &quot;1967-08-31&quot;            },            {
>>          &quot;attribute&quot;: &quot;T82mY6tjGVY&quot;,
>>  &quot;value&quot;: &quot;Married&quot;            },            {
>>        &quot;attribute&quot;: &quot;pyX2F5mjX5L&quot;,
>>  &quot;value&quot;: &quot;Siem Reap&quot;            },            {
>>          &quot;attribute&quot;: &quot;CakCGhhkSJK&quot;,
>>  &quot;value&quot;: &quot;Siem Reap&quot;            },            {
>>          &quot;attribute&quot;: &quot;zAKBPz96mci&quot;,
>>  &quot;value&quot;: &quot;Siem Reap&quot;            },            {
>>          &quot;attribute&quot;: &quot;VstyNjHv8KM&quot;,
>>  &quot;value&quot;: &quot;AB&quot;            },            {
>>  &quot;attribute&quot;: &quot;SmHt9k5t501&quot;,
>>  &quot;value&quot;: &quot;AB&quot;            },            {
>>  &quot;attribute&quot;: &quot;CQqQwvsiZsg&quot;,
>>  &quot;value&quot;: &quot;AB&quot;            },            {
>>  &quot;attribute&quot;: &quot;HVcRcWAW55I&quot;,
>>  &quot;value&quot;: &quot;ART&quot;            },            {
>>    &quot;attribute&quot;: &quot;RtAymQ0PT5p&quot;,
>>  &quot;value&quot;: &quot;410&quot;            },            {
>>    &quot;attribute&quot;: &quot;ZSEdw9AHbIC&quot;,
>>  &quot;value&quot;: &quot;1641&quot;            },            {
>>    &quot;attribute&quot;: &quot;JQtRizheDhD&quot;,
>>  &quot;value&quot;: &quot;2005-04-11&quot;            }        ]    },    {
>>        &quot;trackedEntity&quot;: &quot;PtPf474EHLM&quot;,
>>  &quot;orgUnit&quot;: &quot;NcA7HpabeAG&quot;,
>>  &quot;attributes&quot;: [            {
>>  &quot;attribute&quot;: &quot;jZbsh2zpVWa&quot;,
>>  &quot;value&quot;: &quot;0202&quot;            },            {
>>    &quot;attribute&quot;: &quot;j9sScvXsXVO&quot;,
>>  &quot;value&quot;: &quot;DEF&quot;            },            {
>>    &quot;attribute&quot;: &quot;szmBW8EDWLx&quot;,
>>  &quot;value&quot;: &quot;Male&quot;            },            {
>>    &quot;attribute&quot;: &quot;adZnoplDPyx&quot;,
>>  &quot;value&quot;: &quot;42&quot;            },            {
>>  &quot;attribute&quot;: &quot;j16LxVcr8hV&quot;,
>>  &quot;value&quot;: &quot;1973-08-31&quot;            },            {
>>          &quot;attribute&quot;: &quot;T82mY6tjGVY&quot;,
>>  &quot;value&quot;: &quot;Married&quot;            },            {
>>        &quot;attribute&quot;: &quot;pyX2F5mjX5L&quot;,
>>  &quot;value&quot;: &quot;Siem Reap&quot;            },            {
>>          &quot;attribute&quot;: &quot;CakCGhhkSJK&quot;,
>>  &quot;value&quot;: &quot;Siem Reap&quot;            },            {
>>          &quot;attribute&quot;: &quot;zAKBPz96mci&quot;,
>>  &quot;value&quot;: &quot;Siem Reap&quot;            },            {
>>          &quot;attribute&quot;: &quot;VstyNjHv8KM&quot;,
>>  &quot;value&quot;: &quot;AB&quot;            },            {
>>  &quot;attribute&quot;: &quot;SmHt9k5t501&quot;,
>>  &quot;value&quot;: &quot;AB&quot;            },            {
>>  &quot;attribute&quot;: &quot;CQqQwvsiZsg&quot;,
>>  &quot;value&quot;: &quot;AB&quot;            },            {
>>  &quot;attribute&quot;: &quot;HVcRcWAW55I&quot;,
>>  &quot;value&quot;: &quot;ART&quot;            },            {
>>    &quot;attribute&quot;: &quot;RtAymQ0PT5p&quot;,
>>  &quot;value&quot;: &quot;423&quot;            },            {
>>    &quot;attribute&quot;: &quot;ZSEdw9AHbIC&quot;,
>>  &quot;value&quot;: &quot;457&quot;            },            {
>>    &quot;attribute&quot;: &quot;JQtRizheDhD&quot;,
>>  &quot;value&quot;: &quot;2005-06-17&quot;            }        ]    }];
>> line: 1, column: 1]
>>
>> com.fasterxml.jackson.databind.JsonMappingException.from(JsonMappingException.java:148)
>>
>> com.fasterxml.jackson.databind.DeserializationContext.mappingException(DeserializationContext.java:835)
>>
>> com.fasterxml.jackson.databind.DeserializationContext.mappingException(DeserializationContext.java:831)
>>
>> com.fasterxml.jackson.databind.deser.BeanDeserializerBase.deserializeFromArray(BeanDeserializerBase.java:1229)
>>
>> com.fasterxml.jackson.databind.deser.BeanDeserializer._deserializeOther(BeanDeserializer.java:165)
>>
>> com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:144)
>>
>> com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:3562)
>>
>> com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2578)
>>
>> org.hisp.dhis.dxf2.events.trackedentity.JacksonTrackedEntityInstanceService.fromJson(JacksonTrackedEntityInstanceService.java:83)
>>
>> org.hisp.dhis.dxf2.events.trackedentity.JacksonTrackedEntityInstanceService.addTrackedEntityInstanceJson(JacksonTrackedEntityInstanceService.java:133)
>>         sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>         sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>>         sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>>         java.lang.reflect.Method.invoke(Unknown Source)
>>
>> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
>>
>> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
>>
>> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
>>
>> org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
>>
>> org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)
>>
>> org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
>>
>> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
>>
>> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
>>         com.sun.proxy.$Proxy175.addTrackedEntityInstanceJson(Unknown
>> Source)
>>         sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>         sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>>         sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>>         java.lang.reflect.Method.invoke(Unknown Source)
>>
>> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
>>
>> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
>>
>> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
>>
>> org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:133)
>>
>> org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:121)
>>
>> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
>>
>> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
>>         com.sun.proxy.$Proxy127.addTrackedEntityInstanceJson(Unknown
>> Source)
>>
>> org.hisp.dhis.webapi.controller.event.TrackedEntityInstanceController.postTrackedEntityInstanceJson(TrackedEntityInstanceController.java:357)
>>
>> org.hisp.dhis.webapi.controller.event.TrackedEntityInstanceController$$FastClassBySpringCGLIB$$cfbc2606.invoke(&lt;generated&gt;)
>>
>> org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
>>
>> org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:717)
>>
>> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
>>
>> org.springframework.security.access.intercept.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:64)
>>
>> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
>>
>> org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:653)
>>
>> org.hisp.dhis.webapi.controller.event.TrackedEntityInstanceController$$EnhancerBySpringCGLIB$$930005f.postTrackedEntityInstanceJson(&lt;generated&gt;)
>>         sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>         sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>>         sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>>         java.lang.reflect.Method.invoke(Unknown Source)
>>
>> 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:650)
>>
>> org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:843)
>>         javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
>>
>> org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
>>
>> 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:93)
>>
>> 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:64)
>>
>> 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:115)
>>
>> 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.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:50)
>>
>> 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)
>> </pre></p><p><b>note</b> <u>The full stack trace of the root cause is
>> available in the Apache Tomcat/7.0.64 logs.</u></p><HR size="1"
>> noshade="noshade"><h3>Apache Tomcat/7.0.64</h3></body></html>* Closing
>> connection 0
>>
>> ****************************************************************************************************
>>
>> On Tue, Sep 8, 2015 at 11:37 AM, channara rin <rin.channara@xxxxxxxxx>
>> wrote:
>>
>>> YES, i do this afew days already. it still has problem
>>> Could you help me
>>> If i log with browser with username and password. i can log in.
>>>
>>> OR i use DHIS2 version or tomcat version wrong?
>>>
>>> Here is my teamviewer:
>>> ID:804 884 570
>>> Password: 6659
>>>
>>>
>>> On Tue, Sep 8, 2015 at 1:24 AM, Jason Pickering <
>>> jason.p.pickering@xxxxxxxxx> wrote:
>>>
>>>> That payload, executed against the demo server, does not result in that
>>>> error.  Are you 100% sure your username and password are correct as the
>>>> error indicates clearly it is an authentication issue.
>>>>
>>>> We have been on this simple topic for days now.  Can you provide access
>>>> to your server toa development team member to diagnose what the problem or
>>>> problems are?
>>>>
>>>> Regards,
>>>> Jason
>>>>
>>>> On Mon, Sep 7, 2015, 17:20 channara rin <rin.channara@xxxxxxxxx> wrote:
>>>>
>>>>> Yes, i changed alredy to make very my json. now is valide.
>>>>> But it is still error using curl command. it always display this
>>>>> messge like below:
>>>>>
>>>>> [image: Inline image 1]
>>>>>
>>>>> On Mon, Sep 7, 2015 at 5:52 PM, Jason Pickering <
>>>>> jason.p.pickering@xxxxxxxxx> wrote:
>>>>>
>>>>>> Hi ,
>>>>>> This should work.
>>>>>>
>>>>>> {
>>>>>>     "trackedEntity": "PtPf474EHLM",
>>>>>>     "orgUnit": "NcA7HpabeAG",
>>>>>>     "attributes": [{
>>>>>>         "attribute": "jZbsh2zpVWa",
>>>>>>         "value": "0201"
>>>>>>     }, {
>>>>>>         "attribute": "j9sScvXsXVO",
>>>>>>         "value": "Name of Person"
>>>>>>     }, {
>>>>>>         "attribute": "szmBW8EDWLx",
>>>>>>         "value": "Male"
>>>>>>     }, {
>>>>>>         "attribute": "adZnoplDPyx",
>>>>>>         "value": "48"
>>>>>>     }, {
>>>>>>         "attribute": "j16LxVcr8hV",
>>>>>>         "value": "1967-08-31"
>>>>>>     }, {
>>>>>>         "attribute": "T82mY6tjGVY",
>>>>>>         "value": "Married"
>>>>>>     }, {
>>>>>>         "attribute": "pyX2F5mjX5L",
>>>>>>         "value": "Siem Reap"
>>>>>>     }, {
>>>>>>         "attribute": "CakCGhhkSJK",
>>>>>>         "value": "Siem Reap"
>>>>>>     }, {
>>>>>>         "attribute": "zAKBPz96mci",
>>>>>>         "value": "Siem Reap"
>>>>>>     }, {
>>>>>>         "attribute": "VstyNjHv8KM",
>>>>>>         "value": "%u1782%u17C4%u1780%u1785%u1780"
>>>>>>     }, {
>>>>>>         "attribute": "SmHt9k5t501",
>>>>>>         "value": "%u1782%u17C4%u1780%u1785%u1780"
>>>>>>     }, {
>>>>>>         "attribute": "CQqQwvsiZsg",
>>>>>>         "value":
>>>>>> "%u1797%u17BC%u1798%u17B7%A0%u178F%u17D2%u179A%u1796%u17B6%u17C6%u1784%u179F%u17C1%u17C7"
>>>>>>     }, {
>>>>>>         "attribute": "HVcRcWAW55I",
>>>>>>         "value": "ART"
>>>>>>     }, {
>>>>>>         "attribute": "RtAymQ0PT5p",
>>>>>>         "value": "410"
>>>>>>     }, {
>>>>>>         "attribute": "ZSEdw9AHbIC",
>>>>>>         "value": "1641"
>>>>>>     }, {
>>>>>>         "attribute": "JQtRizheDhD",
>>>>>>         "value": "2005-04-11"
>>>>>>     }]
>>>>>> }
>>>>>>
>>>>>> Also,you also had an extra comma after {
>>>>>>         "attribute": "JQtRizheDhD",
>>>>>>         "value": "2005-04-11"
>>>>>>     }
>>>>>>
>>>>>> Please use http://jsonlint.com/ to verfiy your JSON.
>>>>>>
>>>>>> Regards,
>>>>>> Jason
>>>>>>
>>>>>>
>>>>>> On Mon, Sep 7, 2015 at 12:49 PM, channara rin <rin.channara@xxxxxxxxx
>>>>>> > wrote:
>>>>>>
>>>>>>> it doesn't work.
>>>>>>>
>>>>>>> On Mon, Sep 7, 2015 at 5:48 PM, Bob Jolliffe <bobjolliffe@xxxxxxxxx>
>>>>>>> wrote:
>>>>>>>
>>>>>>>> Do not use BOM.  Just utf-8.
>>>>>>>>
>>>>>>>> On 7 September 2015 at 11:44, channara rin <rin.channara@xxxxxxxxx>
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>>> so which encoding should i choose? now default is "UTF-8-BOM"
>>>>>>>>>
>>>>>>>>> [image: Inline image 1]
>>>>>>>>>
>>>>>>>>> On Mon, Sep 7, 2015 at 5:42 PM, channara rin <
>>>>>>>>> rin.channara@xxxxxxxxx> wrote:
>>>>>>>>>
>>>>>>>>>> OH!, ok let me check character-set
>>>>>>>>>> Hi Morten, when i add -v. i got this message.
>>>>>>>>>> [image: Inline image 1]
>>>>>>>>>>
>>>>>>>>>> On Mon, Sep 7, 2015 at 5:39 PM, Jason Pickering <
>>>>>>>>>> jason.p.pickering@xxxxxxxxx> wrote:
>>>>>>>>>>
>>>>>>>>>>> Hi Channara,
>>>>>>>>>>>
>>>>>>>>>>> You must properly encode your Khmer characters. Maybe Morten can
>>>>>>>>>>> say more about this, but I am pretty sure it has something to do with this.
>>>>>>>>>>>
>>>>>>>>>>> Here is the actual text (not screenshot), which indicates an
>>>>>>>>>>> error related to some invalid characters.
>>>>>>>>>>>
>>>>>>>>>>> Regards,
>>>>>>>>>>> Jason
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> jason@jason-Precision-M2800:~/Downloads$ curl -d @1.json "
>>>>>>>>>>> https://apps.dhis2.org/demo/api/trackedEntityInstances"; -X POST
>>>>>>>>>>> -H "Content-Type: application/json" -u admin:district
>>>>>>>>>>> <html><head><title>Apache Tomcat/7.0.63 - Error
>>>>>>>>>>> report</title><style><!--H1
>>>>>>>>>>> {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;}
>>>>>>>>>>> H2
>>>>>>>>>>> {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;}
>>>>>>>>>>> H3
>>>>>>>>>>> {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;}
>>>>>>>>>>> BODY
>>>>>>>>>>> {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B
>>>>>>>>>>> {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;}
>>>>>>>>>>> P
>>>>>>>>>>> {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A
>>>>>>>>>>> {color : black;}A.name {color : black;}HR {color : #525D76;}--></style>
>>>>>>>>>>> </head><body><h1>HTTP Status 500 - Unexpected character ('' (code 65279 /
>>>>>>>>>>> 0xfeff)): expected a valid value (number, String, array, object, 'true',
>>>>>>>>>>> 'false' or 'null')</h1><HR size="1" noshade="noshade"><p><b>type</b>
>>>>>>>>>>> Exception report</p><p><b>message</b> <u>Unexpected character ('' (code
>>>>>>>>>>> 65279 / 0xfeff)): expected a valid value (number, String, array, object,
>>>>>>>>>>> 'true', 'false' or 'null')</u></p><p><b>description</b> <u>The server
>>>>>>>>>>> encountered an internal error that prevented it from fulfilling this
>>>>>>>>>>> request.</u></p><p><b>exception</b>
>>>>>>>>>>> <pre>com.fasterxml.jackson.core.JsonParseException: Unexpected character
>>>>>>>>>>> ('' (code 65279 / 0xfeff)): expected a valid value (number, String, array,
>>>>>>>>>>> object, 'true', 'false' or 'null')
>>>>>>>>>>>  at [Source:
>>>>>>>>>>> {&quot;trackedEntity&quot;:&quot;PtPf474EHLM&quot;,&quot;orgUnit&quot;:&quot;NcA7HpabeAG&quot;,&quot;attributes&quot;:[{&quot;attribute&quot;:&quot;jZbsh2zpVWa&quot;,&quot;value&quot;:&quot;0201&quot;},{&quot;attribute&quot;:&quot;j9sScvXsXVO&quot;,&quot;value&quot;:&quot;Name
>>>>>>>>>>> of
>>>>>>>>>>> Person&quot;},{&quot;attribute&quot;:&quot;szmBW8EDWLx&quot;,&quot;value&quot;:&quot;Male&quot;},{&quot;attribute&quot;:&quot;adZnoplDPyx&quot;,&quot;value&quot;:&quot;48&quot;},{&quot;attribute&quot;:&quot;j16LxVcr8hV&quot;,&quot;value&quot;:&quot;1967-08-31&quot;},{&quot;attribute&quot;:&quot;T82mY6tjGVY&quot;,&quot;value&quot;:&quot;Married&quot;},{&quot;attribute&quot;:&quot;pyX2F5mjX5L&quot;,&quot;value&quot;:&quot;Siem
>>>>>>>>>>> Reap&quot;},{&quot;attribute&quot;:&quot;CakCGhhkSJK&quot;,&quot;value&quot;:&quot;Siem
>>>>>>>>>>> Reap&quot;},{&quot;attribute&quot;:&quot;zAKBPz96mci&quot;,&quot;value&quot;:&quot;Siem
>>>>>>>>>>> Reap&quot;},{&quot;attribute&quot;:&quot;VstyNjHv8KM&quot;,&quot;value&quot;:&quot;គោកចក&quot;},{&quot;attribute&quot;:&quot;SmHt9k5t501&quot;,&quot;value&quot;:&quot;គោកចក&quot;},{&quot;attribute&quot;:&quot;CQqQwvsiZsg&quot;,&quot;value&quot;:&quot;ភូមិ
>>>>>>>>>>> ត្រពាំងសេះ&quot;},{&quot;attribute&quot;:&quot;HVcRcWAW55I&quot;,&quot;value&quot;:&quot;ART&quot;},{&quot;attribute&quot;:&quot;RtAymQ0PT5p&quot;,&quot;value&quot;:&quot;410&quot;},{&quot;attribute&quot;:&quot;ZSEdw9AHbIC&quot;,&quot;value&quot;:&quot;1641&quot;},{&quot;attribute&quot;:&quot;JQtRizheDhD&quot;,&quot;value&quot;:&quot;2005-04-11&quot;},]};
>>>>>>>>>>> line: 1, column: 2]
>>>>>>>>>>>
>>>>>>>>>>> com.fasterxml.jackson.core.JsonParser._constructError(JsonParser.java:1487)
>>>>>>>>>>>
>>>>>>>>>>> com.fasterxml.jackson.core.base.ParserMinimalBase._reportError(ParserMinimalBase.java:518)
>>>>>>>>>>>
>>>>>>>>>>> com.fasterxml.jackson.core.base.ParserMinimalBase._reportUnexpectedChar(ParserMinimalBase.java:447)
>>>>>>>>>>>
>>>>>>>>>>> com.fasterxml.jackson.core.json.ReaderBasedJsonParser._handleOddValue(ReaderBasedJsonParser.java:1461)
>>>>>>>>>>>
>>>>>>>>>>> com.fasterxml.jackson.core.json.ReaderBasedJsonParser.nextToken(ReaderBasedJsonParser.java:683)
>>>>>>>>>>>
>>>>>>>>>>> com.fasterxml.jackson.databind.ObjectMapper._initForReading(ObjectMapper.java:3602)
>>>>>>>>>>>
>>>>>>>>>>> com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:3547)
>>>>>>>>>>>
>>>>>>>>>>> com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2578)
>>>>>>>>>>>
>>>>>>>>>>> org.hisp.dhis.dxf2.events.trackedentity.JacksonTrackedEntityInstanceService.fromJson(JacksonTrackedEntityInstanceService.java:83)
>>>>>>>>>>>
>>>>>>>>>>> org.hisp.dhis.dxf2.events.trackedentity.JacksonTrackedEntityInstanceService.addTrackedEntityInstanceJson(JacksonTrackedEntityInstanceService.java:133)
>>>>>>>>>>> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>>>>>>>>
>>>>>>>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>>>>>>>>>>>
>>>>>>>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>>>>>>>>>> java.lang.reflect.Method.invoke(Method.java:497)
>>>>>>>>>>>
>>>>>>>>>>> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
>>>>>>>>>>>
>>>>>>>>>>> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
>>>>>>>>>>>
>>>>>>>>>>> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
>>>>>>>>>>>
>>>>>>>>>>> org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
>>>>>>>>>>>
>>>>>>>>>>> org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)
>>>>>>>>>>>
>>>>>>>>>>> org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
>>>>>>>>>>>
>>>>>>>>>>> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
>>>>>>>>>>>
>>>>>>>>>>> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
>>>>>>>>>>> com.sun.proxy.$Proxy177.addTrackedEntityInstanceJson(Unknown
>>>>>>>>>>> Source)
>>>>>>>>>>> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>>>>>>>>
>>>>>>>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>>>>>>>>>>>
>>>>>>>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>>>>>>>>>> java.lang.reflect.Method.invoke(Method.java:497)
>>>>>>>>>>>
>>>>>>>>>>> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
>>>>>>>>>>>
>>>>>>>>>>> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
>>>>>>>>>>>
>>>>>>>>>>> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
>>>>>>>>>>>
>>>>>>>>>>> org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:133)
>>>>>>>>>>>
>>>>>>>>>>> org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:121)
>>>>>>>>>>>
>>>>>>>>>>> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
>>>>>>>>>>>
>>>>>>>>>>> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
>>>>>>>>>>> com.sun.proxy.$Proxy127.addTrackedEntityInstanceJson(Unknown
>>>>>>>>>>> Source)
>>>>>>>>>>>
>>>>>>>>>>> org.hisp.dhis.webapi.controller.event.TrackedEntityInstanceController.postTrackedEntityInstanceJson(TrackedEntityInstanceController.java:357)
>>>>>>>>>>>
>>>>>>>>>>> org.hisp.dhis.webapi.controller.event.TrackedEntityInstanceController$$FastClassBySpringCGLIB$$cfbc2606.invoke(&lt;generated&gt;)
>>>>>>>>>>>
>>>>>>>>>>> org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
>>>>>>>>>>>
>>>>>>>>>>> org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:717)
>>>>>>>>>>>
>>>>>>>>>>> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
>>>>>>>>>>>
>>>>>>>>>>> org.springframework.security.access.intercept.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:64)
>>>>>>>>>>>
>>>>>>>>>>> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
>>>>>>>>>>>
>>>>>>>>>>> org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:653)
>>>>>>>>>>>
>>>>>>>>>>> org.hisp.dhis.webapi.controller.event.TrackedEntityInstanceController$$EnhancerBySpringCGLIB$$ab43fc35.postTrackedEntityInstanceJson(&lt;generated&gt;)
>>>>>>>>>>> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>>>>>>>>
>>>>>>>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>>>>>>>>>>>
>>>>>>>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>>>>>>>>>> java.lang.reflect.Method.invoke(Method.java:497)
>>>>>>>>>>>
>>>>>>>>>>> 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:650)
>>>>>>>>>>>
>>>>>>>>>>> org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:843)
>>>>>>>>>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
>>>>>>>>>>>
>>>>>>>>>>> org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
>>>>>>>>>>>
>>>>>>>>>>> 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:93)
>>>>>>>>>>>
>>>>>>>>>>> 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:64)
>>>>>>>>>>>
>>>>>>>>>>> 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:115)
>>>>>>>>>>>
>>>>>>>>>>> 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.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:50)
>>>>>>>>>>>
>>>>>>>>>>> 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)
>>>>>>>>>>> </pre></p><p><b>note</b> <u>The full stack trace of the root
>>>>>>>>>>> cause is available in the Apache Tomcat/7.0.63 logs.</u></p><HR size="1"
>>>>>>>>>>> noshade="noshade"><h3>Apache
>>>>>>>>>>> Tomcat/7.0.63</h3></body></html>jason@jason-Precision-M2800
>>>>>>>>>>> :~/Downloads$
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> On Mon, Sep 7, 2015 at 12:24 PM, channara rin <
>>>>>>>>>>> rin.channara@xxxxxxxxx> wrote:
>>>>>>>>>>>
>>>>>>>>>>>> hi morten,
>>>>>>>>>>>> if i coding with PHP use CURL command. i still get the
>>>>>>>>>>>> following error. and my json in attached file.
>>>>>>>>>>>> By the way, i use apache v8 and DHIS2 v2.20
>>>>>>>>>>>> [image: Inline image 1]
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> On Fri, Sep 4, 2015 at 3:58 PM, channara rin <
>>>>>>>>>>>> rin.channara@xxxxxxxxx> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>> If i tried use test with -u ... that is work fine. but if i
>>>>>>>>>>>>> add more function like -X POST -d -v.... it doesn't work....
>>>>>>>>>>>>>
>>>>>>>>>>>>> On Fri, Sep 4, 2015 at 3:55 PM, Bob Jolliffe <
>>>>>>>>>>>>> bobjolliffe@xxxxxxxxx> wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>>> Hi Channara
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> I just had a look at your original mail and I see that the
>>>>>>>>>>>>>> user admin was recognized so it means the curl option was ok but some issue
>>>>>>>>>>>>>> with the password.  My guess is that you have some strange characters in
>>>>>>>>>>>>>> the password which are being expanded/interpreted by the shell.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Try quoting like:
>>>>>>>>>>>>>> -u "admin:xxxxx"
>>>>>>>>>>>>>> or
>>>>>>>>>>>>>> -u 'admin:xxxxx'
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> On 4 September 2015 at 09:46, channara rin <
>>>>>>>>>>>>>> rin.channara@xxxxxxxxx> wrote:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Hi Morten,
>>>>>>>>>>>>>>> Hi tried test with user:password first. but still error.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> On Thu, Sep 3, 2015 at 11:43 PM, channara rin <
>>>>>>>>>>>>>>> rin.channara@xxxxxxxxx> wrote:
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> yes, it work too.
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> On Thu, Sep 3, 2015 at 6:45 PM, Morten Olav Hansen <
>>>>>>>>>>>>>>>> mortenoh@xxxxxxxxx> wrote:
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> Try to test with something simpler
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> curl -u user:pass http://server/api/dataElements
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> And see if it works
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>>>> Morten
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> On Thu, Sep 3, 2015 at 5:23 PM, Knut Staring <
>>>>>>>>>>>>>>>>> knutst@xxxxxxxxx> wrote:
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> Channara, are you using GOW?
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> https://github.com/bmatzelle/gow
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> On Thu, Sep 3, 2015 at 12:08 PM, Morten Olav Hansen <
>>>>>>>>>>>>>>>>>> mortenoh@xxxxxxxxx> wrote:
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>> I have also seen weird issues on window versions of cURL
>>>>>>>>>>>>>>>>>>> where -u user:pass is required to be FIRST (mac/linux should be fine)
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>>>>>> Morten
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>> On Thu, Sep 3, 2015 at 5:07 PM, Bob Jolliffe <
>>>>>>>>>>>>>>>>>>> bobjolliffe@xxxxxxxxx> wrote:
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>> Hi Channara
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>> The man page for curl indicates that the format of the
>>>>>>>>>>>>>>>>>>>> command is:
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>> curl <options> <url>
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>> Try moving your url to the end of the line, after the
>>>>>>>>>>>>>>>>>>>> options.  Also you might want to add "http://localhost.
>>>>>>>>>>>>>>>>>>>> .."
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>> On 3 September 2015 at 11:01, channara rin <
>>>>>>>>>>>>>>>>>>>> rin.channara@xxxxxxxxx> wrote:
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>> Hi DHIS2 friends,
>>>>>>>>>>>>>>>>>>>>> i tried use curl command to import tracker, but i got
>>>>>>>>>>>>>>>>>>>>> error.
>>>>>>>>>>>>>>>>>>>>> can you help me what is problem?
>>>>>>>>>>>>>>>>>>>>> ***THIS IS COMMAND RUNNING:
>>>>>>>>>>>>>>>>>>>>> [image: Inline image 1]
>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>> ***THIS IS CONSOLE in APACHE
>>>>>>>>>>>>>>>>>>>>> [image: Inline image 2]
>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>>>>>>>>>>> Mailing list: https://launchpad.net/~dhis2-devs
>>>>>>>>>>>>>>>>>>>>> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
>>>>>>>>>>>>>>>>>>>>> Unsubscribe : https://launchpad.net/~dhis2-devs
>>>>>>>>>>>>>>>>>>>>> More help   : https://help.launchpad.net/ListHelp
>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>>>>>>>>>> Mailing list: https://launchpad.net/~dhis2-devs
>>>>>>>>>>>>>>>>>>>> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
>>>>>>>>>>>>>>>>>>>> Unsubscribe : https://launchpad.net/~dhis2-devs
>>>>>>>>>>>>>>>>>>>> More help   : https://help.launchpad.net/ListHelp
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>>>>>>>>> Mailing list: https://launchpad.net/~dhis2-devs
>>>>>>>>>>>>>>>>>>> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
>>>>>>>>>>>>>>>>>>> Unsubscribe : https://launchpad.net/~dhis2-devs
>>>>>>>>>>>>>>>>>>> More help   : https://help.launchpad.net/ListHelp
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>>>>> Knut Staring
>>>>>>>>>>>>>>>>>> Dept. of Informatics, University of Oslo
>>>>>>>>>>>>>>>>>> Norway: +4791880522
>>>>>>>>>>>>>>>>>> Skype: knutstar
>>>>>>>>>>>>>>>>>> http://dhis2.org
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>>>>>>> Mailing list: https://launchpad.net/~dhis2-devs
>>>>>>>>>>>>>>>>> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
>>>>>>>>>>>>>>>>> Unsubscribe : https://launchpad.net/~dhis2-devs
>>>>>>>>>>>>>>>>> More help   : https://help.launchpad.net/ListHelp
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>>>>> Mailing list: https://launchpad.net/~dhis2-devs
>>>>>>>>>>>>>>> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
>>>>>>>>>>>>>>> Unsubscribe : https://launchpad.net/~dhis2-devs
>>>>>>>>>>>>>>> More help   : https://help.launchpad.net/ListHelp
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>> Mailing list: https://launchpad.net/~dhis2-devs
>>>>>>>>>>>> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
>>>>>>>>>>>> Unsubscribe : https://launchpad.net/~dhis2-devs
>>>>>>>>>>>> More help   : https://help.launchpad.net/ListHelp
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> --
>>>>>>>>>>> Jason P. Pickering
>>>>>>>>>>> email: jason.p.pickering@xxxxxxxxx
>>>>>>>>>>> tel:+46764147049
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Jason P. Pickering
>>>>>> email: jason.p.pickering@xxxxxxxxx
>>>>>> tel:+46764147049
>>>>>>
>>>>>
>>>>>
>>>
>>
>

PNG image

PNG image

PNG image

PNG image

PNG image

PNG image

PNG image

Attachment: 1.json
Description: application/json


References