openmrs sdk setup problem on windows

Hello! @dkayiwa @darius can you help me regarding this issue when installing openmrs sdk getting this error every time when entering mysql user name I am not being asked for password and seeing this error. "------------------------------------------------------------ What port would you like your server to use? (default: ‘8080’):8080 If you want to enable remote debugging by default when running the server, specify the port number here (e.g. 1044). Leave blank to disable debugging. (Do not do this on a production server) (default: ‘no debugging’):8089

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’): root [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 41.414 s [INFO] Finished at: 2017-05-26T12:04:47+06:00 [INFO] Final Memory: 17M/111M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.openmrs.maven.plugins:openmrs-sdk-maven-plugin:3.10.0:setup (default-cli) on project standalone-pom: Failed to setup server: NullPointerException -> [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 "

1 Like

Could you please run mvn openmrs-sdk:setup -e to display the full error?

Hi @raff this error is showing

[ERROR] Failed to execute goal org.openmrs.maven.plugins:openmrs-sdk-maven-plugin:3.10.0:setup (default-cli) on project standalone-pom: Failed to setup server: NullPointerException -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.openmrs.maven.plugins:openmrs-sdk-maven-plugin:3.10.0:setup (default-cli) on project standalone-pom: Failed to setup server at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288) at org.apache.maven.cli.MavenCli.main(MavenCli.java:199) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356) Caused by: org.apache.maven.plugin.MojoExecutionException: Failed to setup server at org.openmrs.maven.plugins.Setup.setup(Setup.java:271) at org.openmrs.maven.plugins.Setup.executeTask(Setup.java:625) at org.openmrs.maven.plugins.AbstractTask.execute(AbstractTask.java:181) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207) … 20 more Caused by: java.lang.NullPointerException at org.openmrs.maven.plugins.utility.DefaultWizard.promptForPassword(DefaultWizard.java:248) at org.openmrs.maven.plugins.utility.DefaultWizard.promptForValueIfMissingWithDefault(DefaultWizard.java:178) at org.openmrs.maven.plugins.utility.DefaultWizard.promptForPasswordIfMissingWithDefault(DefaultWizard.java:158) at org.openmrs.maven.plugins.utility.DefaultWizard.promptForDbCredentialsIfMissing(DefaultWizard.java:886) at org.openmrs.maven.plugins.utility.DefaultWizard.promptForMySQLDb(DefaultWizard.java:706) at org.openmrs.maven.plugins.utility.DefaultWizard.promptForDb(DefaultWizard.java:679) at org.openmrs.maven.plugins.Setup.setup(Setup.java:201) … 24 more [ERROR] [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

Are you running the command from some IDE or Windows Command Prompt?

i am using git bash

I see. That’s the problem. Please create an issue in JIRA for the SDK project mentioning you used git bash. Until it is fixed I recommend using Command Prompt or PowerShell instead.

1 Like

Thank you @raff :slight_smile:

still showing this error using windows cmd :frowning:

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@’): jdbc:mysql://localhost:3306/@DBNAME@

Please specify database username (-DdbUser) (default: ‘root’): root Please specify database password (-DdbPassword) (default: ’ '):

Connected to the database. [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 54.939 s [INFO] Finished at: 2017-05-26T16:39:33+06:00 [INFO] Final Memory: 18M/96M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.openmrs.maven.plugins:openmrs-sdk-maven-plugin:3.10.0:setup (default-cli) on project standalone-pom: Failed to setup server: NullPointerException -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.openmrs.maven.plugins:openmrs-sdk-maven-plugin:3.10.0:setup (default-cli) on project standalone-pom: Failed to setup server at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288) at org.apache.maven.cli.MavenCli.main(MavenCli.java:199) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356) Caused by: org.apache.maven.plugin.MojoExecutionException: Failed to setup server at org.openmrs.maven.plugins.Setup.setup(Setup.java:271) at org.openmrs.maven.plugins.Setup.executeTask(Setup.java:625) at org.openmrs.maven.plugins.AbstractTask.execute(AbstractTask.java:181) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207) … 20 more Caused by: java.lang.NullPointerException at org.apache.maven.artifact.versioning.ComparableVersion.parseVersion(ComparableVersion.java:357) at org.apache.maven.artifact.versioning.ComparableVersion.(ComparableVersion.java:348) at org.apache.maven.artifact.versioning.DefaultArtifactVersion.parseVersion(DefaultArtifactVersion.java:112) at org.apache.maven.artifact.versioning.DefaultArtifactVersion.(DefaultArtifactVersion.java:48) at org.openmrs.maven.plugins.model.Version.(Version.java:9) at org.openmrs.maven.plugins.Setup.setup(Setup.java:235) … 24 more [ERROR] [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

C:\Windows\System32>

Which openmrs version are you trying to setup? SDK is known to fail for platform 2.0.4.1… Please use 2.0.5 instead.

this error is still present with git bash…was a solution deviced for it? @raff @dkayiwa otherwise cmd prompt works fine

@reagan do you have some time to come up with a solution for git bash? :slight_smile:

@dkayiwa I can if it’s curated with how to approach it…

Can someone sumup for final solution for this issue. i am seeing similar issue.

@prasadreddy what exactly is the error that you are getting? Can you share the log via pastebin.com?

@dkayiwa I faced error because I was using git bash for the setup. I switched to command prompt and that resolved the issue.