dhis2-users team mailing list archive
-
dhis2-users team
-
Mailing list archive
-
Message #03572
Re: [Dhis2-devs] DHIS2 Meta-Data and Data Import Issues
Morten,
Thank you! The in-memory db was the cause of one of my problems. So Issue 1
is resolved! :)
I still cannot log in using an imported user. I suspect is it for the
reason I mentioned in my original post i.e. importation of users was
disabled?
The other remaining problem is the importation of XML data. It is still
giving a "Failed to flush BatchHandler" error when I try to import the
data. I have attached the relevant section of the log file so that you
check and see if you can make anything of it.
Thanks alot Morten!
Edwin
On Wed, Dec 18, 2013 at 1:23 AM, Morten Olav Hansen <mortenoh@xxxxxxxxx>wrote:
> Hi,
>
> From what you are saying, it sounds like all these issues are caused by
> using an in-memory db.. Are you sure that you are connecting to a database,
> and that the user has the proper privileges?
>
> Try to look for dhis2 home references in the log.. it should be early in
> the startup
>
> --
> Morten
>
>
> On Wed, Dec 18, 2013 at 10:09 AM, Edwin Mulwa <eddiemu@xxxxxxxxx> wrote:
>
>> Hi,
>>
>> I have some major problems when I am trying to import meta-data and data
>> from one DHIS2 instance to another. These are as follows:
>>
>>
>> Issue 1:
>>
>> I have a DHIS2 installation running on a VMWare Virtual Machine. Using
>> the Meta-Data Export/Import features in DHIS2, I have imported data from
>> another DHIS2 instance running on a laptop into the VM "successfully".
>> "Successfully" in quotes because the log says it was imported successfully.
>> However, when I shut down the VM and start it again, all the imported data
>> is missing from the VM. That is, it is as if I did not import any data. In
>> the data import screen, Dry Run option is set to "No". I did take a
>> snapshot of the VM immediately after importation and reverted to the
>> snapshot after firing up the VM but nothing doing. Any ideas on why the
>> data is not persisting on the VM?
>>
>> Note: Nothing I am doing on the VM persists! For example, I looked at the
>> default user I have been using to access DHIS2 (admin:district) and added
>> all the roles to the user. These additions to the user account were not
>> reflected after restarting the VM.
>>
>> Important Note: I have noticed, by looking at the logs, that every time
>> the DHIS2 instance starts up, it is attempting to run alot of table
>> altering SQL commands, most of which are failing. I suspect that it is
>> these commands that are interfering with my data. If you would like to see
>> a copy of the log file, I will be happy to provide it.
>>
>>
>> Issue 2:
>>
>> After importing the data, I log out of DHIS2 and try logging in using a
>> different user whose info has been imported into the VM. This does not
>> work. This is BEFORE I even shut down the machine. When I log back in using
>> the default admin user, I can see the user accounts in the system.
>>
>> Note: I have seen from an old posting on the forum that importation of
>> users was disabled. I don't know if this is still the case and therefore
>> why I am having this problem?
>>
>> Issue 3:
>>
>> After importing meta-data, I immediately tried to import DATA from the
>> other instance. Data import fails with a message that it was unable to
>> clear the BatchHandler.
>>
>> Any help on the above issues will be appreciated.
>>
>> Edwin
>>
>>
>> _______________________________________________
>> 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
>>
>>
>
* INFO 2013-12-18 04:05:07,158 [data element id scheme: UID, org unit id scheme: UID, dry run: false, async: false, strategy: NEW_AND_UPDATES, skip check: false] (ImportDataValueAction.java [http-bio-8080-exec-4])
* INFO 2013-12-18 04:05:07,237 [Level: INFO, category: DATAVALUE_IMPORT, time: Wed Dec 18 04:05:07 PST 2013, message: Process started] (InMemoryNotifier.java [taskScheduler-1])
* INFO 2013-12-18 04:05:08,493 [Level: INFO, category: DATAVALUE_IMPORT, time: Wed Dec 18 04:05:08 PST 2013, message: Importing data values] (InMemoryNotifier.java [taskScheduler-1])
* INFO 2013-12-18 04:05:08,493 importing data values (DefaultDataValueSetService.java [taskScheduler-1])
* ERROR 2013-12-18 04:05:08,596 java.lang.RuntimeException: Failed to flush BatchHandler
at org.amplecode.quick.batchhandler.AbstractBatchHandler.flush(AbstractBatchHandler.java:311)
at org.hisp.dhis.dxf2.datavalueset.DefaultDataValueSetService.saveDataValueSet(DefaultDataValueSetService.java:447)
at org.hisp.dhis.dxf2.datavalueset.DefaultDataValueSetService.saveDataValueSet(DefaultDataValueSetService.java:205)
at org.hisp.dhis.importexport.action.util.ImportDataValueTask.run(ImportDataValueTask.java:86)
at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:53)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)
Caused by: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "datavalue_pkey"
Detail: Key (dataelementid, periodid, sourceid, categoryoptioncomboid)=(19243, 28829, 4788, 15) already exists.
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2103)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1836)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:512)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:374)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:302)
at org.amplecode.quick.batchhandler.AbstractBatchHandler.flush(AbstractBatchHandler.java:295)
... 12 more
(DefaultDataValueSetService.java [taskScheduler-1])
* INFO 2013-12-18 04:05:08,596 [Level: ERROR, category: DATAVALUE_IMPORT, time: Wed Dec 18 04:05:08 PST 2013, message: Process failed: Failed to flush BatchHandler] (InMemoryNotifier.java [taskScheduler-1])
Follow ups
References