Re: [Dhis2-users] Program metadata import

2017-01-24 Thread Morten Olav Hansen
Hm, the instance you are importing into, is it empty? what were the
parameter you used for the import?

Also, if possible, could you share the metadata with me privately

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

On Wed, Jan 25, 2017 at 2:40 PM, Marc Garnica 
wrote:

> It's still happening with the last build version (e17a37f). The program is
> a tracker program and the errors are the following:
>
>
> ** INFO  2017-01-25 07:14:17,785 (admin) Creating 23 object(s) of type
> ProgramStageDataElement (DefaultObjectBundleService.java [taskScheduler-8])*
> ** INFO  2017-01-25 07:14:17,785 [Level: INFO, category: METADATA_IMPORT,
> time: Wed Jan 25 07:14:17 UTC 2017, message: (admin) Creating 23 object(s)
> of type ProgramStageDataElement] (InMemoryNotifier.java [taskScheduler-8])*
> ** INFO  2017-01-25 07:14:18,063 (admin) Creating 3 object(s) of type
> ProgramStageSection (DefaultObjectBundleService.java [taskScheduler-8])*
> ** INFO  2017-01-25 07:14:18,063 [Level: INFO, category: METADATA_IMPORT,
> time: Wed Jan 25 07:14:18 UTC 2017, message: (admin) Creating 3 object(s)
> of type ProgramStageSection] (InMemoryNotifier.java [taskScheduler-8])*
> ** INFO  2017-01-25 07:14:18,177 (admin) Creating 1 object(s) of type
> Program (DefaultObjectBundleService.java [taskScheduler-8])*
> ** INFO  2017-01-25 07:14:18,177 [Level: INFO, category: METADATA_IMPORT,
> time: Wed Jan 25 07:14:18 UTC 2017, message: (admin) Creating 1 object(s)
> of type Program] (InMemoryNotifier.java [taskScheduler-8])*
> ** ERROR 2017-01-25 07:14:18,223 Unexpected error occurred in scheduled
> task. (TaskUtils.java [taskScheduler-8])*
> *org.hibernate.TransientObjectException: object references an unsaved
> transient instance - save the transient instance before flushing:
> org.hisp.dhis.user.UserGroup*
> *at
> org.hibernate.engine.internal.ForeignKeys.getEntityIdentifierIfNotUnsaved(ForeignKeys.java:279)*
> *at
> org.hibernate.type.EntityType.getIdentifier(EntityType.java:455)*
> *at
> org.hibernate.type.ManyToOneType.isDirty(ManyToOneType.java:281)*
> *at
> org.hibernate.type.ManyToOneType.isDirty(ManyToOneType.java:291)*
> *at org.hibernate.type.TypeHelper.findDirty(TypeHelper.java:296)*
> *at
> org.hibernate.persister.entity.AbstractEntityPersister.findDirty(AbstractEntityPersister.java:4126)*
> *at
> org.hibernate.event.internal.DefaultFlushEntityEventListener.dirtyCheck(DefaultFlushEntityEventListener.java:528)*
> *at
> org.hibernate.event.internal.DefaultFlushEntityEventListener.isUpdateNecessary(DefaultFlushEntityEventListener.java:215)*
> *at
> org.hibernate.event.internal.DefaultFlushEntityEventListener.onFlushEntity(DefaultFlushEntityEventListener.java:142)*
> *at
> org.hibernate.event.internal.AbstractFlushingEventListener.flushEntities(AbstractFlushingEventListener.java:216)*
> *at
> org.hibernate.event.internal.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:85)*
> *at
> org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:38)*
> *at
> org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1295)*
> *at
> org.hisp.dhis.dxf2.metadata.objectbundle.DefaultObjectBundleService.commit(DefaultObjectBundleService.java:158)*
> *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.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)*
> *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
> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208)*
> *at com.sun.proxy.$Proxy165.commit(Unknown Source)*
> *at
> org.hisp.dhis.dxf2.metadata.DefaultMetadataImportService.importMetadata(DefaultMetadataImportService.java:126)*
> *at 

Re: [Dhis2-users] Program metadata import

2017-01-24 Thread Marc Garnica
It's still happening with the last build version (e17a37f). The program is
a tracker program and the errors are the following:


** INFO  2017-01-25 07:14:17,785 (admin) Creating 23 object(s) of type
ProgramStageDataElement (DefaultObjectBundleService.java [taskScheduler-8])*
** INFO  2017-01-25 07:14:17,785 [Level: INFO, category: METADATA_IMPORT,
time: Wed Jan 25 07:14:17 UTC 2017, message: (admin) Creating 23 object(s)
of type ProgramStageDataElement] (InMemoryNotifier.java [taskScheduler-8])*
** INFO  2017-01-25 07:14:18,063 (admin) Creating 3 object(s) of type
ProgramStageSection (DefaultObjectBundleService.java [taskScheduler-8])*
** INFO  2017-01-25 07:14:18,063 [Level: INFO, category: METADATA_IMPORT,
time: Wed Jan 25 07:14:18 UTC 2017, message: (admin) Creating 3 object(s)
of type ProgramStageSection] (InMemoryNotifier.java [taskScheduler-8])*
** INFO  2017-01-25 07:14:18,177 (admin) Creating 1 object(s) of type
Program (DefaultObjectBundleService.java [taskScheduler-8])*
** INFO  2017-01-25 07:14:18,177 [Level: INFO, category: METADATA_IMPORT,
time: Wed Jan 25 07:14:18 UTC 2017, message: (admin) Creating 1 object(s)
of type Program] (InMemoryNotifier.java [taskScheduler-8])*
** ERROR 2017-01-25 07:14:18,223 Unexpected error occurred in scheduled
task. (TaskUtils.java [taskScheduler-8])*
*org.hibernate.TransientObjectException: object references an unsaved
transient instance - save the transient instance before flushing:
org.hisp.dhis.user.UserGroup*
*at
org.hibernate.engine.internal.ForeignKeys.getEntityIdentifierIfNotUnsaved(ForeignKeys.java:279)*
*at
org.hibernate.type.EntityType.getIdentifier(EntityType.java:455)*
*at
org.hibernate.type.ManyToOneType.isDirty(ManyToOneType.java:281)*
*at
org.hibernate.type.ManyToOneType.isDirty(ManyToOneType.java:291)*
*at org.hibernate.type.TypeHelper.findDirty(TypeHelper.java:296)*
*at
org.hibernate.persister.entity.AbstractEntityPersister.findDirty(AbstractEntityPersister.java:4126)*
*at
org.hibernate.event.internal.DefaultFlushEntityEventListener.dirtyCheck(DefaultFlushEntityEventListener.java:528)*
*at
org.hibernate.event.internal.DefaultFlushEntityEventListener.isUpdateNecessary(DefaultFlushEntityEventListener.java:215)*
*at
org.hibernate.event.internal.DefaultFlushEntityEventListener.onFlushEntity(DefaultFlushEntityEventListener.java:142)*
*at
org.hibernate.event.internal.AbstractFlushingEventListener.flushEntities(AbstractFlushingEventListener.java:216)*
*at
org.hibernate.event.internal.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:85)*
*at
org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:38)*
*at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1295)*
*at
org.hisp.dhis.dxf2.metadata.objectbundle.DefaultObjectBundleService.commit(DefaultObjectBundleService.java:158)*
*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.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)*
*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
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208)*
*at com.sun.proxy.$Proxy165.commit(Unknown Source)*
*at
org.hisp.dhis.dxf2.metadata.DefaultMetadataImportService.importMetadata(DefaultMetadataImportService.java:126)*
*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.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)*
*at

Re: [Dhis2-users] Program metadata import

2017-01-24 Thread Marc Garnica
We will update to the last build and let you know.

Thanks!

On 25 Jan 2017 2:00 a.m., "Morten Olav Hansen"  wrote:

> What version of DHIS2? also, are you on the latest? there have been many
> fixes related to this lately.
>
> --
> Morten Olav Hansen
> Senior Engineer, DHIS 2
> University of Oslo
> http://www.dhis2.org
>
> On Wed, Jan 25, 2017 at 12:37 AM, Lars Helge Øverland 
> wrote:
>
>> Hi Marc,
>>
>> can you please post the relevant part of the Tomcat log.
>>
>> Lars
>>
>>
>> On Tue, Jan 24, 2017 at 6:11 PM, Marc Garnica 
>> wrote:
>>
>>> Hi all
>>>
>>> We are trying to import a program metadata which was download through
>>> another DHIS2 instance with the Metadata Export with dependencies. Every
>>> time we try the import the user interface just get stuck in creating a
>>> program and the logs files have the following error:
>>>
>>> *object references an unsaved transient instance - save the transient
>>> instance before flushing*
>>>
>>>
>>> Any news on that?
>>>
>>> Thank you very much in advance,
>>>
>>> Marc
>>>
>>> ___
>>> Mailing list: https://launchpad.net/~dhis2-users
>>> Post to : dhis2-users@lists.launchpad.net
>>> Unsubscribe : https://launchpad.net/~dhis2-users
>>> More help   : https://help.launchpad.net/ListHelp
>>>
>>>
>>
>>
>> --
>> Lars Helge Øverland
>> Lead developer, DHIS 2
>> University of Oslo
>> Skype: larshelgeoverland
>> l...@dhis2.org
>> http://www.dhis2.org 
>>
>>
>> ___
>> Mailing list: https://launchpad.net/~dhis2-users
>> Post to : dhis2-users@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~dhis2-users
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>
___
Mailing list: https://launchpad.net/~dhis2-users
Post to : dhis2-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-users
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-users] Program metadata import

2017-01-24 Thread Morten Olav Hansen
What version of DHIS2? also, are you on the latest? there have been many
fixes related to this lately.

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

On Wed, Jan 25, 2017 at 12:37 AM, Lars Helge Øverland 
wrote:

> Hi Marc,
>
> can you please post the relevant part of the Tomcat log.
>
> Lars
>
>
> On Tue, Jan 24, 2017 at 6:11 PM, Marc Garnica 
> wrote:
>
>> Hi all
>>
>> We are trying to import a program metadata which was download through
>> another DHIS2 instance with the Metadata Export with dependencies. Every
>> time we try the import the user interface just get stuck in creating a
>> program and the logs files have the following error:
>>
>> *object references an unsaved transient instance - save the transient
>> instance before flushing*
>>
>>
>> Any news on that?
>>
>> Thank you very much in advance,
>>
>> Marc
>>
>> ___
>> Mailing list: https://launchpad.net/~dhis2-users
>> Post to : dhis2-users@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~dhis2-users
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>
>
> --
> Lars Helge Øverland
> Lead developer, DHIS 2
> University of Oslo
> Skype: larshelgeoverland
> l...@dhis2.org
> http://www.dhis2.org 
>
>
> ___
> Mailing list: https://launchpad.net/~dhis2-users
> Post to : dhis2-users@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-users
> More help   : https://help.launchpad.net/ListHelp
>
>
___
Mailing list: https://launchpad.net/~dhis2-users
Post to : dhis2-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-users
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-users] Program metadata import

2017-01-24 Thread Lars Helge Øverland
Hi Marc,

can you please post the relevant part of the Tomcat log.

Lars


On Tue, Jan 24, 2017 at 6:11 PM, Marc Garnica 
wrote:

> Hi all
>
> We are trying to import a program metadata which was download through
> another DHIS2 instance with the Metadata Export with dependencies. Every
> time we try the import the user interface just get stuck in creating a
> program and the logs files have the following error:
>
> *object references an unsaved transient instance - save the transient
> instance before flushing*
>
>
> Any news on that?
>
> Thank you very much in advance,
>
> Marc
>
> ___
> Mailing list: https://launchpad.net/~dhis2-users
> Post to : dhis2-users@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-users
> More help   : https://help.launchpad.net/ListHelp
>
>


-- 
Lars Helge Øverland
Lead developer, DHIS 2
University of Oslo
Skype: larshelgeoverland
l...@dhis2.org
http://www.dhis2.org 
___
Mailing list: https://launchpad.net/~dhis2-users
Post to : dhis2-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-users
More help   : https://help.launchpad.net/ListHelp


[Dhis2-users] Program metadata import

2017-01-24 Thread Marc Garnica
Hi all

We are trying to import a program metadata which was download through
another DHIS2 instance with the Metadata Export with dependencies. Every
time we try the import the user interface just get stuck in creating a
program and the logs files have the following error:

*object references an unsaved transient instance - save the transient
instance before flushing*


Any news on that?

Thank you very much in advance,

Marc
___
Mailing list: https://launchpad.net/~dhis2-users
Post to : dhis2-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-users
More help   : https://help.launchpad.net/ListHelp


[Dhis2-users] Unable to import CSV metadata through import-export app

2017-01-24 Thread Shurajit Dutta
Hi,

I am attempting to import a CSV metadata file (attached) in 2.25 build
2bac6dc through the import-export app. During the import, I receive the
following error message in the log:

SEVERE: Unable to determine string representation of value of type
[org.hisp.dhis.user.User]
org.hibernate.LazyInitializationException: failed to lazily initialize a
collection of role: org.hisp.dhis.user.User.groups, could not initialize
proxy - no Session

I have tried importing the CSV file with no changes in 2.24 and it goes
through with no problems.

For 2.25, I ended up getting around this by using an XML file instead but
am wondering what this error is?

Thanks,
Nick
name,uid,code,shortname,description,formname,domaintype,valuetype,aggregationoperator,categorycombo,url
Generalist (non-specialist) medical doctors,gdt1JG8fnBa,,Generalist (non-specialist) medical doctors,,,TRACKER,NUMBER,,,
Specialist medical doctors,hQpy0N3o1tS,,Specialist medical doctors,,,TRACKER,NUMBER,,,
Non-physician clinicians/ paramedical professionals,aYx5fIOULcs,,Non-physician clinician/paramedical professional,,,TRACKER,NUMBER,,,
Nursing professionals,EW84Xmc5ZM1,,Nursing professionals,,,TRACKER,NUMBER,,,
Midwifery professionals,kmRELUocB7A,,Midwifery professionals,,,TRACKER,NUMBER,,,
Pharmacists,Ym4xxYoniQV,,Pharmacists,,,TRACKER,NUMBER,,,
Laboratory technicians,ADVjtJk41id,,Laboratory technicians,,,TRACKER,NUMBER,,,
Community health workers,tMTvLFgSKcT,,Community health workers,,,TRACKER,NUMBER,,,
Administrative Staff,Tl6xFPf714T,,Administrative Staff,,,TRACKER,NUMBER,,,
General Staff,XZpsSTzi7Yv,,General Staff,,,TRACKER,NUMBER,,,
"Overnight/ inpatient beds, for adults and children",AWYQLsZfPAP,,Overnight/inpatient beds adults and children,,,TRACKER,NUMBER,,,
Dedicated maternity beds,UETWB0MLCwb,,Dedicated maternity beds,,,TRACKER,NUMBER,,,
Functional ambulance,m6YcaZEBsan,,Functional ambulance,,,TRACKER,BOOLEAN,,,
Access to email or internet,esVEHl5yiMj,,Access to email or internet,,,TRACKER,BOOLEAN,,,
Functioning computer,CGnwNpK8yGf,,Functioning computer,,,TRACKER,BOOLEAN,,,
Functioning cellular telephone or a private cellular phone,kVikM5ejzRy,,Functioning cellphone or a private cellphone,,,TRACKER,BOOLEAN,,,
Access to an ambulance or other vehicle for emergency transport stationed at another facility,RFVMXwNyAkI,,Acces ambulance other vehicle for emergency,,,TRACKER,BOOLEAN,,,
"Electricity from any source (e.g. electricity grid, generator, solar, or other)",AfXwLEypQQT,,Electricity from any source,,,TRACKER,BOOLEAN,,,
Grid electricity,QxEnaQvjQND,,Grid electricity,,,TRACKER,BOOLEAN,,,
Solar power functional,Wsm0xXls7Jz,,Solar power functional,,,TRACKER,BOOLEAN,,,
Functioning Generator,ieTkrACL0bj,,Functioning Generator,,,TRACKER,BOOLEAN,,,
Piped water,hySmDEGYJr2,,Piped water,,,TRACKER,BOOLEAN,,,
Well or borehole,PCKEes4W7tf,,Well or borehole,,,TRACKER,BOOLEAN,,,
Unprotected spring,kr9J1nHZnnp,,Unprotected spring,,,TRACKER,BOOLEAN,,,
Tanker truck,AsTA8wCLozs,,Tanker truck,,,TRACKER,BOOLEAN,,,
Water under 500m from facility,ECTHsMXu0ct,,Water under 500m from facility,,,TRACKER,BOOLEAN,,,
___
Mailing list: https://launchpad.net/~dhis2-users
Post to : dhis2-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-users
More help   : https://help.launchpad.net/ListHelp


[Dhis2-users] Fwd: mHealth4Afrika - WP3 Metadata import - URL to finalise population of dataElementsOptionSetMapping.csv

2017-01-24 Thread Jens Johan Kaasbøll

Dear all,

Do anyone know about these changes (below) to version 2.25?

Jens K




Dear Chipo and John,

NMMU are finishing the import of the meta data.

The first three files have been imported:

i)Org-units

ii)Optionset

iii)DataElements

Based on the demonstration in November it is now necessary to save 
DataElementsImport.csv again as dataElementsOptionSetMapping.csv, 
populate the Optionset Row, save and import.


In the previous version of DHIS2 I was able to go to /api/optionSets to 
access an xml file to populate the Option set row in dataElementImport.csv.


In v2.25 it appears that the URL has changed. Please confirm the URL to 
access the xml file to complete the population of the Optionset row for 
dataElementsOptionSetMapping.csv


Please also clarify when importing this file – is the object type – Data 
element or a different name?


Look forward to your feedback this afternoon if possible so this stage 
can be finalised.


Best wishes,

Miriam

___
Mailing list: https://launchpad.net/~dhis2-users
Post to : dhis2-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-users
More help   : https://help.launchpad.net/ListHelp


[Dhis2-users] Event importer

2017-01-24 Thread channara rin
Dear DHIS2 all,
any one successful using event importer function in DHIS2?
I try many time, but always this display error like below:
[image: Inline image 1]
Here is the sample csv file for import
[image: Inline image 2]

DHIS2 version 2.25
Build date:2017-01-16 06:37

thank you
channara
___
Mailing list: https://launchpad.net/~dhis2-users
Post to : dhis2-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-users
More help   : https://help.launchpad.net/ListHelp


[Dhis2-users] Organisational Unit Group Editing

2017-01-24 Thread Barnabas Akumba
Hello All,

I have a group set known as "Ownership". It has two (2) groups under it
(Public and Private). I can edit the "Private Group" but when I try to edit
the Public group so I can place some facilities under the group but it
gives me an error "Can not add a Model without id to a ModelCollection"

Has anyone encountered this issue with version 2.24? Any help will be
appreciated.

Regards



-- 

Barnabas AKUMBA
*Mobile:* +2348036195778
*Skype:* barnabas.akumba
___
Mailing list: https://launchpad.net/~dhis2-users
Post to : dhis2-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-users
More help   : https://help.launchpad.net/ListHelp