Unable to update data model using liquibase.xml. Module: Metadata Mapping Current problem is on Reference Application Also:Updated

**Application Name:**StandAlone openmrs 2.5 **Version Number:**2.5 Question: I am trying to install Metadata Mapping Module.It shows the the following error.How do I resolve this error. “Unable to update data model using liquibase.xml. Module: Metadata Mapping”

Can you paste the contents of the log folder at pastebin.com? Also is there any reason why you did not use the latest release (version 2.6)?

I will add that tomorrow from my working office computer.

I am trying to install the metadata sharing which requires the metadatamapping.While installing I got this error on my reference application openmrs2.0.5.Here is the pastebin. https://pastebin.com/AMG6N7K4

Based on the line below in the log you posted it looks like liquibase is trying to create an already existing index on the database. Is there any chance you messed up with the database before the installation? In any case you could try to start with a fresh standalone instance.

Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Duplicate key name 'metadatamapping_idx_mdtm_mdclass'.

You means I try to install it again?

No, I mean start with a fresh installation of the standalone instance. You are using a standalone server, right?

Sorry this post was about standalone initially but right now I am working on reference application.What I do in case of reference application?

Are you still having this exact same issue? It would be great if you could post a fresh log output because it is possible you are not having the same problem as before. Better yet you should have created a separate thread for the new issue.

Actually I was installing the metadata sharing module to import the concept dictionary.For doing that I need to install the pre-requesite metadata mapping while doing installation I run in to this problem.I checked it several time,I am gettting the same issue.

Have you installed metadata mapping module before on that server? Also what version of metadata module are you trying to install? And what version of reference application are you running?

I am using reference application 2.0.5.(OpenMRS Version 2.0.5 Build 9f9213) I am trying to install the metadata mapping module 1.3.4 which is compatabile with my reference application according to module repository website. I am unable to install the metadata module because it require the mapping module first.

org.openmrs.module.ModuleException: Unable to update data model using liquibase.xml. Module: Metadata Mapping at org.openmrs.module.ModuleFactory.runLiquibase(ModuleFactory.java:1034) at org.openmrs.module.ModuleFactory.startModuleInternal(ModuleFactory.java:728) at org.openmrs.api.context.Daemon$1.run(Daemon.java:74) Caused by: liquibase.exception.MigrationFailedException: Migration failed for change set liquibase.xml::metadatamapping-2016-02-07-1310-b-mysql::kosmik: Reason: liquibase.exception.DatabaseException: Error executing SQL create index metadatamapping_idx_mdtm_mdclass on metadatamapping_metadata_term_mapping(metadata_class(255)): Duplicate key name ‘metadatamapping_idx_mdtm_mdclass’: Caused By: Error executing SQL create index metadatamapping_idx_mdtm_mdclass on metadatamapping_metadata_term_mapping(metadata_class(255)): Duplicate key name ‘metadatamapping_idx_mdtm_mdclass’: Caused By: Duplicate key name ‘metadatamapping_idx_mdtm_mdclass’ at liquibase.changelog.ChangeSet.execute(ChangeSet.java:347) at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:27) at org.openmrs.util.DatabaseUpdater$1OpenmrsUpdateVisitor.visit(DatabaseUpdater.java:189) at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:58) at org.openmrs.util.DatabaseUpdater.executeChangelog(DatabaseUpdater.java:218) at org.openmrs.module.ModuleFactory.runLiquibase(ModuleFactory.java:1024) … 2 more Caused by: liquibase.exception.DatabaseException: Error executing SQL create index metadatamapping_idx_mdtm_mdclass on metadatamapping_metadata_term_mapping(metadata_class(255)): Duplicate key name ‘metadatamapping_idx_mdtm_mdclass’ at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:62) at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:104) at liquibase.database.AbstractDatabase.execute(AbstractDatabase.java:1091) at liquibase.database.AbstractDatabase.executeStatements(AbstractDatabase.java:1075) at liquibase.changelog.ChangeSet.execute(ChangeSet.java:317) … 7 more Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Duplicate key name ‘metadatamapping_idx_mdtm_mdclass’ at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at com.mysql.jdbc.Util.handleNewInstance(Util.java:411) at com.mysql.jdbc.Util.getInstance(Util.java:386) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1054) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4237) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4169) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2617) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2778) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2819) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2768) at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:949) at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:795) at liquibase.executor.jvm.JdbcExecutor$1ExecuteStatementCallback.doInStatement(JdbcExecutor.java:92) at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:55) … 11 more INFO - LoggingAdvice.invoke(115) |2018-03-24 01:11:10,209| In method AlertService.saveAlert. Arguments: Alert=Alert: #null, INFO - LoggingAdvice.invoke(155) |2018-03-24 01:11:10,220| Exiting method saveAlert

I try again and got the same error.I posted the latest log related to metadatamapping

Can you verify that you haven’t attempted to install the metadata mapping module before? If you check your module administration page do you see metadata module installed? You reach there by going to Openmrs home page then click System Administration -> Advanced Administration -> Manage Modules

No,I don’t have any module there of name metadata mapping.

I posted the complete log here please look at it. https://pastebin.com/wr4U3vb6

Are you on irc? When answering that question, can you access your mysql instance hosting the openmrs database?

Yes,I am running it on my laptop.I have access,I am getting online on IRC

I logged at IRC with the username naveed1228.Can you please ping me there.