# Importing Metadata using metadata sharing module, CIEL Database

**URL:** <https://talk.openmrs.org/t/importing-metadata-using-metadata-sharing-module-ciel-database/6253>\
**Category:** Ask OpenMRS\
**Tags:** dataintegrity, module, metadata-sharing, import\
**Created:** [May 11, 2016, 6:41am UTC](https://talk.openmrs.org/t/importing-metadata-using-metadata-sharing-module-ciel-database/6253 "2016-05-11T06:41:04Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![yadamz](https://talk.openmrs.org/letter_avatar/yadamz/32/5_5575768a8748004e209b776fc1b2916d.png) [@yadamz](https://talk.openmrs.org/u/yadamz)\
**Post date:** [May 11, 2016, 6:41am UTC](https://talk.openmrs.org/t/importing-metadata-using-metadata-sharing-module-ciel-database/6253/1 "2016-05-11T06:41:05Z")

</div>

Hi all, In our project we have developed our concepts (1000s of them), then we decided to import the CIEL database. The CIEL database from dropbox will replace all concepts tables that we have. So we decided to export our concepts first using metadata sharing module, then import the CIEL concepts to our MYSQL. after that we imported our concepts back again using the metadata sharing module. Unfortunately, we have encountered the following error

[http://pastebin.com/EK0XDwAA](http://pastebin.com/EK0XDwAA)

I appreciate any advice in terms of how to solve the current issue on hand. I realized that many of the CIEL concepts have the same ID of the concepts that we developed. I am not sure how is it possible to keep all concepts and change the ID of the CIEL ones.

Thanks

---

<div class="post-metadata">

**Author:** ![dkayiwa](https://talk.openmrs.org/user_avatar/talk.openmrs.org/dkayiwa/32/179_2.png) [@dkayiwa](https://talk.openmrs.org/u/dkayiwa)\
**Post date:** [May 11, 2016, 6:49am UTC](https://talk.openmrs.org/t/importing-metadata-using-metadata-sharing-module-ciel-database/6253/2 "2016-05-11T06:49:32Z")

</div>

Which version of the module are you using?

---

<div class="post-metadata">

**Author:** ![yadamz](https://talk.openmrs.org/letter_avatar/yadamz/32/5_5575768a8748004e209b776fc1b2916d.png) [@yadamz](https://talk.openmrs.org/u/yadamz)\
**Post date:** [May 11, 2016, 7:49am UTC](https://talk.openmrs.org/t/importing-metadata-using-metadata-sharing-module-ciel-database/6253/3 "2016-05-11T07:49:20Z")

</div>

You are amazingly fast to reply @dkayiwa thanks very much for that. It is metadata sharing 1.1.10

---

<div class="post-metadata">

**Author:** ![dkayiwa](https://talk.openmrs.org/user_avatar/talk.openmrs.org/dkayiwa/32/179_2.png) [@dkayiwa](https://talk.openmrs.org/u/dkayiwa)\
**Post date:** [May 11, 2016, 9:18am UTC](https://talk.openmrs.org/t/importing-metadata-using-metadata-sharing-module-ciel-database/6253/4 "2016-05-11T09:18:47Z")

</div>

Use version 1.2

---

<div class="post-metadata">

**Author:** ![darius](https://talk.openmrs.org/user_avatar/talk.openmrs.org/darius/32/8082_2.png) [@darius](https://talk.openmrs.org/u/darius)\
**Post date:** [May 11, 2016, 12:57pm UTC](https://talk.openmrs.org/t/importing-metadata-using-metadata-sharing-module-ciel-database/6253/5 "2016-05-11T12:57:19Z")

</div>

Just to check, you’re not doing this against a database with observations in it, are you? It is _not okay_ to replace your legacy concept dictionary with CIEL, if you have existing obs, because it will change their meaning.

---

<div class="post-metadata">

**Author:** ![yadamz](https://talk.openmrs.org/letter_avatar/yadamz/32/5_5575768a8748004e209b776fc1b2916d.png) [@yadamz](https://talk.openmrs.org/u/yadamz)\
**Post date:** [May 11, 2016, 7:06pm UTC](https://talk.openmrs.org/t/importing-metadata-using-metadata-sharing-module-ciel-database/6253/6 "2016-05-11T19:06:50Z")

</div>

I have only one test patient with one vitals obs … I am I in trouble @darius

---

<div class="post-metadata">

**Author:** ![yadamz](https://talk.openmrs.org/letter_avatar/yadamz/32/5_5575768a8748004e209b776fc1b2916d.png) [@yadamz](https://talk.openmrs.org/u/yadamz)\
**Post date:** [May 13, 2016, 5:06am UTC](https://talk.openmrs.org/t/importing-metadata-using-metadata-sharing-module-ciel-database/6253/7 "2016-05-13T05:06:20Z")

</div>

You are right @dkayiwa . I replaced the current version with 1.2 and I dont see the error anymore. This is great. However, while I am finishing the import, I was stuck on page 5. I reviewed all assessment and tried to click “load next part” but it does not seem to work.

Any suggestions @dkayiwa and @darius

thanks again

---

<div class="post-metadata">

**Author:** ![dkayiwa](https://talk.openmrs.org/user_avatar/talk.openmrs.org/dkayiwa/32/179_2.png) [@dkayiwa](https://talk.openmrs.org/u/dkayiwa)\
**Post date:** [May 13, 2016, 5:24am UTC](https://talk.openmrs.org/t/importing-metadata-using-metadata-sharing-module-ciel-database/6253/8 "2016-05-13T05:24:52Z")

</div>

You need to share the logs to see what is going on.

---

<div class="post-metadata">

**Author:** ![yadamz](https://talk.openmrs.org/letter_avatar/yadamz/32/5_5575768a8748004e209b776fc1b2916d.png) [@yadamz](https://talk.openmrs.org/u/yadamz)\
**Post date:** [May 13, 2016, 6:18am UTC](https://talk.openmrs.org/t/importing-metadata-using-metadata-sharing-module-ciel-database/6253/9 "2016-05-13T06:18:27Z")

</div>

here you go openmrs logs [http://pastebin.com/frkEagfR](http://pastebin.com/frkEagfR)

when i clicked on part 1 … I got this error

[http://pastebin.com/RvvCymTz](http://pastebin.com/RvvCymTz) Thanks again @dkayiwa

---

<div class="post-metadata">

**Author:** ![yadamz](https://talk.openmrs.org/letter_avatar/yadamz/32/5_5575768a8748004e209b776fc1b2916d.png) [@yadamz](https://talk.openmrs.org/u/yadamz)\
**Post date:** [May 13, 2016, 1:48pm UTC](https://talk.openmrs.org/t/importing-metadata-using-metadata-sharing-module-ciel-database/6253/10 "2016-05-13T13:48:14Z")

</div>

@dkayiwa is there any thing I can do ?

---

<div class="post-metadata">

**Author:** ![dkayiwa](https://talk.openmrs.org/user_avatar/talk.openmrs.org/dkayiwa/32/179_2.png) [@dkayiwa](https://talk.openmrs.org/u/dkayiwa)\
**Post date:** [May 13, 2016, 1:59pm UTC](https://talk.openmrs.org/t/importing-metadata-using-metadata-sharing-module-ciel-database/6253/11 "2016-05-13T13:59:53Z")

</div>

You need to provide what is in the tomcat log files.

---

<div class="post-metadata">

**Author:** ![yadamz](https://talk.openmrs.org/letter_avatar/yadamz/32/5_5575768a8748004e209b776fc1b2916d.png) [@yadamz](https://talk.openmrs.org/u/yadamz)\
**Post date:** [May 13, 2016, 7:44pm UTC](https://talk.openmrs.org/t/importing-metadata-using-metadata-sharing-module-ciel-database/6253/12 "2016-05-13T19:44:16Z")

</div>

Here you go @dkayiwafirst one: [http://pastebin.com/HwikC6B6](http://pastebin.com/HwikC6B6)

second one:

[http://pastebin.com/xJeWzFsn](http://pastebin.com/xJeWzFsn)

Thanks again

---

<div class="post-metadata">

**Author:** ![dkayiwa](https://talk.openmrs.org/user_avatar/talk.openmrs.org/dkayiwa/32/179_2.png) [@dkayiwa](https://talk.openmrs.org/u/dkayiwa)\
**Post date:** [May 14, 2016, 12:31am UTC](https://talk.openmrs.org/t/importing-metadata-using-metadata-sharing-module-ciel-database/6253/13 "2016-05-14T00:31:31Z")

</div>

@yadamz try set the correct values for these global properties or settings: scheduler.username & scheduler.password After saving, repeat the whole importation process.

---

<div class="post-metadata">

**Author:** ![yadamz](https://talk.openmrs.org/letter_avatar/yadamz/32/5_5575768a8748004e209b776fc1b2916d.png) [@yadamz](https://talk.openmrs.org/u/yadamz)\
**Post date:** [May 14, 2016, 6:55am UTC](https://talk.openmrs.org/t/importing-metadata-using-metadata-sharing-module-ciel-database/6253/14 "2016-05-14T06:55:00Z")

</div>

@dkayiwa I tried it again however it didnt work. same result

However, what I did is trying to import smaller number of concepts (five instead of 1000s) . it worked fine. I imported the concepts successfully. is there a limit of how many concepts I can import?

---

<div class="post-metadata">

**Author:** ![yadamz](https://talk.openmrs.org/letter_avatar/yadamz/32/5_5575768a8748004e209b776fc1b2916d.png) [@yadamz](https://talk.openmrs.org/u/yadamz)\
**Post date:** [May 14, 2016, 7:31pm UTC](https://talk.openmrs.org/t/importing-metadata-using-metadata-sharing-module-ciel-database/6253/15 "2016-05-14T19:31:45Z")

</div>

@dkayiwa I tried 300 concepts and I ended up with this error

Task details

Failed (errors: 1)

Sun May 15 12:13:56 PDT 2016 - Saving import state Sun May 15 12:13:56 PDT 2016 - Importing subpackage 1 of 1 Sun May 15 12:13:56 PDT 2016 - Resolving related items Sun May 15 12:14:06 PDT 2016 - Adjusting import settings Sun May 15 12:14:06 PDT 2016 - Loading existing items Sun May 15 12:14:07 PDT 2016 - Converting items Sun May 15 12:14:07 PDT 2016 - Setting audit fields Sun May 15 12:14:08 PDT 2016 - Merging items Sun May 15 12:14:08 PDT 2016 - Preparing items to save Sun May 15 12:14:08 PDT 2016 - Validating items Sun May 15 12:20:44 PDT 2016 - Saving items Sun May 15 12:28:49 PDT 2016 - Updating mappings Sun May 15 12:28:54 PDT 2016 - Import completed Sun May 15 12:28:56 PDT 2016 - Task failed

org.openmrs.module.metadatasharing.task.TaskException: Task failed at org.openmrs.module.metadatasharing.task.Task.log(Task.java:125) at org.openmrs.module.metadatasharing.task.TaskEngine$RunnableTask.run(TaskEngine.java:127) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: org.openmrs.module.metadatasharing.task.TaskException: Task failed … 4 more Caused by: org.springframework.transaction.UnexpectedRollbackException: Transaction rolled back because it has been marked as rollback-only at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:718) at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:475) at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:270) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:94) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at com.sun.proxy.$Proxy254.executeTask(Unknown Source) at org.openmrs.module.metadatasharing.task.TaskEngine$RunnableTask.run(TaskEngine.java:124) … 3 more

---

<div class="post-metadata">

**Author:** ![ningosi](https://talk.openmrs.org/user_avatar/talk.openmrs.org/ningosi/32/8060_2.png) [@ningosi](https://talk.openmrs.org/u/ningosi)\
**Post date:** [September 21, 2016, 11:41am UTC](https://talk.openmrs.org/t/importing-metadata-using-metadata-sharing-module-ciel-database/6253/16 "2016-09-21T11:41:04Z")

</div>

Did you get a solution to your last issue? am having similar problem when importing a MDS with containing concepts

---

<div class="post-metadata">

**Author:** ![ssmusoke](https://talk.openmrs.org/user_avatar/talk.openmrs.org/ssmusoke/32/8020_2.png) [@ssmusoke](https://talk.openmrs.org/u/ssmusoke)\
**Post date:** [September 21, 2016, 12:33pm UTC](https://talk.openmrs.org/t/importing-metadata-using-metadata-sharing-module-ciel-database/6253/17 "2016-09-21T12:33:24Z")

</div>

@ningosi Can you add org.openmrs.module.metadatasharing:debug to the Log global property so that you can see what is actually causing the errors

---

<div class="post-metadata">

**Author:** ![akanter](https://talk.openmrs.org/user_avatar/talk.openmrs.org/akanter/32/331_2.png) [@akanter](https://talk.openmrs.org/u/akanter)\
**Post date:** [September 21, 2016, 5:29pm UTC](https://talk.openmrs.org/t/importing-metadata-using-metadata-sharing-module-ciel-database/6253/18 "2016-09-21T17:29:08Z")

</div>

FYI, there are some outstanding issues with a few concepts which fail validation. I presume this is not an interacting issue.

---

<div class="post-metadata">

**Author:** ![ningosi](https://talk.openmrs.org/user_avatar/talk.openmrs.org/ningosi/32/8060_2.png) [@ningosi](https://talk.openmrs.org/u/ningosi)\
**Post date:** [September 28, 2016, 10:22am UTC](https://talk.openmrs.org/t/importing-metadata-using-metadata-sharing-module-ciel-database/6253/19 "2016-09-28T10:22:02Z")

</div>

I tried that, I never got something relevant that could lead me to the error that is causing the problem.
