← Back to team overview

dhis2-devs team mailing list archive

Re: [Bug 1249056] [NEW] Sending data values via WebAPI problem

 

I have generated the resource tables and that fixed the error shown in my
logs earlier. However despite running the curl command successfully  as
below, the data entry module in DHIS 2 does not update as expected:























*andrew@Billy-PC:~/apache-tomcat-7.0.42$ curl -d
@'/home/andrew/Desktop/DHIS Values Kenya/datavalueset.xml'
"http://localhost:8080/api/dataValueSets
<http://localhost:8080/api/dataValueSets>" -H
"Content-Type:application/xml" -u admin:district -v* About to connect() to
localhost port 8080 (#0)*   Trying 127.0.0.1... connected* Server auth
using Basic with user 'admin'> POST /api/dataValueSets HTTP/1.1>
Authorization: Basic YWRtaW46ZGlzdHJpY3Q=> User-Agent: curl/7.22.0
(x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4
<http://1.2.3.4> libidn/1.23 librtmp/2.3> Host: localhost:8080> Accept:
*/*> Content-Type:application/xml> Content-Length: 308> * upload completely
sent off: 308out of 308 bytes< HTTP/1.1 200 OK< Server: Apache-Coyote/1.1<
Set-Cookie: JSESSIONID=438B8560B006858BEBE6D01148A6FBBD; Path=/; HttpOnly<
Content-Type: application/xml;charset=UTF-8< Transfer-Encoding: chunked<
Date: Fri, 08 Nov 2013 06:58:06 GMT< * Connection #0 to host localhost left
intact* Closing connection #0<?xml version='1.0'
encoding='UTF-8'?><importSummary xmlns="http://dhis2.org/schema/dxf/2.0
<http://dhis2.org/schema/dxf/2.0>"><status>SUCCESS</status><description>Import
process completed successfully</description><dataValueCount imported="3"
updated="0"
ignored="0"/><dataSetComplete>2013-10-30</dataSetComplete></importSummary>andrandrew@Billy-PC:~/apache-tomcat-7.0.42$
*

Output in the Tomcat log (typically catalina.out) is shown below:


** INFO  2013-11-08 09:58:03,137 Login success for user: 'admin', ip:
'127.0.0.1' (DefaultUserAuditService.java [http-bio-8080-exec-4])* INFO
2013-11-08 09:58:05,750 importing data values
(DefaultDataValueSetService.java [http-bio-8080-exec-4])* INFO  2013-11-08
09:58:06,119 Data values set saved [data element id scheme: null, org unit
id scheme: null, dry run: false, strategy: null, skip check: false]
(DataValueSetController.java [http-bio-8080-exec-4])*


And this is the datavalueset.xml that I used:




*<dataValueSet xmlns="http://dhis2.org/schema/dxf/2.0
<http://dhis2.org/schema/dxf/2.0>" dataSet="oEfGJAQaARj"
completeDate="2013-10-30" period="201206" orgUnit="ckvRzmsUore">
<dataValue dataElement="tovFNTW5b9K" value="30"/>  <dataValue
dataElement="e09lZ1Fw97l" value="20"/>  <dataValue
dataElement="V6AhoeTTClY" value="10"/></dataValueSet>*

I will appreciate your help once more.





On Thu, Nov 7, 2013 at 11:59 PM, Bob Jolliffe <bobjolliffe@xxxxxxxxx> wrote:

> You'll find it under Maintenance->Data Administration
>
> Like here:
>
> http://apps.dhis2.org/demo/dhis-web-maintenance-dataadmin/displayResourceTableForm.action
>
>
> On 7 November 2013 20:13, Andrew Wanyama <awanyama2@xxxxxxxxx> wrote:
>
>> No, in fact that was my problem how do you go about generating the
>> non-existent resource tables?
>>
>>
>> On Thu, Nov 7, 2013 at 10:06 PM, Knut Staring <knutst@xxxxxxxxx> wrote:
>>
>>> Have you tried generating the resource tables?
>>>
>>> Sent from my mobile
>>> On Nov 7, 2013 7:50 PM, "Andrew Wanyama" <awanyama2@xxxxxxxxx> wrote:
>>>
>>>> Public bug reported:
>>>>
>>>> On ubuntu 12.04 using Tomcat servelet, cannot send data values as
>>>> described here:
>>>> http://www.dhis2.org/doc/snapshot/en/user/html/ch25s06.html though not
>>>> using the default sierra Leone demo database.
>>>> Tomcat log: Provide any output in the Tomcat log (typically
>>>> catalina.out) is shown below:
>>>>
>>>>
>>>> INFO: Server startup in 308538 ms
>>>> * INFO  2013-11-07 20:53:59,470 Login success for user: 'admin', ip:
>>>> '127.0.0.1' (DefaultUserAuditService.java [http-bio-8080-exec-28])
>>>> * ERROR 2013-11-07 20:56:11,931 Resource table
>>>> _dataelementcategoryoptioncomboname does not exist, please generate it
>>>> (HibernateDataElementStore.java [http-bio-8080-exec-25])
>>>> * INFO  2013-11-07 20:59:15,637 Login success for user: 'admin', ip:
>>>> '127.0.0.1' (DefaultUserAuditService.java [http-bio-8080-exec-26])
>>>> * INFO  2013-11-07 20:59:18,263 importing data values
>>>> (DefaultDataValueSetService.java [http-bio-8080-exec-26])
>>>> * INFO  2013-11-07 20:59:18,660 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-8080-exec-26])
>>>> * ERROR 2013-11-07 21:00:40,236 Resource table
>>>> _dataelementcategoryoptioncomboname does not exist, please generate it
>>>> (HibernateDataElementStore.java [http-bio-8080-exec-8])
>>>>
>>>> Thanks!
>>>>
>>>> ** Affects: dhis2
>>>>      Importance: Undecided
>>>>      Assignee: DHIS 2 developers (dhis2-devs)
>>>>          Status: New
>>>>
>>>> ** Changed in: dhis2
>>>>      Assignee: (unassigned) => DHIS 2 developers (dhis2-devs)
>>>>
>>>> --
>>>> You received this bug notification because you are a member of DHIS 2
>>>> developers, which is subscribed to DHIS.
>>>> https://bugs.launchpad.net/bugs/1249056
>>>>
>>>> Title:
>>>>   Sending data values via WebAPI problem
>>>>
>>>> Status in DHIS 2:
>>>>   New
>>>>
>>>> Bug description:
>>>>   On ubuntu 12.04 using Tomcat servelet, cannot send data values as
>>>> described here:
>>>> http://www.dhis2.org/doc/snapshot/en/user/html/ch25s06.html though not
>>>> using the default sierra Leone demo database.
>>>>   Tomcat log: Provide any output in the Tomcat log (typically
>>>> catalina.out) is shown below:
>>>>
>>>>
>>>>   INFO: Server startup in 308538 ms
>>>>   * INFO  2013-11-07 20:53:59,470 Login success for user: 'admin', ip:
>>>> '127.0.0.1' (DefaultUserAuditService.java [http-bio-8080-exec-28])
>>>>   * ERROR 2013-11-07 20:56:11,931 Resource table
>>>> _dataelementcategoryoptioncomboname does not exist, please generate it
>>>> (HibernateDataElementStore.java [http-bio-8080-exec-25])
>>>>   * INFO  2013-11-07 20:59:15,637 Login success for user: 'admin', ip:
>>>> '127.0.0.1' (DefaultUserAuditService.java [http-bio-8080-exec-26])
>>>>   * INFO  2013-11-07 20:59:18,263 importing data values
>>>> (DefaultDataValueSetService.java [http-bio-8080-exec-26])
>>>>   * INFO  2013-11-07 20:59:18,660 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-8080-exec-26])
>>>>   * ERROR 2013-11-07 21:00:40,236 Resource table
>>>> _dataelementcategoryoptioncomboname does not exist, please generate it
>>>> (HibernateDataElementStore.java [http-bio-8080-exec-8])
>>>>
>>>>   Thanks!
>>>>
>>>> To manage notifications about this bug go to:
>>>> https://bugs.launchpad.net/dhis2/+bug/1249056/+subscriptions
>>>>
>>>> _______________________________________________
>>>> 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
>>>>
>>>
>>
>>
>> --
>> Bsc.Computer Science,
>> University of Nairobi.
>> Contacts: +254 714 142 140
>>
>> _______________________________________________
>> 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
>>
>>
>


-- 
Bsc.Computer Science,
University of Nairobi.
Contacts: +254 714 142 140

References