Build Failure Of A Distribution Type Server

Hi!!! Am Samuel, I’m relatively new to OpenMRS and I have just started off with the OpenMRS-SDK… But I’m consistently getting a BUILD FAILURE whenever I try making a distribution type server. Could the problem be with the MySQL data setup OR??

What command are you running, and what error are you getting?

Hey! @ssmusoke, the command I use is given below:) mvn openmrs-sdk:setup -DserverId=distro-2-3-1 -Ddistro=referenceapplication:2.3.1 -DdbUri=jdbc:mysql://localhost:3306/distro-2-3-1 -DdbUser=root -DdbPassword=Root123 -DjavaHome=“C:\Program Files\Java\jdk1.7.0_51” And I receive the following error: [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 29.723 s [INFO] Finished at: 2017-04-27T11:33:25+03:00 [INFO] Final Memory: 20M/225M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.openmrs.maven.plugins:openmrs-sdk-maven-plugi n:3.9.0:setup (default-cli) on project standalone-pom: Failed to setup server: F ailed to connect to the specified database jdbc:mysql://localhost:3306/distro-2- 3-1?autoReconnect=true&sessionVariables=storage_engine%3DInnoDB&useUnicode=true& characterEncoding=UTF-8 -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit ch. [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 rea d the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionE xception

C:\Users\SAM>

What do you get when you run this command

mvn openmrs-sdk:setup -Ddistro=referenceapplication:2.3.1

The rest of the options can be provided through the wizard

Man, its a build failure again!! Have close look from there!!! … Which database would you like to use?:

  1. MySQL 5.6 (requires pre-installed MySQL 5.6)
  2. MySQL 5.6 in SDK docker container (requires pre-installed Docker)
  3. Existing docker container (requires pre-installed Docker)

Which one do you choose? [1/2/3]: 1

The distribution requires MySQL database. Please specify database uri (-DdbUri) (default: ‘jdbc:mysql://localhost:3306/@DBNAME@’):

Please specify database username (-DdbUser) (default: ‘root’): Please specify database password (-DdbPassword) (default: ’ '): [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 01:10 min [INFO] Finished at: 2017-04-27T11:44:43+03:00 [INFO] Final Memory: 20M/233M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.openmrs.maven.plugins:openmrs-sdk-maven-plugi n:3.9.0:setup (default-cli) on project standalone-pom: Failed to setup server: F ailed to connect to the specified database jdbc:mysql://localhost:3306/samserver ?autoReconnect=true&sessionVariables=storage_engine%3DInnoDB&useUnicode=true&cha racterEncoding=UTF-8 -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit ch. [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 rea d the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionE xception

You have to enter the appropriate username and password, if you did then the problem is with your database connection

This often happens if you did not add the path of your mysql server to the environment variables

Hey! Am now confused coz I added the path… Have a look at my path …C:\ProgramData\Oracle\Java\javapath;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0;D:\Java\jdk1.8.0_121\bin;C:\Users\SAM\Desktop\sam\Java\jre1.8.0_121\bin;C:\Program Files\New folder\apache-maven-3.3.9\bin;C:\Program Files\Git\cmd;C:\Program Files\MySQL\MySQL Server 5.7\bin;C:\Program Files\MySQL\MySQL Utilities 1.6
Is the path perfect that way???