[Dhis2-devs] error when run maintenance

2017-08-06 Thread channara rin
Dear all
when i run maintenance  form DHIS2, i got this problem. please help.

* INFO  2017-08-07 08:45:17,889 Period table generated
(DefaultResourceTableService.java [taskScheduler-1])
* INFO  2017-08-07 08:45:17,891 Create data element category option combo
SQL: CREATE TABLE _dataelementcategoryoptioncombo (dataelementid INTEGER
NOT NULL, dataelementuid VARCHAR(11) NOT NULL, categoryoptioncomboid
INTEGER NOT NULL, categoryoptioncombouid VARCHAR(11) NOT NULL)
(JdbcResourceTableStore.java [taskScheduler-1])
* INFO  2017-08-07 08:45:17,893 Insert data element category option combo
SQL: insert into _dataelementcategoryoptioncombo (dataelementid,
dataelementuid, categoryoptioncomboid, categoryoptioncombouid) select
de.dataelementid as dataelementid, de.uid as dataelementuid,
coc.categoryoptioncomboid as categoryoptioncomboid, coc.uid as
categoryoptioncombouid from dataelement de join categorycombos_optioncombos
cc on de.categorycomboid = cc.categorycomboid join categoryoptioncombo coc
on cc.categoryoptioncomboid = coc.categoryoptioncomboid
(JdbcResourceTableStore.java [taskScheduler-1])
* INFO  2017-08-07 08:45:17,903 Create data element category option combo
index SQL: CREATE INDEX dataelement_categoryoptioncombo ON
_dataelementcategoryoptioncombo (dataelementuid, categoryoptioncombouid)
(JdbcResourceTableStore.java [taskScheduler-1])
* INFO  2017-08-07 08:45:17,961 Data element category option combo table
generated (DefaultResourceTableService.java [taskScheduler-1])
* WARN  2017-08-07 08:50:37,801 SQL Error: 0, SQLState: 22003
(SqlExceptionHelper.java [http-nio-8080-exec-6])
* ERROR 2017-08-07 08:50:37,802 Bad value for type int : WITH_REGISTRATION
(SqlExceptionHelper.java [http-nio-8080-exec-6])
* ERROR 2017-08-07 08:50:37,842 Error while executing action
(ExceptionInterceptor.java [http-nio-8080-exec-6])
org.hibernate.exception.DataException: could not load an entity:
[org.hisp.dhis.program.Program#15176]
at
org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:135)
at
org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:49)
at
org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:124)
at org.hibernate.loader.Loader.loadEntity(Loader.java:2149)
at
org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:82)
at
org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:72)
at
org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:3939)
at
org.hibernate.event.internal.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:462)
at
org.hibernate.event.internal.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:431)
at
org.hibernate.event.internal.DefaultLoadEventListener.load(DefaultLoadEventListener.java:208)
at
org.hibernate.event.internal.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:264)
at
org.hibernate.event.internal.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:152)
at
org.hibernate.internal.SessionImpl.fireLoad(SessionImpl.java:1053)
at
org.hibernate.internal.SessionImpl.access$2000(SessionImpl.java:173)
at
org.hibernate.internal.SessionImpl$IdentifierLoadAccessImpl.load(SessionImpl.java:2449)
at org.hibernate.internal.SessionImpl.get(SessionImpl.java:949)
at
org.hisp.dhis.hibernate.HibernateGenericStore.getNoAcl(HibernateGenericStore.java:438)
at
org.hisp.dhis.common.DefaultIdentifiableObjectManager.getNoAcl(DefaultIdentifiableObjectManager.java:900)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
at
org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
at
org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)
at
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at

Re: [Dhis2-devs] CSV Event upload failed: "latitude" not a valid Double value

2017-08-06 Thread Morten Olav Hansen
Hi there

I'm not sure about this issue, but there have been some fixes to CSV import
lately, would you mind getting the latest 227 and retry? if it's still
present, could you write up a JIRA issue for? and we will have a look

jira.dhis2.org

-- 
Morten Olav Hansen
Senior Engineer, DHIS 2
University of Oslo
http://www.dhis2.org

On Fri, Aug 4, 2017 at 10:06 PM, Jesus Solano-Roman <
asol...@broadinstitute.org> wrote:

> *SECOND UPDATE*: Sorry to keep updating this but I cannot edit the
> original post.
>
> I realized that the header had to be removed and also that the last two
> columns should be left empty (storedBy, ProvidedElsewhere).
>
> I believe this has fixed the issue. *However, one last question*:
>
>
> Upload was successful for 8/9 entries the *DE F3ogKBuviRA is a coordinate
> data element*, and I've tried using two formats: "[-11.94,8.84]" and
> "-11.94,8.84". (not using quotation marks). These both fail on import. What
> is wrong with the format of my coordinates? The Documentation says:
>
> Coordinate: *A point coordinate specified as longitude/latitude in
> decimal degrees. All coordinate should be specified in the format "-19.23 ,
> 56.42" with a comma separating the longitude and latitude. (Since v2.21).*
>
> My system is
>
> Version:
> 2.27
> Build revision:
> b531614
>
>
>
> Thanks again and apologies for the constant updates.
>
>
>
> On Fri, Aug 4, 2017 at 3:41 PM, Jesus Solano-Roman <
> asol...@broadinstitute.org> wrote:
>
>> UPDATE: I noticed that the csv file I downloaded from DHIS2 with a sample
>> of the Event data does not contain quotations so I did the same on the
>> exported file from R
>>
>>  write.csv(data, file = "data.csv", row.names = F, fileEncoding =
>> 'UTF-8', quote = F)
>>
>>
>> But the upload still fails. Also If I upload manually using the import
>> function inside DHIS2, the dry run shows the following conflicts:
>>
>> event Data element not found or not accessible
>> tHF7qDZVeoT Data element not found or not accessible
>> and all elements are ignored.
>>
>>
>> Thanks again.
>>
>> On Fri, Aug 4, 2017 at 3:27 PM, Jesus Solano-Roman <
>> asol...@broadinstitute.org> wrote:
>>
>>> Hello all.
>>>
>>> I've constructed a csv file to bulk import Events to a local instance of
>>> DHIS2 as per guidelines from the documentation
>>> 
>>>  .
>>> My curl command to upload is the following:
>>>
>>> curl --data-binary @programKenemaTest.csv "http://localhost:8085/api/eve
>>> nts" -H "Content-Type:application/csv" -u admin:district -v
>>>
>>>
>>> however, when uploading from terminal I get the following error message:
>>>
>>> {"httpStatus":"Internal Server Error",
>>>
>>> "httpStatusCode":500,"status":"ERROR",
>>>
>>> "message":"*Can not construct instance of java.lang.Double from String
>>> value (\"latitude\"): not a valid Double value*\n
>>>
>>> at [Source: com.fasterxml.jackson.dataformat.csv.impl.UTF8Reader@4700501
>>> 2 <470%2005%20012>; line: 1, column: 88] (through reference chain:
>>> org.hisp.dhis.dxf2.events.event.csv.CsvEventDataValue[\"latitude\"])"}
>>>
>>> (Rest of response from server can be seen here: https://codeshare.io/5Qm
>>> LvJ)
>>>
>>> The value for latitude (and longitude) in this particular dataset is 0.
>>> I generated this dataset and the CSV file using R. The type of value for
>>> those two columns evaluates to "double", and I have exported the CSV using
>>> UTF-8 encoding:
>>>
>>> write.csv(data, file = "data.csv", row.names = F, fileEncoding = 'UTF-8')
>>>
>>>
>>> Any ideas why this file cannot be parsed correctly? Entries created
>>> inside DHIS2 using the Event Capture app have latitude and longitude values
>>> of 0 without a problem. I've attached the csv file if it's of any help.
>>>
>>>
>>> Thanks for your time,
>>>
>>>
>>> Antonio Solano.
>>>
>>
>>
>
> ___
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to : dhis2-devs@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
>
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-devs] [Dhis2-users] Error running Analytics

2017-08-06 Thread Morten Olav Hansen
Hi

I'm not sure how well analytics currently works on H2. Would you mind
writing a JIRA issue for? jira.dhis2.org

-- 
Morten Olav Hansen
Senior Engineer, DHIS 2
University of Oslo
http://www.dhis2.org

On Thu, Aug 3, 2017 at 8:42 PM, ThankGod Anazodo 
wrote:

> Dear all,
> I got this error while trying to run analytics:
>
> Process failed: StatementCallback; bad SQL grammar [create table
> _orgunitstructure_temp (organisationunitid integer not null primary key,
> organisationunituid character(11), level integer, "idlevel1" integer,
> "uidlevel1" character(11), "idlevel2" integer, "uidlevel2" character(11),
> "idlevel3" integer, "uidlevel3" character(11), "idlevel4" integer,
> "uidlevel4" character(11));]; nested exception is
> org.h2.jdbc.JdbcSQLException: Table "_ORGUNITSTRUCTURE_TEMP" already
> exists; SQL statement: create table _orgunitstructure_temp
> (organisationunitid integer not null primary key, organisationunituid
> character(11), level integer, "idlevel1" integer, "uidlevel1"
> character(11), "idlevel2" integer, "uidlevel2" character(11), "idlevel3"
> integer, "uidlevel3" character(11), "idlevel4" integer, "uidlevel4"
> character(11)); [42101-194]
>
> I am running version 2.27, any help please.
>
>
> Thanks.
> ThankGod
>
> ___
> Mailing list: https://launchpad.net/~dhis2-users
> Post to : dhis2-us...@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-users
> More help   : https://help.launchpad.net/ListHelp
>
>
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-devs] async metadata import in 2.27

2017-08-06 Thread Morten Olav Hansen
Hi

It should work like that. Would you mind writing a JIRA issue?
jira.dhis2.org

-- 
Morten Olav Hansen
Senior Engineer, DHIS 2
University of Oslo
http://www.dhis2.org

On Thu, Aug 3, 2017 at 12:03 PM, Vladimer Shioshvili 
wrote:

> Hi everyone,
>
> I am trying to import xml metadata (org units) into 2.27, and async=true
> query parameter does not seem to make a difference - and it still goes in
> synchronously. It is in the documentation for 2.27 (and 2.26 and 2.25 -
> https://docs.dhis2.org/2.26/en/developer/html/dhis2_
> developer_manual_full.html#webapi_metadata_import), and I am using api
> version 26. Is it something i am doing wrong?
>
> This is the curl command i am using:
>
> curl -X POST 'https://domain/api/26/metadata?atomicMode=NONE=true'
> --data-binary @file.xml -H 'Content-Type:application/xml'
>
>
> Thanks!
>
> Vlad
>
> ___
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to : dhis2-devs@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
>
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp