Announcing OpenMRS SDK 4.3.0

Hi everyone!

Today, I’ve release OpenMRS SDK 4.3.0. This is primarily a bug-fix release for SDK 4.2.0. However, because of extensive internal changes, it isn’t appropriate to release it as a patch release.

Highlights:

  • The create-project command will no longer throw a null pointer exception when run outside of an existing Maven project.
  • Tomcat is now always run in a fork. This ensures that the versions of libraries the SDK uses do not interfere with the versions of the libraries used when the SDK runs OpenMRS (Talk thread).
  • Restores Tomcat 7 container. Tomcat 7 is the default for all SDK system using OpenMRS Core < 2.5.0-SNAPSHOT. This should fix issues running the SDK with Tomcat 9.

To use Tomcat 9 with a version of OpenMRS Core < 2.5.0-SNAPSHOT (e.g. 2.3.4-SNAPSHOT and 2.4.2-SNAPSHOT have the appropriate fix)., you can use the following command:

mvn openmrs-sdk:run -DrunGoal=org.openmrs.maven.plugins:openmrs-sdk-tomcat9-maven-plugin:4.3.0:run-tomcat
1 Like

Thanks @ibacher

Thanks for all of the hard work on this @ibacher! I’ve tested this out with one of our distributions and everything appears to work well now. This is very much appreciated!

1 Like

I tried running sdk 4.3.0 and encountered errors trying to set up a new server. Any help is appreciated. I’m running on iMac Big Sur 11.6.1 Here’s the session. Thanks much…

iMac-2 OpenMRS % mvn openmrs-sdk:setup
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=1024m; support was removed in 8.0
[INFO] Scanning for projects...
Downloading from openmrs-bintray-repo: https://dl.bintray.com/openmrs/maven/org/openmrs/maven/plugins/maven-metadata.xml
Downloading from openmrs-bintray-repo: https://dl.bintray.com/openmrs/maven/org/apache/maven/plugins/maven-metadata.xml
Downloading from openmrs-repo: http://mavenrepo.openmrs.org/nexus/content/repositories/public/org/apache/maven/plugins/maven-metadata.xml
Downloading from openmrs-repo: http://mavenrepo.openmrs.org/nexus/content/repositories/public/org/openmrs/maven/plugins/maven-metadata.xml
Downloading from openmrs-bintray-repo: https://dl.bintray.com/openmrs/maven/org/codehaus/mojo/maven-metadata.xml
Downloading from openmrs-repo: http://mavenrepo.openmrs.org/nexus/content/repositories/public/org/codehaus/mojo/maven-metadata.xml
Downloaded from openmrs-repo: http://mavenrepo.openmrs.org/nexus/content/repositories/public/org/openmrs/maven/plugins/maven-metadata.xml (1.7 kB at 900 B/s)
Downloaded from openmrs-repo: http://mavenrepo.openmrs.org/nexus/content/repositories/public/org/apache/maven/plugins/maven-metadata.xml (15 kB at 7.3 kB/s)
Downloaded from openmrs-repo: http://mavenrepo.openmrs.org/nexus/content/repositories/public/org/codehaus/mojo/maven-metadata.xml (21 kB at 12 kB/s)
[WARNING] Could not transfer metadata org.openmrs.maven.plugins/maven-metadata.xml from/to openmrs-bintray-repo (https://dl.bintray.com/openmrs/maven/): Transfer failed for https://dl.bintray.com/openmrs/maven/org/openmrs/maven/plugins/maven-metadata.xml 502 Bad Gateway
[WARNING] Could not transfer metadata org.apache.maven.plugins/maven-metadata.xml from/to openmrs-bintray-repo (https://dl.bintray.com/openmrs/maven/): Transfer failed for https://dl.bintray.com/openmrs/maven/org/apache/maven/plugins/maven-metadata.xml 502 Bad Gateway
[WARNING] Could not transfer metadata org.codehaus.mojo/maven-metadata.xml from/to openmrs-bintray-repo (https://dl.bintray.com/openmrs/maven/): Transfer failed for https://dl.bintray.com/openmrs/maven/org/codehaus/mojo/maven-metadata.xml 502 Bad Gateway
Downloading from openmrs-repo: http://mavenrepo.openmrs.org/nexus/content/repositories/public/org/openmrs/maven/plugins/openmrs-sdk-maven-plugin/maven-metadata.xml
Downloading from openmrs-bintray-repo: https://dl.bintray.com/openmrs/maven/org/openmrs/maven/plugins/openmrs-sdk-maven-plugin/maven-metadata.xml
Downloaded from openmrs-repo: http://mavenrepo.openmrs.org/nexus/content/repositories/public/org/openmrs/maven/plugins/openmrs-sdk-maven-plugin/maven-metadata.xml (2.0 kB at 2.2 kB/s)
[WARNING] Could not transfer metadata org.openmrs.maven.plugins:openmrs-sdk-maven-plugin/maven-metadata.xml from/to openmrs-bintray-repo (https://dl.bintray.com/openmrs/maven/): Transfer failed for https://dl.bintray.com/openmrs/maven/org/openmrs/maven/plugins/openmrs-sdk-maven-plugin/maven-metadata.xml 502 Bad Gateway
[INFO] 
[INFO] ------------------< org.apache.maven:standalone-pom >-------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] --------------------------------[ pom ]---------------------------------
[WARNING] Failure to transfer org.openmrs.maven.plugins/maven-metadata.xml from https://dl.bintray.com/openmrs/maven/ was cached in the local repository, resolution will not be reattempted until the update interval of openmrs-bintray-repo has elapsed or updates are forced. Original error: Could not transfer metadata org.openmrs.maven.plugins/maven-metadata.xml from/to openmrs-bintray-repo (https://dl.bintray.com/openmrs/maven/): Transfer failed for https://dl.bintray.com/openmrs/maven/org/openmrs/maven/plugins/maven-metadata.xml 502 Bad Gateway
[WARNING] Failure to transfer org.apache.maven.plugins/maven-metadata.xml from https://dl.bintray.com/openmrs/maven/ was cached in the local repository, resolution will not be reattempted until the update interval of openmrs-bintray-repo has elapsed or updates are forced. Original error: Could not transfer metadata org.apache.maven.plugins/maven-metadata.xml from/to openmrs-bintray-repo (https://dl.bintray.com/openmrs/maven/): Transfer failed for https://dl.bintray.com/openmrs/maven/org/apache/maven/plugins/maven-metadata.xml 502 Bad Gateway
[WARNING] Failure to transfer org.codehaus.mojo/maven-metadata.xml from https://dl.bintray.com/openmrs/maven/ was cached in the local repository, resolution will not be reattempted until the update interval of openmrs-bintray-repo has elapsed or updates are forced. Original error: Could not transfer metadata org.codehaus.mojo/maven-metadata.xml from/to openmrs-bintray-repo (https://dl.bintray.com/openmrs/maven/): Transfer failed for https://dl.bintray.com/openmrs/maven/org/codehaus/mojo/maven-metadata.xml 502 Bad Gateway
[WARNING] Failure to transfer org.openmrs.maven.plugins:openmrs-sdk-maven-plugin/maven-metadata.xml from https://dl.bintray.com/openmrs/maven/ was cached in the local repository, resolution will not be reattempted until the update interval of openmrs-bintray-repo has elapsed or updates are forced. Original error: Could not transfer metadata org.openmrs.maven.plugins:openmrs-sdk-maven-plugin/maven-metadata.xml from/to openmrs-bintray-repo (https://dl.bintray.com/openmrs/maven/): Transfer failed for https://dl.bintray.com/openmrs/maven/org/openmrs/maven/plugins/openmrs-sdk-maven-plugin/maven-metadata.xml 502 Bad Gateway
[INFO] 
[INFO] --- openmrs-sdk-maven-plugin:4.3.0:setup (default-cli) @ standalone-pom ---

Setting up a new server...

Specify server id (-DserverId) (default: 'server'): brmserver

You can setup the following servers:
1) Distribution
2) Platform

Which one do you choose? [1/2]: 1
[INFO] artifact org.openmrs.distro:referenceapplication-package: checking for updates from openmrs-repo
[INFO] artifact org.openmrs.distro:referenceapplication-package: checking for updates from openmrs-repo-thirdparty
[INFO] artifact org.openmrs.distro:referenceapplication-package: checking for updates from openmrs-bintray-repo
[WARNING] repository metadata for: 'artifact org.openmrs.distro:referenceapplication-package' could not be retrieved from repository: openmrs-bintray-repo due to an error: Transfer failed for https://dl.bintray.com/openmrs/maven/org/openmrs/distro/referenceapplication-package/maven-metadata.xml 502 Bad Gateway
[INFO] artifact org.openmrs.distro:referenceapplication-package: checking for updates from central

You can deploy the following versions of distribution:
1) Reference Application 3.0.0-SNAPSHOT
2) Reference Application 2.12.1
3) Reference Application 2.11.0
4) Reference Application 2.10.0
5) Reference Application 2.9.0
6) Other...

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

Please specify distribution artifact (default: 'org.openmrs.distro:referenceapplication-package:2.4'): 
[INFO] Configured Artifact: org.openmrs.distro:referenceapplication-package:2.4:jar
[INFO] Copying referenceapplication-package-2.4.jar to /Users/barrylevine/openmrs/brmserver/openmrs-distro.jar
[INFO] Configured Artifact: org.openmrs.web:openmrs-webapp:1.11.6:war
[INFO] Copying openmrs-webapp-1.11.6.war to /Users/barrylevine/openmrs/brmserver/openmrs-1.11.6.war
[INFO] Configured Artifact: org.openmrs.module:htmlformentry19ext-omod:1.6.1:jar
[INFO] Configured Artifact: org.openmrs.module:metadatadeploy-omod:1.5:jar
[INFO] Configured Artifact: org.openmrs.module:reportingrest-omod:1.6:jar
[INFO] Configured Artifact: org.openmrs.module:serialization.xstream-omod:0.2.10:omod
[INFO] Configured Artifact: org.openmrs.module:registrationapp-omod:1.5:jar
[INFO] Configured Artifact: org.openmrs:event-omod:2.4:jar
[INFO] Configured Artifact: org.openmrs.module:uilibrary-omod:2.0.4:jar
[INFO] Configured Artifact: org.openmrs.module:htmlwidgets-omod:1.7.0:jar
[INFO] Configured Artifact: org.openmrs.module:dataexchange-omod:1.3.1:jar
[INFO] Configured Artifact: org.openmrs.module:appui-omod:1.5.1:jar
Downloading from openmrs-repo: http://mavenrepo.openmrs.org/nexus/content/repositories/public/org/openmrs/distro/referenceapplication/2.4-SNAPSHOT/maven-metadata.xml
Downloading from openmrs-bintray-repo: https://dl.bintray.com/openmrs/maven/org/openmrs/distro/referenceapplication/2.4-SNAPSHOT/maven-metadata.xml
Downloading from openmrs-repo-thirdparty: http://mavenrepo.openmrs.org/nexus/content/repositories/thirdparty/org/openmrs/distro/referenceapplication/2.4-SNAPSHOT/maven-metadata.xml
[WARNING] Could not transfer metadata org.openmrs.distro:referenceapplication:2.4-SNAPSHOT/maven-metadata.xml from/to openmrs-bintray-repo (https://dl.bintray.com/openmrs/maven/): Transfer failed for https://dl.bintray.com/openmrs/maven/org/openmrs/distro/referenceapplication/2.4-SNAPSHOT/maven-metadata.xml 502 Bad Gateway
Downloading from openmrs-repo: http://mavenrepo.openmrs.org/nexus/content/repositories/public/org/openmrs/distro/referenceapplication/2.4-SNAPSHOT/referenceapplication-2.4-SNAPSHOT.pom
Downloading from openmrs-repo-thirdparty: http://mavenrepo.openmrs.org/nexus/content/repositories/thirdparty/org/openmrs/distro/referenceapplication/2.4-SNAPSHOT/referenceapplication-2.4-SNAPSHOT.pom
Downloading from openmrs-bintray-repo: https://dl.bintray.com/openmrs/maven/org/openmrs/distro/referenceapplication/2.4-SNAPSHOT/referenceapplication-2.4-SNAPSHOT.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  57.387 s
[INFO] Finished at: 2021-12-16T08:39:33-08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.openmrs.maven.plugins:openmrs-sdk-maven-plugin:4.3.0:setup (default-cli) on project standalone-pom: Failed to setup server: Unable to find/resolve artifact. Failed to read artifact descriptor for org.openmrs.module:appui-omod:jar:1.5.1: Could not transfer artifact org.openmrs.distro:referenceapplication:pom:2.4-SNAPSHOT from/to openmrs-repo-thirdparty (http://mavenrepo.openmrs.org/nexus/content/repositories/thirdparty): Transfer failed for http://mavenrepo.openmrs.org/nexus/content/repositories/thirdparty/org/openmrs/distro/referenceapplication/2.4-SNAPSHOT/referenceapplication-2.4-SNAPSHOT.pom 409 Conflict -> [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

@levine Please run mvn org.openmrs.maven.plugins:openmrs-sdk-maven-plugin:setup-sdk to update your settings.xml to reflect the latest changes (repos should be accessed via https, bintray no longer exists, etc.). That’s not going to fix the other error you’re seeing, but it’s a good idea anyways.

Do you have a specific need to run RefApp 2.4 (which is from 2016) instead of RefApp 2.12.1 (which is from this year)? If so, we probably have to track down an old copy of RefApp 2.4-SNAPSHOT since that seems to be required by appui 1.5.1.

I’ve run the update for settings.xml I can move to refapp 2.12.1 as long as my modules with the following from pom files would work:

org.openmrs.api openmrs-api 1.11.6 jar org.openmrs.distro referenceapplication 2.4 pom import 1.11.6

Almost certainly not right away. RefApp 2.4 should be able to be installed now.

Thanks much for your help…I am now able to run openmrs; however, when it starts I get a few issues with starting modules, as well as other errors. I hope the following makes sense: These are the alerts:

There was an error starting the module: Provider Management Module

Mark this Alert as Read Mark as ReadThere was an error starting the module: EMR API Module

Mark this Alert as Read Mark as ReadThere was an error starting the module: ID Generation

Mark this Alert as Read Mark as ReadThere was an error starting the module: Reference Metadata Module

Mark this Alert as Read Mark as ReadThere was an error starting the module: Reference Demo Data Module

Mark this Alert as Read Mark as ReadThere was an error starting the module: Registration Core Module

Mark this Alert as Read Mark as ReadThere was an error starting the module: Admin UI Module

Mark this Alert as Read Mark as ReadThere was an error starting the module: Core Apps Module

Mark this Alert as Read Mark as ReadThere was an error starting the module: Registration App Module

Mark this Alert as Read Mark as ReadThere was an error starting the module: Appointment Scheduling UI Module

Mark this Alert as Read Mark as ReadThere was an error starting the module: HTML Form Entry UI Framework Integration Module

Mark this Alert as Read Mark as ReadThere was an error starting the module: Chart Search Module

Mark this Alert as Read Mark as ReadThere was an error starting the module: Reference Application Module

Following is the output:

WARN - ModuleFactory.startModuleInternal(792) |2021-12-16 11:18:37,452| Error while trying to start module: idgen
org.openmrs.api.db.DAOException: Error while running sql: CREATE TABLE `idgen_identifier_source` (
			  `id` int(11) NOT NULL auto_increment,
			  `uuid` char(38) NOT NULL,
			  `name` varchar(255) NOT NULL,
			  `description` varchar(1000),
			  `identifier_type` int(11) NOT NULL default '0',
			  `creator` int(11) NOT NULL default '0',
			  `date_created` datetime NOT NULL default '0000-00-00 00:00:00',
			  `changed_by` int(11) default NULL,
  			  `date_changed` datetime default NULL,
			  `retired` tinyint(1) NOT NULL default 0,
			  `retired_by` int(11) default NULL,
  			  `date_retired` datetime default NULL,
  			  `retire_reason` varchar(255) default NULL,
			  PRIMARY KEY  (`id`),
			  KEY `id for idgen_identifier_source` (`id`),
			  KEY `identifier_type for idgen_identifier_source` (`identifier_type`),
			  KEY `creator for idgen_identifier_source` (`creator`),
			  KEY `changed_by for idgen_identifier_source` (`changed_by`),
			  KEY `retired_by for idgen_identifier_source` (`retired_by`),
			  CONSTRAINT `identifier_type for idgen_identifier_source` FOREIGN KEY (`identifier_type`) REFERENCES `patient_identifier_type` (`patient_identifier_type_id`),
			  CONSTRAINT `creator for idgen_identifier_source` FOREIGN KEY (`creator`) REFERENCES `users` (`user_id`),
			  CONSTRAINT `changed_by for idgen_identifier_source` FOREIGN KEY (`changed_by`) REFERENCES `users` (`user_id`),
			  CONSTRAINT `retired_by for idgen_identifier_source` FOREIGN KEY (`retired_by`) REFERENCES `users` (`user_id`)
			) ENGINE=InnoDB DEFAULT CHARSET=utf8 . Message: Invalid default value for 'date_created'

	at org.openmrs.util.DatabaseUtil.executeSQL(DatabaseUtil.java:141)
	at org.openmrs.api.db.hibernate.HibernateAdministrationDAO.executeSQL(HibernateAdministrationDAO.java:336)
	at org.openmrs.api.impl.AdministrationServiceImpl.executeSQL(AdministrationServiceImpl.java:799)
	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.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
	at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:96)
	at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:260)
	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:94)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
	at com.sun.proxy.$Proxy71.executeSQL(Unknown Source)
	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.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
	at org.openmrs.aop.LoggingAdvice.invoke(LoggingAdvice.java:121)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	at org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:51)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	at org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:51)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
	at com.sun.proxy.$Proxy93.executeSQL(Unknown Source)
	at org.openmrs.module.ModuleFactory.runDiff(ModuleFactory.java:944)
	at org.openmrs.module.ModuleFactory.startModuleInternal(ModuleFactory.java:720)
	at org.openmrs.api.context.Daemon$1.run(Daemon.java:70)

Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Invalid default value for 'date_created'
	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:2825)
	at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2156)
	at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2441)
	at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2366)
	at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2350)
	at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:105)
	at org.openmrs.util.DatabaseUtil.executeSQL(DatabaseUtil.java:120)
	... 33 more
INFO - LoggingAdvice.invoke(115) |2021-12-16 11:18:37,463| In method AlertService.saveAlert. Arguments: Alert=Alert: #null, 
INFO - LoggingAdvice.invoke(155) |2021-12-16 11:18:37,464| Exiting method saveAlert
ERROR - ModuleFactory.startModules(236) |2021-12-16 11:18:37,466| Module Reference Metadata Module cannot be started because it requires the following module(s): org.openmrs.module.emrapi ${emrapiModuleVersion}, org.openmrs.module.idgen ${idgenModuleVersion} Please install and start these modules first.
INFO - LoggingAdvice.invoke(115) |2021-12-16 11:18:37,467| In method AlertService.saveAlert. Arguments: Alert=Alert: #null, 
INFO - LoggingAdvice.invoke(155) |2021-12-16 11:18:37,468| Exiting method saveAlert
ERROR - ModuleFactory.startModules(236) |2021-12-16 11:18:37,470| Module Reference Demo Data Module cannot be started because it requires the following module(s): org.openmrs.module.providermanagement 2.0, org.openmrs.module.referencemetadata 2.2}, org.openmrs.module.emrapi 1.5, org.openmrs.module.idgen 3.2 Please install and start these modules first.
INFO - LoggingAdvice.invoke(115) |2021-12-16 11:18:37,472| In method AlertService.saveAlert. Arguments: Alert=Alert: #null, 
INFO - LoggingAdvice.invoke(155) |2021-12-16 11:18:37,473| Exiting method saveAlert
ERROR - ModuleFactory.startModules(236) |2021-12-16 11:18:37,475| Module Registration Core Module cannot be started because it requires the following module(s): org.openmrs.module.idgen 4.3 Please install and start these modules first.
INFO - LoggingAdvice.invoke(115) |2021-12-16 11:18:37,476| In method AlertService.saveAlert. Arguments: Alert=Alert: #null, 
INFO - LoggingAdvice.invoke(155) |2021-12-16 11:18:37,477| Exiting method saveAlert
INFO 12/16/21 11:18 AM:liquibase: liquibase.xml is using schema version 1.9 rather than version 2.0
INFO 12/16/21 11:18 AM:liquibase: Reading from `liquibasechangelog`
INFO 12/16/21 11:18 AM:liquibase: Successfully acquired change log lock
INFO 12/16/21 11:18 AM:liquibase: liquibase.xml is using schema version 1.9 rather than version 2.0
INFO 12/16/21 11:18 AM:liquibase: Reading from `liquibasechangelog`
INFO 12/16/21 11:18 AM:liquibase: ChangeSet liquibase.xml::appframework-1::djazayeri ran successfully in 94ms
INFO 12/16/21 11:18 AM:liquibase: ChangeSet liquibase.xml::appframework-2::djazayeri ran successfully in 2ms
INFO 12/16/21 11:18 AM:liquibase: ChangeSet liquibase.xml::appframework-3::nutsiepully ran successfully in 22ms
INFO 12/16/21 11:18 AM:liquibase: ChangeSet liquibase.xml::appframework-4::Wyclif ran successfully in 22ms
INFO 12/16/21 11:18 AM:liquibase: Successfully released change log lock
INFO - LoggingAdvice.invoke(115) |2021-12-16 11:18:42,742| In method AdministrationService.saveGlobalProperty. Arguments: GlobalProperty=property: appframework.started value: true, 
INFO - LoggingAdvice.invoke(155) |2021-12-16 11:18:42,744| Exiting method saveGlobalProperty
INFO - LoggingAdvice.invoke(115) |2021-12-16 11:18:42,746| In method AdministrationService.saveGlobalProperty. Arguments: GlobalProperty=property: appframework.mandatory value: false, 
INFO - LoggingAdvice.invoke(155) |2021-12-16 11:18:42,748| Exiting method saveGlobalProperty
INFO - LoggingAdvice.invoke(115) |2021-12-16 11:18:42,756| In method AdministrationService.saveGlobalProperty. Arguments: GlobalProperty=property: formentryapp.started value: true, 
INFO - LoggingAdvice.invoke(155) |2021-12-16 11:18:42,758| Exiting method saveGlobalProperty
INFO - LoggingAdvice.invoke(115) |2021-12-16 11:18:42,760| In method AdministrationService.saveGlobalProperty. Arguments: GlobalProperty=property: formentryapp.mandatory value: false, 
INFO - LoggingAdvice.invoke(155) |2021-12-16 11:18:42,762| Exiting method saveGlobalProperty
INFO - LoggingAdvice.invoke(115) |2021-12-16 11:18:42,770| In method AdministrationService.saveGlobalProperty. Arguments: GlobalProperty=property: appui.started value: true, 
INFO - LoggingAdvice.invoke(155) |2021-12-16 11:18:42,771| Exiting method saveGlobalProperty
INFO - LoggingAdvice.invoke(115) |2021-12-16 11:18:42,773| In method AdministrationService.saveGlobalProperty. Arguments: GlobalProperty=property: appui.mandatory value: false, 
INFO - LoggingAdvice.invoke(155) |2021-12-16 11:18:42,775| Exiting method saveGlobalProperty
ERROR - ModuleFactory.startModules(236) |2021-12-16 11:18:42,777| Module Admin UI Module cannot be started because it requires the following module(s): org.openmrs.module.providermanagement 2.3 Please install and start these modules first.
INFO - LoggingAdvice.invoke(115) |2021-12-16 11:18:42,778| In method AlertService.saveAlert. Arguments: Alert=Alert: #null, 
INFO - LoggingAdvice.invoke(155) |2021-12-16 11:18:42,780| Exiting method saveAlert
ERROR - ModuleFactory.startModules(236) |2021-12-16 11:18:42,781| Module Core Apps Module cannot be started because it requires the following module(s): org.openmrs.module.emrapi ${emrapiVersion}, org.openmrs.module.idgen ${idgenVersion} Please install and start these modules first.
INFO - LoggingAdvice.invoke(115) |2021-12-16 11:18:42,784| In method AlertService.saveAlert. Arguments: Alert=Alert: #null, 
INFO - LoggingAdvice.invoke(155) |2021-12-16 11:18:42,785| Exiting method saveAlert
ERROR - ModuleFactory.startModules(236) |2021-12-16 11:18:42,787| Module Registration App Module cannot be started because it requires the following module(s): org.openmrs.module.registrationcore 1.4, org.openmrs.module.emrapi 1.2, org.openmrs.module.coreapps 1.6 Please install and start these modules first.
INFO - LoggingAdvice.invoke(115) |2021-12-16 11:18:42,788| In method AlertService.saveAlert. Arguments: Alert=Alert: #null, 
INFO - LoggingAdvice.invoke(155) |2021-12-16 11:18:42,789| Exiting method saveAlert
ERROR - ModuleFactory.startModules(236) |2021-12-16 11:18:42,791| Module Appointment Scheduling UI Module cannot be started because it requires the following module(s): org.openmrs.module.coreapps 1.8, org.openmrs.module.emrapi Please install and start these modules first.
INFO - LoggingAdvice.invoke(115) |2021-12-16 11:18:42,792| In method AlertService.saveAlert. Arguments: Alert=Alert: #null, 
INFO - LoggingAdvice.invoke(155) |2021-12-16 11:18:42,793| Exiting method saveAlert
ERROR - ModuleFactory.startModules(236) |2021-12-16 11:18:42,795| Module HTML Form Entry UI Framework Integration Module cannot be started because it requires the following module(s): org.openmrs.module.emrapi 1.12 Please install and start these modules first.
INFO - LoggingAdvice.invoke(115) |2021-12-16 11:18:42,797| In method AlertService.saveAlert. Arguments: Alert=Alert: #null, 
INFO - LoggingAdvice.invoke(155) |2021-12-16 11:18:42,797| Exiting method saveAlert
ERROR - ModuleFactory.startModules(236) |2021-12-16 11:18:42,799| Module Chart Search Module cannot be started because it requires the following module(s): org.openmrs.module.htmlformentryui 1.2, org.openmrs.module.emrapi 1.1 Please install and start these modules first.
INFO - LoggingAdvice.invoke(115) |2021-12-16 11:18:42,800| In method AlertService.saveAlert. Arguments: Alert=Alert: #null, 
INFO - LoggingAdvice.invoke(155) |2021-12-16 11:18:42,801| Exiting method saveAlert

ERROR - ModuleFactory.startModules(236) |2021-12-16 11:18:42,803| Module Reference Application Module cannot be started because it requires the following module(s): org.openmrs.module.htmlformentryui ${htmlformentryuiVersion} Please install and start these modules first.
INFO - LoggingAdvice.invoke(115) |2021-12-16 11:18:42,804| In method AlertService.saveAlert. Arguments: Alert=Alert: #null, 
INFO - LoggingAdvice.invoke(155) |2021-12-16 11:18:42,805| Exiting method saveAlert
INFO - LoggingAdvice.invoke(115) |2021-12-16 11:18:43,545| In method SchedulerService.saveToMemento. Arguments: 
INFO - LoggingAdvice.invoke(155) |2021-12-16 11:18:43,546| Exiting method saveToMemento
INFO - AbstractSessionFactoryBean.destroy(223) |2021-12-16 11:18:43,557| Closing Hibernate SessionFactory
INFO - ServiceContext.startRefreshingContext(902) |2021-12-16 11:18:43,563| Refreshing Context
INFO - LocalSessionFactoryBean.buildSessionFactory(780) |2021-12-16 11:18:48,732| Building new Hibernate SessionFactory
INFO - ServiceContext.doneRefreshingContext(913) |2021-12-16 11:18:54,933| Done refreshing Context

ERROR - UiFrameworkActivator.contextRefreshed(90) |2021-12-16 11:18:58,760| Error in UiContextRefreshedCallback: org.openmrs.ui.framework.StandardModuleUiConfiguration for module providermanagement
java.lang.NullPointerException
	at org.openmrs.module.ModuleFactory.getModuleClassLoader(ModuleFactory.java:1407)
	at org.openmrs.module.ModuleFactory.getModuleClassLoader(ModuleFactory.java:1428)
	at org.openmrs.ui.framework.StandardModuleUiConfiguration.afterContextRefreshed(StandardModuleUiConfiguration.java:77)
	at org.openmrs.module.uiframework.UiFrameworkActivator.contextRefreshed(UiFrameworkActivator.java:88)
	at org.openmrs.module.ModuleUtil.refreshApplicationContext(ModuleUtil.java:872)
	at org.openmrs.module.web.WebModuleUtil.refreshWAC(WebModuleUtil.java:962)
	at org.openmrs.web.Listener.performWebStartOfModules(Listener.java:627)
	at org.openmrs.web.Listener.performWebStartOfModules(Listener.java:606)
	at org.openmrs.web.Listener.startOpenmrs(Listener.java:249)
	at org.openmrs.web.WebDaemon$1.run(WebDaemon.java:42)
INFO - LoggingAdvice.invoke(115) |2021-12-16 11:18:58,766| In method AdministrationService.saveGlobalProperty. Arguments: GlobalProperty=property: atlas.id value: d6ebe405-ac82-4054-862e-4e4e06b0355d, 
INFO - LoggingAdvice.invoke(155) |2021-12-16 11:18:59,054| Exiting method saveGlobalProperty

WARN - AllergyActivator.started(61) |2021-12-16 11:18:59,060| Failed to set the other non coded concept uuid
java.lang.IllegalStateException: Configuration required: allergy.concept.otherNonCoded
	at org.openmrs.module.allergyapi.AllergyProperties.getConceptByGlobalProperty(AllergyProperties.java:38)
	at org.openmrs.module.allergyapi.AllergyProperties.getOtherNonCodedConcept(AllergyProperties.java:72)
	at org.openmrs.module.allergyapi.AllergyActivator.started(AllergyActivator.java:58)
	at org.openmrs.module.ModuleUtil.refreshApplicationContext(ModuleUtil.java:876)
	at org.openmrs.module.web.WebModuleUtil.refreshWAC(WebModuleUtil.java:962)
	at org.openmrs.web.Listener.performWebStartOfModules(Listener.java:627)
	at org.openmrs.web.Listener.performWebStartOfModules(Listener.java:606)
	at org.openmrs.web.Listener.startOpenmrs(Listener.java:249)
	at org.openmrs.web.WebDaemon$1.run(WebDaemon.java:42)
INFO - LoggingAdvice.invoke(115) |2021-12-16 11:18:59,169| In method LocationService.saveLocationTag. Arguments: LocationTag=Login Location, 
INFO - LoggingAdvice.invoke(155) |2021-12-16 11:18:59,172| Exiting method saveLocationTag
WARN - OpenmrsUtil.getRuntimePropertiesFilePathName(2669) |2021-12-16 11:18:59,176| Unable to find a runtime properties file at /Users/barrylevine/OpenMRS/openmrs-runtime.properties
WARN - IdgenTask.run(32) |2021-12-16 11:19:00,148| Not running scheduled task. DaemonToken = null; enabled = false
Dec 16, 2021 11:19:00 AM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring FrameworkServlet 'openmrs'
INFO - LoggingAdvice.invoke(115) |2021-12-16 11:19:00,338| In method ReportService.deleteOldReportRequests. Arguments: 
INFO - LoggingAdvice.invoke(155) |2021-12-16 11:19:00,341| Exiting method deleteOldReportRequests
Dec 16, 2021 11:19:00 AM org.apache.jasper.compiler.TldLocationsCache tldScanJar
INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
Dec 16, 2021 11:19:02 AM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring FrameworkServlet 'openmrs_static_content'

ERROR - CommonsLoggingOutput.error(75) |2021-12-16 11:19:02,466| Line=113 The content of element type "dwr" must match "(init?,allow?,signatures?)".

ERROR - CommonsLoggingOutput.error(75) |2021-12-16 11:19:02,471| Parameter mismatch parsing signatures section in dwr.xml on line: DWRAtlasService.disableAtlasModule()

ERROR - CommonsLoggingOutput.error(75) |2021-12-16 11:19:02,472| Parameter mismatch parsing signatures section in dwr.xml on line: DWRHtmlFormEntryService.checkIfLoggedIn()

WARN - IdgenTask.run(32) |2021-12-16 11:24:00,138| Not running scheduled task. DaemonToken = null; enabled = false

Append &zeroDateTimeBehavior=convertToNull to the value of your connection.url in the runtime properties file. Then restart OpenMRS.

Note, I’ve been using OpenMRS SDK for quite a while and only observed this issue for the past few days. Your help is appreciated. I just made the change you suggested and restarted openmrs. I still get the following alerts:

There was an error starting the module: Provider Management Module

Mark this Alert as Read Mark as ReadThere was an error starting the module: EMR API Module

Mark this Alert as Read Mark as ReadThere was an error starting the module: ID Generation

Mark this Alert as Read Mark as ReadThere was an error starting the module: Reference Metadata Module

Mark this Alert as Read Mark as ReadThere was an error starting the module: Reference Demo Data Module

Mark this Alert as Read Mark as ReadThere was an error starting the module: Registration Core Module

Mark this Alert as Read Mark as ReadThere was an error starting the module: Admin UI Module

Mark this Alert as Read Mark as ReadThere was an error starting the module: Core Apps Module

Mark this Alert as Read Mark as ReadThere was an error starting the module: Registration App Module

Mark this Alert as Read Mark as ReadThere was an error starting the module: Appointment Scheduling UI Module

Mark this Alert as Read Mark as ReadThere was an error starting the module: HTML Form Entry UI Framework Integration Module

Mark this Alert as Read Mark as ReadThere was an error starting the module: Chart Search Module

Mark this Alert as Read Mark as ReadThere was an error starting the module: Reference Application Module

Mark this Alert as Read Mark as ReadThere was an error starting the module: Provider Management Module

Mark this Alert as Read Mark as ReadThere was an error starting the module: EMR API Module

Mark this Alert as Read Mark as ReadThere was an error starting the module: ID Generation

Mark this Alert as Read Mark as ReadThere was an error starting the module: Reference Metadata Module

Mark this Alert as Read Mark as ReadThere was an error starting the module: Reference Demo Data Module

Mark this Alert as Read Mark as ReadThere was an error starting the module: Registration Core Module

Mark this Alert as Read Mark as ReadThere was an error starting the module: Admin UI Module

Mark this Alert as Read Mark as ReadThere was an error starting the module: Core Apps Module

Mark this Alert as Read Mark as ReadThere was an error starting the module: Registration App Module

Mark this Alert as Read Mark as ReadThere was an error starting the module: Appointment Scheduling UI Module

Mark this Alert as Read Mark as ReadThere was an error starting the module: HTML Form Entry UI Framework Integration Module

Mark this Alert as Read Mark as ReadThere was an error starting the module: Chart Search Module

Mark this Alert as Read Mark as ReadThere was an error starting the module: Reference Application Module

Following is the output:

 % mvn openmrs-sdk:run
 
...
You have the following servers::
1) brmaserver


Which one do you choose? [1]: 1

Checking if port 8080 is in use... [free]
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=1024m; support was removed in 8.0
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: /Users/barrylevine/Downloads/apache-maven-3.6.3
Java version: 1.8.0_171, vendor: Oracle Corporation, runtime: /Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.16", arch: "x86_64", family: "mac"
[INFO] Scanning for projects...
[INFO] 
[INFO] ------------------< org.apache.maven:standalone-pom >-------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] --------------------------------[ pom ]---------------------------------
[INFO] 
[INFO] --- openmrs-sdk-tomcat7-maven-plugin:4.3.0:run-tomcat (default-cli) @ standalone-pom ---
Dec 16, 2021 4:36:13 PM org.jline.utils.Log logr
WARNING: Unable to create a system terminal, creating a dumb terminal (enable debug logging for more information)


Using JAVA_HOME: /Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk/Contents/Home/jre

Using MAVEN_OPTS:   -Xmx2048m -XX:MaxPermSize=1024m

Please note that it is not recommended to run OpenMRS platform 1.11.6 on JDK 8.


Starting Tomcat...


Dec 16, 2021 4:36:14 PM org.apache.coyote.AbstractProtocol init
...

WARNING 12/16/21 4:36 PM:liquibase: modifyDataType will lose primary key/autoincrement/not null settings for mysql.  Use <sql> and re-specify all configuration if this is the case
WARNING 12/16/21 4:36 PM:liquibase: modifyDataType will lose primary key/autoincrement/not null settings for mysql.  Use <sql> and re-specify all configuration if this is the case
WARNING 12/16/21 4:36 PM:liquibase: modifyDataType will lose primary key/autoincrement/not null settings for mysql.  Use <sql> and re-specify all configuration if this is the case
INFO - LocalSessionFactoryBean.buildSessionFactory(780) |2021-12-16 16:36:21,020| Building new Hibernate SessionFactory
WARN - Listener.loadBundledModules(494) |2021-12-16 16:36:23,325| Bundled module folder doesn't exist: /Users/barrylevine/openmrs/brmaserver/tmp/openmrs/WEB-INF/bundledModules
WARN - OpenmrsUtil.getRuntimePropertiesFilePathName(2669) |2021-12-16 16:36:23,326| Unable to find a runtime properties file at /Users/barrylevine/OpenMRS/openmrs-runtime.properties
INFO 12/16/21 4:36 PM:liquibase: Reading from `liquibasechangelog`
WARNING 12/16/21 4:36 PM:liquibase: modifyDataType will lose primary key/autoincrement/not null settings for mysql.  Use <sql> and re-specify all configuration if this is the case
WARNING 12/16/21 4:36 PM:liquibase: modifyDataType will lose primary key/autoincrement/not null settings for mysql.  Use <sql> and re-specify all configuration if this is the case
WARNING 12/16/21 4:36 PM:liquibase: modifyDataType will lose primary key/autoincrement/not null settings for mysql.  Use <sql> and re-specify all configuration if this is the case
...

WARN - ModuleFactory.startModuleInternal(792) |2021-12-16 16:36:40,603| Error while trying to start module: providermanagement
org.openmrs.api.db.DAOException: Error while running sql: CREATE TABLE providermanagement_provider_role (

                provider_role_id int(11) NOT NULL auto_increment,
                name varchar(255) NOT NULL,
                description varchar(1000),
                creator int(11) NOT NULL default '0',
                date_created datetime NOT NULL default '0000-00-00 00:00:00',
                changed_by int(11) default NULL,
                date_changed datetime default NULL,
                retired tinyint(1) NOT NULL default '0',
                retired_by int(11) default NULL,
                date_retired datetime default NULL,
                retire_reason varchar(255) default NULL,
                uuid char(38) NOT NULL,
                PRIMARY KEY (provider_role_id)
            ) ENGINE=InnoDB DEFAULT CHARSET=utf8 . Message: Invalid default value for 'date_created'
	at org.openmrs.util.DatabaseUtil.executeSQL(DatabaseUtil.java:141)
	at org.openmrs.api.db.hibernate.HibernateAdministrationDAO.executeSQL(HibernateAdministrationDAO.java:336)
	at org.openmrs.api.impl.AdministrationServiceImpl.executeSQL(AdministrationServiceImpl.java:799)
	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.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
	at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:96)
	at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:260)
	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:94)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
	at com.sun.proxy.$Proxy67.executeSQL(Unknown Source)
	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.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
	at org.openmrs.aop.LoggingAdvice.invoke(LoggingAdvice.java:121)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	at org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:51)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	at org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:51)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
	at com.sun.proxy.$Proxy89.executeSQL(Unknown Source)
	at org.openmrs.module.ModuleFactory.runDiff(ModuleFactory.java:944)
	at org.openmrs.module.ModuleFactory.startModuleInternal(ModuleFactory.java:720)
	at org.openmrs.api.context.Daemon$1.run(Daemon.java:70)
	
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Invalid default value for 'date_created'

	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:2825)
	at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2156)
	at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2441)
	at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2366)
	at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2350)
	at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:105)
	at org.openmrs.util.DatabaseUtil.executeSQL(DatabaseUtil.java:120)
	... 33 more
	
INFO - LoggingAdvice.invoke(115) |2021-12-16 16:36:40,643| In method AlertService.saveAlert. Arguments: Alert=Alert: #null, 
...

WARN - ModuleFactory.startModuleInternal(792) |2021-12-16 16:37:06,395| Error while trying to start module: idgen

org.openmrs.api.db.DAOException: Error while running sql: CREATE TABLE `idgen_identifier_source` (

			  `id` int(11) NOT NULL auto_increment,
			  `uuid` char(38) NOT NULL,
			  `name` varchar(255) NOT NULL,
			  `description` varchar(1000),
			  `identifier_type` int(11) NOT NULL default '0',
			  `creator` int(11) NOT NULL default '0',
			  `date_created` datetime NOT NULL default '0000-00-00 00:00:00',
			  `changed_by` int(11) default NULL,
  			  `date_changed` datetime default NULL,
			  `retired` tinyint(1) NOT NULL default 0,
			  `retired_by` int(11) default NULL,
  			  `date_retired` datetime default NULL,
  			  `retire_reason` varchar(255) default NULL,
			  PRIMARY KEY  (`id`),
			  KEY `id for idgen_identifier_source` (`id`),
			  KEY `identifier_type for idgen_identifier_source` (`identifier_type`),
			  KEY `creator for idgen_identifier_source` (`creator`),
			  KEY `changed_by for idgen_identifier_source` (`changed_by`),
			  KEY `retired_by for idgen_identifier_source` (`retired_by`),
			  CONSTRAINT `identifier_type for idgen_identifier_source` FOREIGN KEY (`identifier_type`) REFERENCES `patient_identifier_type` (`patient_identifier_type_id`),
			  CONSTRAINT `creator for idgen_identifier_source` FOREIGN KEY (`creator`) REFERENCES `users` (`user_id`),
			  CONSTRAINT `changed_by for idgen_identifier_source` FOREIGN KEY (`changed_by`) REFERENCES `users` (`user_id`),
			  CONSTRAINT `retired_by for idgen_identifier_source` FOREIGN KEY (`retired_by`) REFERENCES `users` (`user_id`)
			) ENGINE=InnoDB DEFAULT CHARSET=utf8 . Message: Invalid default value for 'date_created'
			
	at org.openmrs.util.DatabaseUtil.executeSQL(DatabaseUtil.java:141)
	at org.openmrs.api.db.hibernate.HibernateAdministrationDAO.executeSQL(HibernateAdministrationDAO.java:336)
	at org.openmrs.api.impl.AdministrationServiceImpl.executeSQL(AdministrationServiceImpl.java:799)
	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.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
	at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:96)
	at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:260)
	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:94)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	...
	
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Invalid default value for 'date_created'

	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:2825)
	at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2156)
	at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2441)
	at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2366)
	at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2350)
	at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:105)
	at org.openmrs.util.DatabaseUtil.executeSQL(DatabaseUtil.java:120)
	... 33 more
	
INFO - LoggingAdvice.invoke(115) |2021-12-16 16:37:06,408| In method AlertService.saveAlert. Arguments: Alert=Alert: #null, 
INFO - LoggingAdvice.invoke(155) |2021-12-16 16:37:06,409| Exiting method saveAlert
ERROR - ModuleFactory.startModules(236) |2021-12-16 16:37:06,412| Module Reference Metadata Module cannot be started because it requires the following module(s): org.openmrs.module.emrapi ${emrapiModuleVersion}, org.openmrs.module.idgen ${idgenModuleVersion} Please install and start these modules first.
INFO - LoggingAdvice.invoke(115) |2021-12-16 16:37:06,414| In method AlertService.saveAlert. Arguments: Alert=Alert: #null, 
INFO - LoggingAdvice.invoke(155) |2021-12-16 16:37:06,415| Exiting method saveAlert
ERROR - ModuleFactory.startModules(236) |2021-12-16 16:37:06,418| Module Reference Demo Data Module cannot be started because it requires the following module(s): org.openmrs.module.providermanagement 2.0, org.openmrs.module.referencemetadata 2.2}, org.openmrs.module.emrapi 1.5, org.openmrs.module.idgen 3.2 Please install and start these modules first.
INFO - LoggingAdvice.invoke(115) |2021-12-16 16:37:06,420| In method AlertService.saveAlert. Arguments: Alert=Alert: #null, 
INFO - LoggingAdvice.invoke(155) |2021-12-16 16:37:06,421| Exiting method saveAlert
INFO 12/16/21 4:37 PM:liquibase: liquibase.xml is using schema version 1.9 rather than version 2.0
ERROR - ModuleFactory.startModules(236) |2021-12-16 16:37:06,426| Module Registration Core Module cannot be started because it requires the following module(s): org.openmrs.module.idgen 4.3 Please install and start these modules first.
INFO - LoggingAdvice.invoke(115) |2021-12-16 16:37:06,428| In method AlertService.saveAlert. Arguments: Alert=Alert: #null, 
INFO - LoggingAdvice.invoke(155) |2021-12-16 16:37:06,429| Exiting method saveAlert
INFO 12/16/21 4:37 PM:liquibase: Reading from `liquibasechangelog`
INFO 12/16/21 4:37 PM:liquibase: Successfully acquired change log lock
INFO 12/16/21 4:37 PM:liquibase: liquibase.xml is using schema version 1.9 rather than version 2.0
INFO 12/16/21 4:37 PM:liquibase: Successfully released change log lock
INFO - LoggingAdvice.invoke(115) |2021-12-16 16:37:11,485| In method AdministrationService.saveGlobalProperty. Arguments: GlobalProperty=property: allergyapi.started value: true, 
INFO - LoggingAdvice.invoke(155) |2021-12-16 16:37:11,487| Exiting method saveGlobalProperty
INFO - LoggingAdvice.invoke(115) |2021-12-16 16:37:11,489| In method AdministrationService.saveGlobalProperty. Arguments: GlobalProperty=property: allergyapi.mandatory value: false, 
INFO - LoggingAdvice.invoke(155) |2021-12-16 16:37:11,490| Exiting method saveGlobalProperty
INFO 12/16/21 4:37 PM:liquibase: liquibase.xml is using schema version 1.9 rather than version 2.0
INFO 12/16/21 4:37 PM:liquibase: Reading from `liquibasechangelog`
INFO 12/16/21 4:37 PM:liquibase: Successfully acquired change log lock
INFO 12/16/21 4:37 PM:liquibase: liquibase.xml is using schema version 1.9 rather than version 2.0
INFO 12/16/21 4:37 PM:liquibase: Successfully released change log lock
INFO - LoggingAdvice.invoke(115) |2021-12-16 16:37:16,557| In method AdministrationService.saveGlobalProperty. Arguments: GlobalProperty=property: allergyui.started value: true, 
INFO - LoggingAdvice.invoke(155) |2021-12-16 16:37:16,558| Exiting method saveGlobalProperty
INFO - LoggingAdvice.invoke(115) |2021-12-16 16:37:16,560| In method AdministrationService.saveGlobalProperty. Arguments: GlobalProperty=property: allergyui.mandatory value: false, 
INFO - LoggingAdvice.invoke(155) |2021-12-16 16:37:16,562| Exiting method saveGlobalProperty
INFO 12/16/21 4:37 PM:liquibase: liquibase.xml is using schema version 1.9 rather than version 2.0
INFO 12/16/21 4:37 PM:liquibase: Reading from `liquibasechangelog`
INFO 12/16/21 4:37 PM:liquibase: Successfully acquired change log lock
INFO 12/16/21 4:37 PM:liquibase: liquibase.xml is using schema version 1.9 rather than version 2.0
INFO 12/16/21 4:37 PM:liquibase: Successfully released change log lock
INFO - LoggingAdvice.invoke(115) |2021-12-16 16:37:21,636| In method AdministrationService.saveGlobalProperty. Arguments: GlobalProperty=property: appframework.started value: true, 
INFO - LoggingAdvice.invoke(155) |2021-12-16 16:37:21,638| Exiting method saveGlobalProperty
INFO - LoggingAdvice.invoke(115) |2021-12-16 16:37:21,639| In method AdministrationService.saveGlobalProperty. Arguments: GlobalProperty=property: appframework.mandatory value: false, 
INFO - LoggingAdvice.invoke(155) |2021-12-16 16:37:21,640| Exiting method saveGlobalProperty
INFO - LoggingAdvice.invoke(115) |2021-12-16 16:37:21,647| In method AdministrationService.saveGlobalProperty. Arguments: GlobalProperty=property: formentryapp.started value: true, 
INFO - LoggingAdvice.invoke(155) |2021-12-16 16:37:21,649| Exiting method saveGlobalProperty
INFO - LoggingAdvice.invoke(115) |2021-12-16 16:37:21,650| In method AdministrationService.saveGlobalProperty. Arguments: GlobalProperty=property: formentryapp.mandatory value: false, 
INFO - LoggingAdvice.invoke(155) |2021-12-16 16:37:21,651| Exiting method saveGlobalProperty
INFO - LoggingAdvice.invoke(115) |2021-12-16 16:37:21,659| In method AdministrationService.saveGlobalProperty. Arguments: GlobalProperty=property: appui.started value: true, 
INFO - LoggingAdvice.invoke(155) |2021-12-16 16:37:21,661| Exiting method saveGlobalProperty
INFO - LoggingAdvice.invoke(115) |2021-12-16 16:37:21,663| In method AdministrationService.saveGlobalProperty. Arguments: GlobalProperty=property: appui.mandatory value: false, 
INFO - LoggingAdvice.invoke(155) |2021-12-16 16:37:21,665| Exiting method saveGlobalProperty
ERROR - ModuleFactory.startModules(236) |2021-12-16 16:37:21,667| Module Admin UI Module cannot be started because it requires the following module(s): org.openmrs.module.providermanagement 2.3 Please install and start these modules first.
INFO - LoggingAdvice.invoke(115) |2021-12-16 16:37:21,669| In method AlertService.saveAlert. Arguments: Alert=Alert: #null, 
INFO - LoggingAdvice.invoke(155) |2021-12-16 16:37:21,671| Exiting method saveAlert
ERROR - ModuleFactory.startModules(236) |2021-12-16 16:37:21,673| Module Core Apps Module cannot be started because it requires the following module(s): org.openmrs.module.emrapi ${emrapiVersion}, org.openmrs.module.idgen ${idgenVersion} Please install and start these modules first.
INFO - LoggingAdvice.invoke(115) |2021-12-16 16:37:21,676| In method AlertService.saveAlert. Arguments: Alert=Alert: #null, 
INFO - LoggingAdvice.invoke(155) |2021-12-16 16:37:21,677| Exiting method saveAlert
ERROR - ModuleFactory.startModules(236) |2021-12-16 16:37:21,680| Module Registration App Module cannot be started because it requires the following module(s): org.openmrs.module.registrationcore 1.4, org.openmrs.module.emrapi 1.2, org.openmrs.module.coreapps 1.6 Please install and start these modules first.
INFO - LoggingAdvice.invoke(115) |2021-12-16 16:37:21,682| In method AlertService.saveAlert. Arguments: Alert=Alert: #null, 
INFO - LoggingAdvice.invoke(155) |2021-12-16 16:37:21,684| Exiting method saveAlert
ERROR - ModuleFactory.startModules(236) |2021-12-16 16:37:21,687| Module Appointment Scheduling UI Module cannot be started because it requires the following module(s): org.openmrs.module.coreapps 1.8, org.openmrs.module.emrapi Please install and start these modules first.
INFO - LoggingAdvice.invoke(115) |2021-12-16 16:37:21,690| In method AlertService.saveAlert. Arguments: Alert=Alert: #null, 
INFO - LoggingAdvice.invoke(155) |2021-12-16 16:37:21,691| Exiting method saveAlert
ERROR - ModuleFactory.startModules(236) |2021-12-16 16:37:21,695| Module HTML Form Entry UI Framework Integration Module cannot be started because it requires the following module(s): org.openmrs.module.emrapi 1.12 Please install and start these modules first.
INFO - LoggingAdvice.invoke(115) |2021-12-16 16:37:21,698| In method AlertService.saveAlert. Arguments: Alert=Alert: #null, 
INFO - LoggingAdvice.invoke(155) |2021-12-16 16:37:21,700| Exiting method saveAlert
ERROR - ModuleFactory.startModules(236) |2021-12-16 16:37:21,704| Module Chart Search Module cannot be started because it requires the following module(s): org.openmrs.module.htmlformentryui 1.2, org.openmrs.module.emrapi 1.1 Please install and start these modules first.
INFO - LoggingAdvice.invoke(115) |2021-12-16 16:37:21,706| In method AlertService.saveAlert. Arguments: Alert=Alert: #null, 
INFO - LoggingAdvice.invoke(155) |2021-12-16 16:37:21,708| Exiting method saveAlert
ERROR - ModuleFactory.startModules(236) |2021-12-16 16:37:21,711| Module Reference Application Module cannot be started because it requires the following module(s): org.openmrs.module.htmlformentryui ${htmlformentryuiVersion} Please install and start these modules first.
INFO - LoggingAdvice.invoke(115) |2021-12-16 16:37:21,713| In method AlertService.saveAlert. Arguments: Alert=Alert: #null, 
INFO - LoggingAdvice.invoke(155) |2021-12-16 16:37:21,715| Exiting method saveAlert
INFO - LoggingAdvice.invoke(115) |2021-12-16 16:37:22,259| In method SchedulerService.saveToMemento. Arguments: 
INFO - LoggingAdvice.invoke(155) |2021-12-16 16:37:22,261| Exiting method saveToMemento
INFO - AbstractSessionFactoryBean.destroy(223) |2021-12-16 16:37:22,269| Closing Hibernate SessionFactory
INFO - ServiceContext.startRefreshingContext(902) |2021-12-16 16:37:22,274| Refreshing Context
INFO - LocalSessionFactoryBean.buildSessionFactory(780) |2021-12-16 16:37:27,084| Building new Hibernate SessionFactory
INFO - ServiceContext.doneRefreshingContext(913) |2021-12-16 16:37:33,544| Done refreshing Context

ERROR - UiFrameworkActivator.contextRefreshed(90) |2021-12-16 16:37:37,340| Error in UiContextRefreshedCallback: org.openmrs.ui.framework.StandardModuleUiConfiguration for module providermanagement
java.lang.NullPointerException

	at org.openmrs.module.ModuleFactory.getModuleClassLoader(ModuleFactory.java:1407)
	at org.openmrs.module.ModuleFactory.getModuleClassLoader(ModuleFactory.java:1428)
	at org.openmrs.ui.framework.StandardModuleUiConfiguration.afterContextRefreshed(StandardModuleUiConfiguration.java:77)
	at org.openmrs.module.uiframework.UiFrameworkActivator.contextRefreshed(UiFrameworkActivator.java:88)
	at org.openmrs.module.ModuleUtil.refreshApplicationContext(ModuleUtil.java:872)
	at org.openmrs.module.web.WebModuleUtil.refreshWAC(WebModuleUtil.java:962)
	at org.openmrs.web.Listener.performWebStartOfModules(Listener.java:627)
	at org.openmrs.web.Listener.performWebStartOfModules(Listener.java:606)
	at org.openmrs.web.Listener.startOpenmrs(Listener.java:249)
	at org.openmrs.web.WebDaemon$1.run(WebDaemon.java:42)
WARN - AllergyActivator.started(61) |2021-12-16 16:37:37,347| Failed to set the other non coded concept uuid

java.lang.IllegalStateException: Configuration required: allergy.concept.otherNonCoded

	at org.openmrs.module.allergyapi.AllergyProperties.getConceptByGlobalProperty(AllergyProperties.java:38)
	at org.openmrs.module.allergyapi.AllergyProperties.getOtherNonCodedConcept(AllergyProperties.java:72)
	at org.openmrs.module.allergyapi.AllergyActivator.started(AllergyActivator.java:58)
	at org.openmrs.module.ModuleUtil.refreshApplicationContext(ModuleUtil.java:876)
	at org.openmrs.module.web.WebModuleUtil.refreshWAC(WebModuleUtil.java:962)
	at org.openmrs.web.Listener.performWebStartOfModules(Listener.java:627)
	at org.openmrs.web.Listener.performWebStartOfModules(Listener.java:606)
	at org.openmrs.web.Listener.startOpenmrs(Listener.java:249)
	at org.openmrs.web.WebDaemon$1.run(WebDaemon.java:42)
WARN - OpenmrsUtil.getRuntimePropertiesFilePathName(2669) |2021-12-16 16:37:37,466| Unable to find a runtime properties file at /Users/barrylevine/OpenMRS/openmrs-runtime.properties
WARN - OpenmrsUtil.getRuntimePropertiesFilePathName(2669) |2021-12-16 16:37:37,516| Unable to find a runtime properties file at /Users/barrylevine/OpenMRS/openmrs-runtime.properties


OpenMRS is ready for you at http://localhost:8080/openmrs/

Replace the provider management module with the latest version: OpenMRS Add Ons

Well, the difficulties you’re encountering aren’t directly related to the SDK… As @dkayiwa mentioned, upgrading to newer versions of the affected modules will likely solve the issues.

The specific issue you’re having here is this:

Invalid default value for 'date_created'

And note that we’re trying to create the date_created field with the default value of '0000-00-00 00:00:00'. Most likely this is because you’re running an older version of OpenMRS against a newer version of MySQL, i.e., one where NO_ZERO_DATE is the default property (so MySQL 5.7+). This would make sense as MySQL 5.6 (the version that RefApp 2.4 was built to work against) reached it’s end of life in February, so it’s actually quite hard to get your hands on binaries for it.

Assuming you’re running MySQL 5.7, there are a few plausible ways to get things working: (1) install updated versions of the affected modules, (2) update the my.cnf file for your MySQL server to include the line sql_mode= (this will work if you’re using MySQL 5.7, but if you’re using MySQL 8+, it won’t), (3) install MySQL 5.6. Really the most reasonable way to get MySQL 5.6 is to install it via Docker. The SDK can do this for you if you ask it to use the MySQL 5.6 and above in SDK docker container (requires pre-installed Docker) option when setting up the server, but it can also be installed manually.

I just moved to ref app 2.10. Happily, all seems well! Many thanks for your help…

1 Like