Application Name: OpenMRS Standalone
Version Number: openmrs.version=2.1.4, refapp.version=2.8.0
Question: I am encountering a mysql connection error on Mac machine when attempting to package the OpenMRS Standalone from this repository: https://github.com/openmrs/openmrs-standalone using branch openmrs-emr2.
- To reproduce error, clone the repository on a mac machine.
- Navigate to the root directory.
- Run this command to increase mvn memory to allow complete package: export MAVEN_OPTS="-Xms1012m -Xmx2024m -XX:PermSize=556m -XX:MaxPermSize=1012m"
- Run this command to attempt to package: mvn clean package -Dopenmrs.version=2.1.4 -Drefapp.version=2.8.0
ERROR MESSAGE: [INFO] Scanning for projects… [INFO] [INFO] ------------< org.openmrs:referenceapplication-standalone >------------- [INFO] Building referenceapplication-standalone 2.6.0-SNAPSHOT [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] — maven-clean-plugin:2.5:clean (default-clean) @ referenceapplication-standalone — [INFO] [INFO] — maven-enforcer-plugin:1.0:enforce (enforce-property) @ referenceapplication-standalone — [INFO] [INFO] — liquibase-maven-plugin:2.0.5:update (empty-database-create-schema) @ referenceapplication-standalone — [INFO] ------------------------------------------------------------------------ [INFO] Loading artfacts into URLClassLoader [INFO] artifact: file:/Users/anthonymcintosh/.m2/repository/org/apache/tomcat/tomcat-catalina/7.0.50/tomcat-catalina-7.0.50.jar [INFO] artifact: file:/Users/anthonymcintosh/.m2/repository/org/apache/tomcat/tomcat-coyote/7.0.50/tomcat-coyote-7.0.50.jar [INFO] artifact: file:/Users/anthonymcintosh/.m2/repository/org/apache/tomcat/tomcat-jasper/7.0.50/tomcat-jasper-7.0.50.jar [INFO] artifact: file:/Users/anthonymcintosh/.m2/repository/mysql/mysql-connector-java/5.1.28/mysql-connector-java-5.1.28.jar [INFO] artifact: file:/Users/anthonymcintosh/.m2/repository/mysql/mysql-connector-mxj-fixed/5.0.12/mysql-connector-mxj-fixed-5.0.12.jar [INFO] artifact: file:/Users/anthonymcintosh/.m2/repository/mysql/mysql-connector-mxj-db-files-fixed/5.0.12-20170418/mysql-connector-mxj-db-files-fixed-5.0.12-20170418.jar [INFO] artifact: file:/Users/anthonymcintosh/Documents/git/GitHub/openmrs-standalone/target/classes [INFO] artifact: file:/Users/anthonymcintosh/Documents/git/GitHub/openmrs-standalone/target/test-classes [INFO] ------------------------------------------------------------------------ [INFO] Settings---------------------------- [INFO] driver: com.mysql.jdbc.Driver [INFO] url: jdbc:mysql:mxj://127.0.0.1:33326/openmrs?autoReconnect=true&sessionVariables=storage_engine=InnoDB&useUnicode=true&characterEncoding=UTF-8&server.initialize-user=true&createDatabaseIfNotExist=true&server.basedir=/Users/anthonymcintosh/Documents/git/GitHub/openmrs-standalone/target/emptydatabase&server.datadir=/Users/anthonymcintosh/Documents/git/GitHub/openmrs-standalone/target/emptydatabase/data&server.collation-server=utf8_general_ci&server.character-set-server=utf8&server.max_allowed_packet=32M [INFO] username: openmrs [INFO] password: test [INFO] use empty password: false [INFO] properties file: null [INFO] properties file will override? false [INFO] prompt on non-local database? true [INFO] clear checksums? false [INFO] changeLogFile: liquibase-schema-only.xml [INFO] context(s): null [INFO] number of changes to apply: 0 [INFO] drop first? false [INFO] ------------------------------------------------------------------------ [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 6.632 s [INFO] Finished at: 2019-03-27T08:47:07-05:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.liquibase:liquibase-maven-plugin:2.0.5:update (empty-database-create-schema) on project referenceapplication-standalone: Error setting up or running Liquibase: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up.: Can’t create database ‘openmrs’ (errno: 2) -> [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