initialising the development environment

I have set an openMRS development environment but when it comes to initialization stage. I have entered the required credentials for the advanced option and root and the password created for mysql root user. then asked me to create anther user admin with password Admin but keeps bringing back the same page with the same options without any other errors thrown back. What could be the mistakes in my initialization methods

Sorry for this do you have mysql 5.6, 5.7 and above installed locally on your machine , do you mind sharing specif error message using pastebin.com

Yes i do have mysql 5.7.32 installed the actual error now its showing me are

There was an error while updating the database to the latest. file: org/openmrs/liquibase/snapshots/schema-only/liquibase-schema-only-2.3.x.xml. Error: java.time.LocalDateTime cannot be cast to java.lang.String See the error log for more details

There was an error while updating the database to the latest. file: org/openmrs/liquibase/updates/liquibase-update-to-latest-2.4.x.xml. Error: java.time.LocalDateTime cannot be cast to java.lang.String Error while trying to update to the latest database version

Share the full log, it will be better for us to track the bug ,feel free to use pastebin.com

That’s a bug i have noticed with openmrs-core master branch, we need to get this sorted asap, let me take a look

1 Like

Apache Maven 3.6.3 Maven home: /usr/share/maven Java version: 1.8.0_275, vendor: Private Build, runtime: /usr/lib/jvm/java-8-openjdk-amd64/jre Default locale: en_US, platform encoding: UTF-8 OS name: “linux”, version: “5.8.0-41-generic”, arch: “amd64”, family: “unix” [DEBUG] Created new class realm maven.api [DEBUG] Importing foreign packages into class realm maven.api [DEBUG] Imported: javax.annotation.* < plexus.core [DEBUG] Imported: javax.annotation.security.* < plexus.core [DEBUG] Imported: javax.enterprise.inject.* < plexus.core [DEBUG] Imported: javax.enterprise.util.* < plexus.core [DEBUG] Imported: javax.inject.* < plexus.core [DEBUG] Imported: org.apache.maven.* < plexus.core [DEBUG] Imported: org.apache.maven.artifact < plexus.core [DEBUG] Imported: org.apache.maven.classrealm < plexus.core [DEBUG] Imported: org.apache.maven.cli < plexus.core [DEBUG] Imported: org.apache.maven.configuration < plexus.core [DEBUG] Imported: org.apache.maven.exception < plexus.core [DEBUG] Imported: org.apache.maven.execution < plexus.core [DEBUG] Imported: org.apache.maven.execution.scope < plexus.core [DEBUG] Imported: org.apache.maven.lifecycle < plexus.core [DEBUG] Imported: org.apache.maven.model < plexus.core [DEBUG] Imported: org.apache.maven.monitor < plexus.core [DEBUG] Imported: org.apache.maven.plugin < plexus.core [DEBUG] Imported: org.apache.maven.profiles < plexus.core [DEBUG] Imported: org.apache.maven.project < plexus.core [DEBUG] Imported: org.apache.maven.reporting < plexus.core [DEBUG] Imported: org.apache.maven.repository < plexus.core [DEBUG] Imported: org.apache.maven.rtinfo < plexus.core [DEBUG] Imported: org.apache.maven.settings < plexus.core [DEBUG] Imported: org.apache.maven.toolchain < plexus.core [DEBUG] Imported: org.apache.maven.usability < plexus.core [DEBUG] Imported: org.apache.maven.wagon.* < plexus.core [DEBUG] Imported: org.apache.maven.wagon.authentication < plexus.core [DEBUG] Imported: org.apache.maven.wagon.authorization < plexus.core [DEBUG] Imported: org.apache.maven.wagon.events < plexus.core [DEBUG] Imported: org.apache.maven.wagon.observers < plexus.core [DEBUG] Imported: org.apache.maven.wagon.proxy < plexus.core [DEBUG] Imported: org.apache.maven.wagon.repository < plexus.core [DEBUG] Imported: org.apache.maven.wagon.resource < plexus.core [DEBUG] Imported: org.codehaus.classworlds < plexus.core [DEBUG] Imported: org.codehaus.plexus.* < plexus.core [DEBUG] Imported: org.codehaus.plexus.classworlds < plexus.core [DEBUG] Imported: org.codehaus.plexus.component < plexus.core [DEBUG] Imported: org.codehaus.plexus.configuration < plexus.core [DEBUG] Imported: org.codehaus.plexus.container < plexus.core [DEBUG] Imported: org.codehaus.plexus.context < plexus.core [DEBUG] Imported: org.codehaus.plexus.lifecycle < plexus.core [DEBUG] Imported: org.codehaus.plexus.logging < plexus.core [DEBUG] Imported: org.codehaus.plexus.personality < plexus.core [DEBUG] Imported: org.codehaus.plexus.util.xml.Xpp3Dom < plexus.core [DEBUG] Imported: org.codehaus.plexus.util.xml.pull.XmlPullParser < plexus.core [DEBUG] Imported: org.codehaus.plexus.util.xml.pull.XmlPullParserException < plexus.core [DEBUG] Imported: org.codehaus.plexus.util.xml.pull.XmlSerializer < plexus.core [DEBUG] Imported: org.eclipse.aether.* < plexus.core [DEBUG] Imported: org.eclipse.aether.artifact < plexus.core [DEBUG] Imported: org.eclipse.aether.collection < plexus.core [DEBUG] Imported: org.eclipse.aether.deployment < plexus.core [DEBUG] Imported: org.eclipse.aether.graph < plexus.core [DEBUG] Imported: org.eclipse.aether.impl < plexus.core [DEBUG] Imported: org.eclipse.aether.installation < plexus.core [DEBUG] Imported: org.eclipse.aether.internal.impl < plexus.core [DEBUG] Imported: org.eclipse.aether.metadata < plexus.core [DEBUG] Imported: org.eclipse.aether.repository < plexus.core [DEBUG] Imported: org.eclipse.aether.resolution < plexus.core [DEBUG] Imported: org.eclipse.aether.spi < plexus.core [DEBUG] Imported: org.eclipse.aether.transfer < plexus.core [DEBUG] Imported: org.eclipse.aether.version < plexus.core [DEBUG] Imported: org.fusesource.jansi.* < plexus.core [DEBUG] Imported: org.slf4j.* < plexus.core [DEBUG] Imported: org.slf4j.event.* < plexus.core [DEBUG] Imported: org.slf4j.helpers.* < plexus.core [DEBUG] Imported: org.slf4j.spi.* < plexus.core [DEBUG] Populating class realm maven.api [INFO] Error stacktraces are turned on. [DEBUG] Message scheme: color [DEBUG] Message styles: debug info warning error success failure strong mojo project [DEBUG] Reading global settings from /usr/share/maven/conf/settings.xml [DEBUG] Reading user settings from /home/favor/.m2/settings.xml [DEBUG] Reading global toolchains from /usr/share/maven/conf/toolchains.xml [DEBUG] Reading user toolchains from /home/favor/.m2/toolchains.xml [DEBUG] Using local repository at /home/favor/.m2/repository [DEBUG] Using manager EnhancedLocalRepositoryManager with priority 10.0 for /home/favor/.m2/repository [INFO] Scanning for projects… [DEBUG] Could not find metadata javax.annotation:javax.annotation-api/maven-metadata.xml in local (/home/favor/.m2/repository) [DEBUG] Skipped remote request for javax.annotation:javax.annotation-api/maven-metadata.xml, locally cached metadata up-to-date. [DEBUG] Using transporter WagonTransporter with priority -1.0 for https://mavenrepo.openmrs.org/nexus/content/repositories/public [DEBUG] Using connector BasicRepositoryConnector with priority 0.0 for https://mavenrepo.openmrs.org/nexus/content/repositories/public Downloading from openmrs-repo: https://mavenrepo.openmrs.org/nexus/content/repositories/public/javax/annotation/javax.annotation-api/maven-metadata.xml Downloaded from openmrs-repo: https://mavenrepo.openmrs.org/nexus/content/repositories/public/javax/annotation/javax.annotation-api/maven-metadata.xml (612 B at 175 B/s) [DEBUG] Writing tracking file /home/favor/.m2/repository/javax/annotation/javax.annotation-api/resolver-status.properties [DEBUG] Resolved plugin version for javax.annotation:javax.annotation-api to 1.3.2 from repository openmrs-repo (https://mavenrepo.openmrs.org/nexus/content/repositories/public, default, releases) [DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=1138212, ConflictMarker.markTime=897352, ConflictMarker.nodeCount=1, ConflictIdSorter.graphTime=767022, ConflictIdSorter.topsortTime=652438, ConflictIdSorter.conflictIdCount=1, ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=8381751, ConflictResolver.conflictItemCount=1, DefaultDependencyCollector.collectTime=5602989, DefaultDependencyCollector.transformTime=14488812} [DEBUG] javax.annotation:javax.annotation-api:jar:1.3.2 [DEBUG] org.codehaus.plexus:plexus-utils:jar:1.1:runtime [DEBUG] Created new class realm extension>javax.annotation:javax.annotation-api:1.3.2 [DEBUG] Importing foreign packages into class realm extension>javax.annotation:javax.annotation-api:1.3.2 [DEBUG] Imported: < maven.api [DEBUG] Populating class realm extension>javax.annotation:javax.annotation-api:1.3.2 [DEBUG] Included: javax.annotation:javax.annotation-api:jar:1.3.2 [DEBUG] Included: org.codehaus.plexus:plexus-utils:jar:1.1 [DEBUG] Extension realms for project org.openmrs.web:openmrs-webapp:war:2.5.0-SNAPSHOT: [ClassRealm[extension>javax.annotation:javax.annotation-api:1.3.2, parent: sun.misc.Launcher$AppClassLoader@1b6d3586]] [DEBUG] Created new class realm project>org.openmrs.web:openmrs-webapp:2.5.0-SNAPSHOT [DEBUG] Populating class realm project>org.openmrs.web:openmrs-webapp:2.5.0-SNAPSHOT [DEBUG] Included: javax.annotation:javax.annotation-api:jar:1.3.2 [DEBUG] Looking up lifecycle mappings for packaging war from ClassRealm[project>org.openmrs.web:openmrs-webapp:2.5.0-SNAPSHOT, parent: ClassRealm[maven.api, parent: null]] [DEBUG] Extension realms for project org.openmrs:openmrs:pom:2.5.0-SNAPSHOT: (none) [DEBUG] Looking up lifecycle mappings for packaging pom from ClassRealm[plexus.core, parent: null] [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 4.500 s [INFO] Finished at: 2021-01-27T12:16:16+03:00 [INFO] ------------------------------------------------------------------------ [ERROR] No goals have been specified for this build. You must specify a valid lifecycle phase or a goal in the format : or :[:]:. Available lifecycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-clean, clean, post-clean, pre-site, site, post-site, site-deploy. → [Help 1] org.apache.maven.lifecycle.NoGoalSpecifiedException: No goals have been specified for this build. You must specify a valid lifecycle phase or a goal in the format : or :[:]:. Available lifecycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-clean, clean, post-clean, pre-site, site, post-site, site-deploy. at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:97) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192) at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105) at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957) at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289) at org.apache.maven.cli.MavenCli.main (MavenCli.java:193) at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke (Method.java:498) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282) at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406) at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347) [ERROR] [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/NoGoalSpecifiedException favor@CFL-SUB-LAP-001:~/github/OPENMRS/openmrs-core/webapp$

Joe When will this be sorted? Any clues? Like how long will it take for this master branch bug issue to be sorted? Thanks

I have found that building against the most recent stable release, v2.4.0, solves the issue – as opposed to building against master directly.

@favor, git checkout v2.4.0, build the war once more, then try to initialize your openmrs once more. Issue goes away for me.

I am working on fixing master, you could work with a lower version until we fix this blocker if you don’t have to require master

@dkayiwa, @burke, @wyclif, @ibacher, liquibase added support for java.sql.Types.TIMESTAMP_WITH_TIMEZONE (CORE-3525) since Release v3.10.2 · liquibase/liquibase · GitHub which causes this failure with master since it’s on 3.10.3 and our liquibasechangelog#dateexecuted uses plain text of format yyyy-MM-dd while the updated mysql-connector#8.0.23 uses a getObject(columnIndex) call on a DATETIME column which returns a LocalDateTime object now instead of a String as before.

The temporal solution is downgrading liquibase or mysql-connector until Bad cast in StandardChangeLogHistoryService.getRanChangeSets() · Issue #1647 · liquibase/liquibase · GitHub is fixed. after the fix we may still be required to set server timedate format generation to “yyyy-MM-dd HH:mm:ss” considering liquibase/StandardChangeLogHistoryService.java at master · liquibase/liquibase · GitHub

1 Like

I have just reverted what caused this problem: Revert "maven(deps-dev): bump mysql-connector-java from 8.0.22 to 8.0.23" by dkayiwa · Pull Request #3684 · openmrs/openmrs-core · GitHub

So update your code and all should be well.

@k.joseph this is exactly what i talked about a few days ago regarding the need to have tests that run against MySQL to catch such bugs. Like i said on that thread, this does not fail on PostgreSQL.

2 Likes

now that we have caught this one, we need to fix it to support the upgrade. am sure we are going to have these tests soon through the ongoing QA work

BTW, is dependency updating done automatically by a bot?

It just raises a pull request for us to review and merge if we find it appropriate.

i have edited my above comment to include details, can i take a look at the PR @dkayiwa

i think upgrading the connector to 8.0.23 can cause this until liquibase handles this issue

1 Like

Actually i found out that depedant bot sometime pushes commits that fail the travis

So i think someone to merge as usually @dkayiwa does it need to first review, thanks to @dkayiwa i dont recommend new small orgs to use dependant bot especially when they depend on openmrs code base :upside_down_face:

@k.joseph @dkayiwa Has this bug been fixed yet? Because whenever I try to run openmrs-core, this same error is displayed. However, my initialization setup was successful. The error is displayed when I run openmrs-core after building and open openmrs on localhost. I am using mysql 5.6

I reverted the change some time back. You therefore should not get any problems if you are running the latest of the master branch.