Error setting up the OpenMRS SDK

Hi guys I’m trying to set up OpenMRS using the SDK version 3.8.1 and a platform setting. I’m using the current SNAPSHOT as well if that matters.

The sdk set up fails as it tries to import the initial database. This is the error message: ethan [2:37 PM] Failed to execute goal org.openmrs.maven.plugins:openmrs-sdk-maven-plugin:3.8.1:setup (default-cli) on project standalone-pom: Failed to setup server: Failed to reset search index: Table ‘openmrs.global_property’ doesn’t exist -> [Help 1]

Here’s a longer excerpt: Failed to setup server: Failed to reset search index: Table ‘openmrs.global_property’ doesn’t exist -> [Help 1]

[2:38]
Connected to the database.

Importing an initial database from classpath://openmrs-platform.sql… [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 08:49 min [INFO] Finished at: 2017-02-15T14:36:36+01:00 [INFO] Final Memory: 28M/290M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.openmrs.maven.plugins:openmrs-sdk-maven-plugin:3.8.1:setup (default-cli) on project standalone-pom: Failed to setup server: Failed to reset search index: Table ‘openmrs.global_property’ doesn’t exist -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

STEPS I TOOK

Installed Maven, Java, Mysql Install the Sdk with mvn org.openmrs.maven.plugins:openmrs-sdk-maven-plugin:setup-sdk (ran successfully) tried to create an instance with mvn openmrs-sdk:setup selected Platform and chose the SNAPSHOT version. selected mysql database and accepted the default connection string. Entered the user name and password and the connection to the database was successful It then tries to set up the database and fails with the above error.

Could you please list steps to reproduce the issue i.e. what answers you gave in the wizard?

thanks for answering. I’ve updated my topic with the steps I took.

@raff: I got same error while trying to setup OpenMRS-SDK.

  • Maven 3.3.9
  • Java 1.8
  • MySQL 5.7
  • OpenMRS-SDK 3.8.1
  • Windows 10

There should be the “Database imported successfully.” message after “Importing an initial database…” Apparently it fails to import the file and proceeds further trying to reset the index.

I wonder, if it is MySQL 5.7 causing the issue. Is there any chance you can downgrade to 5.6?

Another workaround is to call openmrs-sdk:setup -DdbSql=null it will create a db from scratch which is slightly slower, but should work…

I’ll add some additional logging with the next release of SDK (coming in an hour or so) to show why it fails for you…

Hello @hpardess, I had the same issue, it was solved when I used the option “docker” - instead of the MySQL db installed. That is, I needed docker installed, and installed the MySQL image of 5.6 (like @raff mentions) onto docker; and using this when setting it up with the SDK

@raff I had the same issue as @hpardess under the same conditions except with Windows 7 instead of 10, but callling openmrs-sdk:setup -DdbSql=null works for me.