Skip to content

STAND-130: Upgrade Standalone 3.x to use OpenMRS 2.8.x+ and switch SQL import to MariaDbController#88

Merged
dkayiwa merged 4 commits intoopenmrs:openmrs-emr3from
Muta-Jonathan:STAND-130
Aug 19, 2025
Merged

STAND-130: Upgrade Standalone 3.x to use OpenMRS 2.8.x+ and switch SQL import to MariaDbController#88
dkayiwa merged 4 commits intoopenmrs:openmrs-emr3from
Muta-Jonathan:STAND-130

Conversation

@Muta-Jonathan
Copy link
Member

See https://openmrs.atlassian.net/browse/STAND-130

Description

  • Updated Standalone to build against OpenMRS Platform 2.8.x to fix SQLSyntaxErrorException on column RESERVED in 3.x.
  • Replaced ScriptRunner-based SQL import with MariaDbController's source method for more reliable database initialization.
  • Updated SQL dump files from 3.4.0 to 3.6.0-SNAPSHOT to match the latest Reference Application distribution.

Screen Record for Demo dump 3.6.0-SNAPSHOT

Screencast.from.19-08-25.16.35.37.webm

Screen Record for Empty dump 3.6.0-SNAPSHOT

Screencast.from.19-08-25.16.38.43.webm

pom.xml Outdated

<tomcat.version>9.0.106</tomcat.version>
<openmrs.version>2.7.4</openmrs.version>
<openmrs.version>2.8.0-SNAPSHOT</openmrs.version>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2.8.0 was released

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let me switch to it

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dkayiwa addressed it

@Muta-Jonathan
Copy link
Member Author

Muta-Jonathan commented Aug 19, 2025

@dkayiwa let me refine it more just noticed can instead of use pom.xml defines instead of manually building and installing the war

 <dependency>
            <groupId>org.openmrs.distro</groupId>
            <artifactId>platform</artifactId>
            <version>${openmrs.version}</version>
            <type>war</type>
            <scope>provided</scope>
 </dependency>

@Muta-Jonathan
Copy link
Member Author

Tested and also works fine
Screenshot from 2025-08-19 17-22-32

cc @dkayiwa

@dkayiwa
Copy link
Member

dkayiwa commented Aug 19, 2025

Do we still need demodatabase.zip and emptydatabase.zip?

@dkayiwa
Copy link
Member

dkayiwa commented Aug 19, 2025

Are we also dealing with java.sql.SQLSyntaxErrorException: Unknown column 'RESERVED' in 'WHERE'?

@Muta-Jonathan
Copy link
Member Author

Do we still need demodatabase.zip and emptydatabase.zip?

Sure yes these are unziped according to the selected option and they contain the sql respectively.... kept them zipped for a better experience and familiar wise to the user

@Muta-Jonathan
Copy link
Member Author

Are we also dealing with java.sql.SQLSyntaxErrorException: Unknown column 'RESERVED' in 'WHERE'?

Sure yes am planning to create a separate PR to addresss it after this goes in

@dkayiwa
Copy link
Member

dkayiwa commented Aug 19, 2025

Are you able to run this? mvn package -Drefapp.version=3.5.0-rc.2

@Muta-Jonathan
Copy link
Member Author

Are you able to run this? mvn package -Drefapp.version=3.5.0-rc.2

Failing on my side

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for referenceapplication-standalone 3.0.0-SNAPSHOT:
[INFO] 
[INFO] referenceapplication-standalone .................... SUCCESS [  0.588 s]
[INFO] referenceapplication-standalone-zip-stage .......... FAILURE [01:21 min]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  01:21 min
[INFO] Finished at: 2025-08-19T21:35:37+03:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.openmrs.maven.plugins:openmrs-sdk-maven-plugin:6.5.0:generate-distro (openmrs-sdk:generate-distro) on project referenceapplication-standalone-zip-stage: Unable to find/resolve artifact.: Could not find artifact org.openmrs:distro-emr-configuration:zip:3.5.0-rc.2 in openmrs-repo (https://mavenrepo.openmrs.org/public) -> [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
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command

Let me investigate it shortly

@Muta-Jonathan
Copy link
Member Author

Sure @dkayiwa just seen here https://openmrs.jfrog.io/ui/native/public/org/openmrs/distro-emr-configuration/ version 3.5.0-rc.2 was never published seems to be missing

@dkayiwa dkayiwa merged commit e4c0929 into openmrs:openmrs-emr3 Aug 19, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants