How do I use the Reference Application Module from github(https://github.com/openmrs/openmrs-module-referenceapplication) in my OpenMRS-2.3.1 client? I tried placing the .omod file in the modules directory and also uploading the .omod file in the Manage Modules page but both are causing OpenMRS to hang.
There is no such thing as “OpenMRS 2.3.1”. What you seem to have is Reference Application 2.3.1, which already includes the Reference Application module in the bundle. Hope that helps!
I do realize that. What I was trying to do is remove/unload the already existing Reference Application Module and use the developer version from github. However, doing this caused OpenMRS to hang.
Perhaps take a look at https://wiki.openmrs.org/display/docs/Reference+Application+dev+environment+setup and make sure you have the other correct dependencies?
Meanwhile others might be able to help you with troubleshooting the startup issues if you can provide any error logs.
I have attached the log of the OpenMRS prompt that arrives after the ./run-on-unix.sh is executed. log.txt (9.8 KB)
@venkatp1997 in general it is not recommended to start/stop modules through the user interface in production because module dependencies can get complex when it comes to installations with multiple interdependent modules. The reference application modules have multiple complex dependencies and you should never stop any.
Then, can you suggest a way to test the developer version of the Reference Application module?
@venkatp1997 the idea is that you shouldn’t stop/restart/upgrade modules through the web UI, but instead you should manually copy your new version of the omod file into your .OpenMRS/modules folder, and then restart jetty/tomcat.
I did the following steps:
- Unzip OpenMRS-standalone 2.3.1.zip
- Place the .omod file into openmrs-standalone-2.3.1/appdata/modules
- Executed run-on-unix.sh
Waited for 10 minutes but OpenMRS is not starting. Log attached. log.txt (9.8 KB)
@venkatp1997 you shouldn’t really be swapping module versions in the reference application unless you fully understand all the module dependencies to figure out which module you can upgrade/downgrade without breaking others. Each release of the reference application has specific module versions it runs against, and switching any single module version will potentially break things (as you’ve noticed) because a single module upgrade can lead to a chain of other modules you have to upgrade, too.
Typically, if you want to test the latest build of a given module you need to get the entire latest suite of all the reference application module builds and this is something only developers can really do.
If you want to try it out you need to checkout the refapp distro project, build it to generate the latest openmrs.war file and ref app modules that you can deploy.
Thanks a lot! It built successfully using the method suggested above. Just took a bit of time to do as I had to set my university’s proxy in a number of places.
Just a small question, is there a way to speed up this process i.e every time I change some lines in the reference application module I have to do: In the module directory:
- mvn clean
- mvn clean install
- Copy the .omod file to the distro. In the distro directory:
- vagrant halt (If vagrant is running currently)
- vagrant up
- vagrant provision (takes ~6 mins to complete)
One approach is that instead of using the vagrant approach, you run the reference application using the OpenMRS SDK. (It should be faster to restart an SDK server than to reprovision a vagrant box.)
With the SDK, you can set up “UI Framework Development Mode” so that if you’re making changes to GSP files or controllers, you don’t have to restart at all. See the watch command in the SDK.
Hot deployment of gsp pages, JS, CSS, fragment and page controllers is supported without requiring a restart, see this page for details
@darius @wyclif I checkedout the refapp distro project and built it. Then I unzipped referenceapplication-package-2.4-SNAPSHOT and copied all the modules in to /home/.OpenMRS/modules. Then coppied the openmrs-1.11.5.war file in to tomcat/webapps. Also I renamed it to openmrs.war. Then I ran tomcat. It went through the process to install openmrs. But when updating the database in the last step, it get stucked some where near 45%. There is a long tomcat log. I have attached a part of it. openmrs-errorlog.txt (245.7 KB) Can you please help me to solve this.
I tried it with the .war from the master branch of openmrs-core. Now the intialization was fine. But it doesn’t load the modules which I coppied before into modules. Now it gives this openmrserrorlog-with-2.1.0snapshot.txt (1.7 KB) in the tomcat. What should I do to resolve this. @dkayiwa your thoughts are also welcome.
You shouldn’t be swapping the war file, you need to use the one from the ref app build. I’ve actually just built and run the ref app distro successfully, you might to update the distro project and try again with the generated war file and modules.
@wyclif Did u work with the master branch? I use tomcat 7 and java8. What do you use? Also do I have to copy openmrs-1.11.5.war into tomcat/webapps folder and use it?
Now I was able to run it with vagrant box. Can you please give me the default credentials. admin, Admin123 doesn’t work.
Yes it was the master branch of the reference application distro