Skip to content

Commit 3ea40b3

Browse files
STAND-132: Fix java.sql.SQLSyntaxErrorException: Unknown column 'RESERVED' in 'WHERE' in Openmrs Platform Standalone (#90)
* STAND-117: Update CIEL version and Openmrs Version> 2.8.0-alpha in the standalone Platform pom * STAND-132: Fix java.sql.SQLSyntaxErrorException: Unknown column 'RESERVED' in 'WHERE' in Platform Standalone
1 parent 6fc342c commit 3ea40b3

File tree

15 files changed

+29
-29
lines changed

15 files changed

+29
-29
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ NOTE: Without this folder structure, you will get errors while trying to run the
225225

226226
## DATABASE CONNECTION STRING
227227

228-
jdbc:mysql://127.0.0.1:3316/openmrs?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8
228+
jdbc:mariadb://127.0.0.1:3316/openmrs?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8
229229
The above default database connection string has all in the openmrs mysql default database connection and is used for the MariaDB connection.
230230

231231

packagezip.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ cp ../target/openmrs.war tomcat/webapps/openmrs.war
2828
echo "application_data_directory=appdata" >> openmrs-runtime.properties
2929
echo "reset_connection_password=true" >> openmrs-runtime.properties
3030
echo "tomcatport=8081" >> openmrs-runtime.properties
31-
echo "connection.url=jdbc:mysql://localhost:3316/openmrs?" >> openmrs-runtime.properties
31+
echo "connection.url=jdbc:mariadb://localhost:3316/openmrs?" >> openmrs-runtime.properties
3232
echo "connection.username=openmrs" >> openmrs-runtime.properties
3333
echo "connection.password=Admin123" >> openmrs-runtime.properties
3434

pom-step-01.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,9 @@
8484
<id>empty-db-create-schema</id>
8585
<phase>generate-resources</phase>
8686
<configuration>
87-
<driver>com.mysql.cj.jdbc.Driver</driver>
87+
<driver>org.mariadb.jdbc.Driver</driver>
8888
<changeLogFile>liquibase-schema-only.xml</changeLogFile>
89-
<url><![CDATA[jdbc:mysql://127.0.0.1:33326/openmrs?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8]]></url>
89+
<url><![CDATA[jdbc:mariadb://127.0.0.1:33326/openmrs?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8]]></url>
9090
<username>openmrs</username>
9191
<password>test</password>
9292
<verbose>true</verbose>
@@ -110,9 +110,9 @@
110110
<id>empty-db-add-core-data</id>
111111
<phase>generate-resources</phase>
112112
<configuration>
113-
<driver>com.mysql.cj.jdbc.Driver</driver>
113+
<driver>org.mariadb.jdbc.Driver</driver>
114114
<changeLogFile>liquibase-core-data.xml</changeLogFile>
115-
<url><![CDATA[jdbc:mysql://127.0.0.1:33326/openmrs?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8]]></url> <username>openmrs</username>
115+
<url><![CDATA[jdbc:mariadb://127.0.0.1:33326/openmrs?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8]]></url> <username>openmrs</username>
116116
<password>test</password>
117117
<verbose>true</verbose>
118118
<dropFirst>false</dropFirst>

pom-step-02.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@
106106
<classpathScope>runtime</classpathScope>
107107
<arguments>
108108
<argument>${project.build.directory}/ciel-sql/openmrs_concepts_${ciel.dictionary.openmrs.version}_${ciel.dictionary.version}.sql</argument>
109-
<argument><![CDATA[jdbc:mysql://127.0.0.1:33326/openmrs?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8]]></argument>
109+
<argument><![CDATA[jdbc:mariadb://127.0.0.1:33326/openmrs?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8]]></argument>
110110
<argument>openmrs</argument>
111111
<argument>test</argument>
112112
</arguments>
@@ -122,10 +122,10 @@
122122
<id>empty-db-add-ciel-data</id>
123123
<phase>generate-resources</phase>
124124
<configuration>
125-
<driver>com.mysql.cj.jdbc.Driver</driver>
125+
<driver>org.mariadb.jdbc.Driver</driver>
126126
<searchPath>${project.build.directory}/liquibase</searchPath>
127127
<changeLogFile>liquibase-ciel-data.xml</changeLogFile>
128-
<url><![CDATA[jdbc:mysql://127.0.0.1:33326/openmrs?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8]]></url>
128+
<url><![CDATA[jdbc:mariadb://127.0.0.1:33326/openmrs?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8]]></url>
129129
<username>openmrs</username>
130130
<password>test</password>
131131
<verbose>true</verbose>

pom-step-03.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@
4343
<id>empty-db-update-to-latest</id>
4444
<phase>generate-resources</phase>
4545
<configuration>
46-
<driver>com.mysql.cj.jdbc.Driver</driver>
46+
<driver>org.mariadb.jdbc.Driver</driver>
4747
<changeLogFile>liquibase-update-to-latest.xml</changeLogFile>
48-
<url><![CDATA[jdbc:mysql://127.0.0.1:33326/openmrs?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8]]></url>
48+
<url><![CDATA[jdbc:mariadb://127.0.0.1:33326/openmrs?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8]]></url>
4949
<username>openmrs</username>
5050
<password>test</password>
5151
<verbose>true</verbose>

pom-step-04.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
<classpathScope>runtime</classpathScope>
8787
<arguments>
8888
<argument>${project.basedir}/large-demo-data-2-7-0.sql</argument>
89-
<argument>jdbc:mysql://localhost:33328/openmrs</argument>
89+
<argument>jdbc:mariadb://localhost:33328/openmrs</argument>
9090
<argument>openmrs</argument>
9191
<argument>test</argument>
9292
</arguments>

pom-step-05.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@
4343
<id>demo-db-update-to-latest</id>
4444
<phase>generate-resources</phase>
4545
<configuration>
46-
<driver>com.mysql.cj.jdbc.Driver</driver>
46+
<driver>org.mariadb.jdbc.Driver</driver>
4747
<changeLogFile>liquibase-update-to-latest.xml</changeLogFile>
48-
<url><![CDATA[jdbc:mysql://127.0.0.1:33328/openmrs?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8]]></url>
48+
<url><![CDATA[jdbc:mariadb://127.0.0.1:33328/openmrs?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8]]></url>
4949
<username>openmrs</username>
5050
<password>test</password>
5151
<verbose>true</verbose>

pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
<liquibase.demodata.archive>large-demo-data-2-7-0.sql.zip</liquibase.demodata.archive>
3333
<liquibase.cieldata.filename>liquibase-ciel-data.xml</liquibase.cieldata.filename>
3434

35-
<openmrs.version>2.8.0-alpha</openmrs.version>
35+
<openmrs.version>2.8.1-SNAPSHOT</openmrs.version>
3636
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
3737
<tomcat.version>9.0.106</tomcat.version>
3838
<junitVersion>5.12.2</junitVersion>
@@ -60,9 +60,9 @@
6060
<scope>compile</scope>
6161
</dependency>
6262
<dependency>
63-
<groupId>mysql</groupId>
64-
<artifactId>mysql-connector-java</artifactId>
65-
<version>8.0.30</version>
63+
<groupId>org.mariadb.jdbc</groupId>
64+
<artifactId>mariadb-java-client</artifactId>
65+
<version>3.5.4</version>
6666
<scope>compile</scope>
6767
</dependency>
6868
<dependency>

readme.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ splashscreen-loading.png This is the splash screen displayed on startup. It c
140140

141141
............... DATABASE CONNECTION STRING.......................
142142

143-
jdbc:mysql://127.0.0.1:3316/openmrs?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8
143+
jdbc:mariadb://127.0.0.1:3316/openmrs?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8
144144

145145
The above default database connection string has all in the openmrs mysql default database connection string used for a MariaDB
146146
connection

src/main/config/openmrs-runtime.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
module.allow_web_admin=true
44
# this connection url is copied several times in pom.xml, with the directory changed from database to emptydatabase and 3316 changed to 3326.
55
# If you change the property here, make sure to change it there too.
6-
connection.url=jdbc:mysql://127.0.0.1:3316/openmrs?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull
6+
connection.url=jdbc:mariadb://127.0.0.1:3316/openmrs?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull
77
connection.username=openmrs
88
auto_update_database=false
99
connection.password=test

0 commit comments

Comments
 (0)