Fail to run mandatory module Sync

Hello, I have cloned and run OpenMRS version 2.7.0 in Docker. I am attempting to run the Sync2-1.7.0 module, but OpenMRS failed to start. Could it be a version compatibility issue? I’m sharing the log with you at Sync module failed to start -

Oh sorry for the error @aluckenson! kindly ensure that the ‘sync’ module is compatible with the version of OpenMRS you are using. If it’s not, you may need to update the module or use a different version of OpenMRS that is compatible with the ‘sync’ module. Besides, basing on this link Tags · openmrs/openmrs-module-sync2 · GitHub the latest version is sync2 module is 1.6.0 and not 1.7.0.

I run this version Tags · openmrs/openmrs-module-sync2 · GitHub it still failled.

2023-10-12 09:44:47 ERROR - Listener.contextInitialized(258) |2023-10-12T13:44:47,571| Failed to obtain JDBC connection
2023-10-12 09:44:47 org.openmrs.module.ModuleException: Unable to start OpenMRS. Error thrown was: org.openmrs.module.MandatoryModuleException: The following modules are marked as 'mandatory' but were unable to start: sync
2023-10-12 09:44:47     at org.openmrs.web.WebDaemon.startOpenmrs( ~[openmrs-web-2.7.0-SNAPSHOT.jar:?]
2023-10-12 09:44:47     at org.openmrs.web.Listener.contextInitialized( [openmrs-web-2.7.0-SNAPSHOT.jar:?]
2023-10-12 09:44:47     at org.apache.catalina.core.StandardContext.listenerStart( [catalina.jar:9.0.80]
2023-10-12 09:44:47     at org.apache.catalina.core.StandardContext.startInternal( [catalina.jar:9.0.80]

Oh sorry! The error message you provided indicates that there are multiple issues.

  1. Failed to obtain JDBC connection: This error suggests that there is an issue with your database connection. Here are some steps to address it:
    a.Check your database configuration in your application to ensure it’s pointing to the correct database server, username, and password.
    b. Make sure your database server is running and accessible.
    c. Verify that the JDBC driver for your database is available and correctly configured.d. Check for any database connection pool configuration to ensure it’s set up correctly.
  2. MandatoryModuleException for ‘sync’: This error indicates that the ‘sync’ module is marked as mandatory but failed to start. To address this:
    a. Verify if the ‘sync’ module is correctly installed and its dependencies are met.
    b. Check if there are any configuration issues with the ‘sync’ module, such as database settings, configurations, or missing files.
    c. Try disabling the ‘sync’ module temporarily to see if it allows OpenMRS to start, and then investigate the ‘sync’ module separately to fix the issue.
  3. Timezone Issue: The timestamps in the error log show a time zone difference. It’s possible that the server is running in a different time zone than expected. Make sure the server’s time and time zone settings are correct.

After fixing these issues, you may need to restart your application to see if it starts without errors. If you’re still facing problems, please provide more details about your setup, including the database and ‘sync’ module configurations, to receive more specific assistance.

I think there is some version mismatch going on here. The Sync2 module requires the following module versions to work on 2.7.0, i guess since i tried adding the sync2 module on refapp 2.13.0 running on the snapshot of platform 2.7.0 and it failed to start requiring the modules below and those versions ;-

  • fhir 1.18.0
  • atomfeed 1.0.12

Back to the version of sync2 you attempted to run, it requires the properties or module versions as shown here.

I think we would to make sure the sync2 module can run on OpenMRS-2.7.0.(not sure how possible that is since the fhir module was archived :smiling_face_with_tear:

The other way i guess would be to lower the OpenMRS version you’re trying to run it on since by the time development on that module started, the latest version OpenMRS 2.0.x - (Sync 2.0 for OpenMRS 2.2 - #5 by alalo)

Also, you can take a look at these posts;-