Platform 2.4 Release: To-do's and release discussions thread

It should work in Git Bash, but the Windows equivalent is dir *.txt (or gci *.txt if you’re into PowerShell).

I see. I didn’t mean to copy 2.4.0-alpha.2.war file, I meant to download this text file and move it into that directory as databaseupdater.patch.txt.

@ibacher the patch file is there and the
git apply --ignore-whitespace databaseupdater.patch.txt works but on running the deploy command to the server it fails with a missing license header. I have added a license header in the txt file but it still complains about the missing license header Cliff@Cliff-PC MINGW64 ~/Desktop/New folder (2)/openmrs-core (2.4.x)$ git ap - Pastebin.com

@wolf that seems to have fixed it! Or, at least, I got by the liquibase errors and am on to debugging other errors… looks like there are a fair amount of modules we use (not in the Ref App) that need there moduleApplicationContext.xml changed to switch “ref local” to “ref bean”:

fyi @ibacher @dkayiwa… will continue to work through this when I get a chance and keep you posted…

thanks @mogoodrich for the feedback on your testing

Thanks for the update, @mogoodrich :slight_smile:

Both files you shared contain org/openmrs/liquibase/updates/liquibase-update-to-latest-2.0.x.xml in the library openmrs-api-2.4.0-alpha.jar so the error message

Error: org\openmrs\liquibase\updates\liquibase-update-to-latest-2.0.x.xml does not exist

is misleading.

Could you please let me know when you are getting the error message? A detailed list of the commands you are executing would allow me to reproduce this on my machine.

@ibacher @dkayiwa I’m wondering, do we have any documentation anywhere of “things you may need to change in your modules to make them compatibility with Core 2.4.x”?

Thanks, Mark

You should be able to safely delete the .txt file after running the git apply command. Sorry, should’ve included that in my instructions!

thanks @wolf

this error comes up when i run a server that i have set up with the command mvn openmrs-sdk:run -DserverId=myserver

error logs here

We don’t, but we probably should. For the most part, the necessary changes are pretty trivial and (should be) fully backwards compatible, unless you’re running a version of OpenMRS prior to 1.9.x.

The most common issue was the one fixed in this commit. Basically, if you have a line like this in your webModuleApplicationContext.xml file, remove it:

<bean class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping"/>

The other common one was that the local attribute in Spring XML files has been completely removed from the <ref> element so if you have a ref like this one:

<ref local="providerSuggestionService"/>

Replace it with:

<ref bean="providerSuggestionService"/>

Both of those things were deprecated in Spring 3, but only removed in Spring 5.

If you have any of the OpenMRS version-specific annotations or version strings in the config.xml make sure that they are updated to include 2.4.* as well.

The main changes for 2.4 were:

  • Migrated to Spring 5 from Spring 4. See their update guide.
  • Migrated to Hibernate 5 from Hibernate 4. See their migration guide.
  • Migrated to Liquibase 3.10.0. This is (hopefully) largely an invisible change to modules, but if you have an explicit dependency on any of the old Liquibase extensions, that dependency should be removed.
  • Migrated from Log4J to Log4J2. Again (hopefully) this is an invisible change, unless a module is manipulating logging configuration in code (e.g., changing logging levels, etc.). If a module is doing that, the code will likely need to be completely re-written, as the internal APIs of Log4J2 are a complete overhaul. Anything that worked using SLF4J (preferred) or Apache Commons Logging should continue to work.

This query on GitHub should find most of the relevant commits made to the modules under the OpenMRS organization.

This post is now available, in a slightly expanded format, as a Wiki page.

2 Likes

@herbert24 @jennifer or anyone else: If I wanted to convert this post into a Wiki page, where would be a logical place to put it?

How about a page under this? Supporting different OpenMRS versions - Documentation - OpenMRS Wiki

1 Like

Which versions did you use to set up the server pls? Could you share the respective commands as well?

hello @wolf

  1. I run mvn openmrs-sdk:setup which requested me to set up a serverId and i did.

  2. I then selected Distribution of type >ReferenceApplication 2.11.0-SNAPSHOT which generated the server with the latest 2.4.0-alpha.2 war file

  3. i then run the server with mvn openmrs-sdk:run -DserverId=serverId

@ibacher on applying the patch and deleting the txt file after the apply command the maven builds fail ,

still investigating how to fix this

@gcliff according to the discussion we had on the documentation call, @cliff we agreed that you add the link for this thread to the release notes. cc @jennifer @ibacher

sure https://wiki.openmrs.org/display/RES/Platform+Release+Notes+2.4.0

@ibacher @dkayiwa it solved the issue i was facing

kindly checkout the log details Cliff@Cliff-PC MINGW64 ~/Desktop/project/openmrs-core (2.4.x)$ git reset --h - Pastebin.com

1 Like

Thanks @gcliff! I’ll get that merged into the repo. Sorry for the confusing process, I just didn’t want to commit something I wasn’t sure would solve the problem.

1 Like

@ibacher thanks for the help.

may be for learning and study purposes could you throw in some light on how you knew the right fix and where to apply the patch

Thanks