openmrs-core failing to start-up

Hi everyone, Tried to start up openmrs-core from the repository and running into some failures related to openmrs.person_attribute_type table.

Just cloned the latest codes, then build and mvn jetty:run Gives the following stracktrace

"ERROR - Slf4JLogger.log(39) |2025-05-19T11:47:18,850| ChangeSet liquibase-update-to-latest.xml::1::upul encountered an exception. liquibase.exception.DatabaseException: Table 'openmrs.person_attribute_type' doesn't exist [Failed SQL: (1146) ALTER TABLE openmrs.person_attribute_type ADD edit_privilege VARCHAR(255) NULL] at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:497) ~[liquibase-core-4.31.1.jar:?] at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:83) ~[liquibase-core-4.31.1.jar:?] at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:185) ~[liquibase-core-4.31.1.jar:?] at liquibase.executor.AbstractExecutor.execute(AbstractExecutor.java:141) ~[liquibase-core-4.31.1.jar:?] at liquibase.database.AbstractJdbcDatabase.executeStatements(AbstractJdbcDatabase.java:1189) ~[liquibase-core-4.31.1.jar:?] at liquibase.changelog.ChangeSet.execute(ChangeSet.java:790) ~[liquibase-core-4.31.1.jar:?] at liquibase.changelog.visitor.UpdateVisitor.executeAcceptedChange(UpdateVisitor.java:126) ~[liquibase-core-4.31.1.jar:?] at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:70) ~[liquibase-core-4.31.1.jar:?] at org.openmrs.util.DatabaseUpdater$OpenmrsUpdateVisitor.visit(DatabaseUpdater.java:879) ~[classes/:?] at liquibase.changelog.ChangeLogIterator.lambda$run$0(ChangeLogIterator.java:133) ~[liquibase-core-4.31.1.jar:?] at liquibase.Scope.lambda$child$0(Scope.java:201) ~[liquibase-core-4.31.1.jar:?] at liquibase.Scope.child(Scope.java:210) ~[liquibase-core-4.31.1.jar:?] at liquibase.Scope.child(Scope.java:200) ~[liquibase-core-4.31.1.jar:?] at liquibase.Scope.child(Scope.java:179) ~[liquibase-core-4.31.1.jar:?] at liquibase.changelog.ChangeLogIterator.lambda$run$1(ChangeLogIterator.java:122) ~[liquibase-core-4.31.1.jar:?] at liquibase.Scope.lambda$child$0(Scope.java:201) ~[liquibase-core-4.31.1.jar:?] at liquibase.Scope.child(Scope.java:210) ~[liquibase-core-4.31.1.jar:?] at liquibase.Scope.child(Scope.java:200) ~[liquibase-core-4.31.1.jar:?] at liquibase.Scope.child(Scope.java:179) ~[liquibase-core-4.31.1.jar:?] at liquibase.Scope.child(Scope.java:267) ~[liquibase-core-4.31.1.jar:?] at liquibase.Scope.child(Scope.java:271) ~[liquibase-core-4.31.1.jar:?] at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:91) ~[liquibase-core-4.31.1.jar:?] at org.openmrs.util.DatabaseUpdater.executeChangelog(DatabaseUpdater.java:245) ~[classes/:?] at org.openmrs.util.DatabaseUpdater.executeChangelog(DatabaseUpdater.java:189) ~[classes/:?] at org.openmrs.util.DatabaseUpdater.executeChangelog(DatabaseUpdater.java:153) ~[classes/:?] at org.openmrs.api.context.Context.checkForDatabaseUpdates(Context.java:1238) ~[classes/:?] at org.openmrs.api.context.Context.startup(Context.java:941) ~[classes/:?] at org.openmrs.web.Listener.startOpenmrs(Listener.java:344) ~[classes/:?] at org.openmrs.web.WebDaemon.lambda$startOpenmrs$0(WebDaemon.java:42) ~[classes/:?] at org.openmrs.api.context.Daemon.lambda$runInDaemonThreadInternal$5(Daemon.java:452) ~[classes/:?] at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?] at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?] at java.base/java.lang.Thread.run(Thread.java:829) [?:?] Caused by: java.sql.SQLSyntaxErrorException: Table 'openmrs.person_attribute_type' doesn't exist at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120) ~[mysql-connector-java-8.0.30.jar:8.0.30] at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122) ~[mysql-connector-java-8.0.30.jar:8.0.30] at com.mysql.cj.jdbc.StatementImpl.executeInternal(StatementImpl.java:763) ~[mysql-connector-java-8.0.30.jar:8.0.30] at com.mysql.cj.jdbc.StatementImpl.execute(StatementImpl.java:648) ~[mysql-connector-java-8.0.30.jar:8.0.30] at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:491) ~[liquibase-core-4.31.1.jar:?] ... 34 more "

@wikumc @mherman22 @dkayiwa @ibacher

walk us through the steps you take to arrive here. After running mvn jetty:run, do you go to the browser and try to access this link https://localhost:8080/openmrs/initialsetup? Do you choose simple or advanced? etc

I choosed simple, then gave the database credentials. At the moment even deleting the database, start from fresh it’ goes to this page without asking for setup option. Note: I am running mysql:8.2.0 on docker.

I have just cloned core and built it, then went into mysql and dropped a database called openmrs, then triggered mvn jetty:run in /webapp and it worked out fine. Maybe you have a database named β€˜openmrs’ ?

Is it fine to drop it? if ofcourse its not a database you are using in production?

1 Like

You have to delete the ~/.OpenMRS directory aswell

2 Likes

Thx! @mherman22 I removed the ~/.OpenMRS directory and it starts now.

3 Likes