Getting set up to develop in the Reference Application

I am having trouble set up to work in the Reference Application in order to work on the issues reported here:

I’ve tried to follow the directions for setting up OpenMRS 2.X at https://wiki.openmrs.org/display/projects/Setting+Up+a+Development+Environment+for+OpenMRS+2.x. I can run openmrs-core with jetty, but I get a notice that “There was an error starting the module: Reference Application Module.”

Is there somewhere else that has directions for how to get started working on the reference application? I did some previous work that just involved running openmrs-core, but getting set up for 2.X is eluding me.

The current stable platform version for the reference application is the 1.11.x branch. Do you think you can try it out again with this branch?

That being said, we are also working on stabilizing it on the master branch. So, can you share the entire log that will help us figure out what the problem is?

1 Like

I think you need to share the full error logs, it could be that you are running an older version of another module or missing a certain module.

By the way Cliff, talk.openmrs.org is for discussions, when seeking help you need to post your questions at ask.openmrs.org

Thanks. I will ask my questions in ask.openmrs.org.

It seems to me that developing with the legacy UI was easier, if I’m not mistaken the best way to fix issues for the reference application is:

  • Have the standalone + all the modules installed
  • Have the ref app module sources in the IDE
  • Fix issue => generate omod => deploy omod in the modules folder

Am I right? Or can it be improved?

@lluismf – For changes in controllers and gsps, you do not need to generate and deploy the omod when using the VM option specified at https://wiki.openmrs.org/display/projects/Setting+Up+a+Development+Environment+for+OpenMRS+2.x

If you run with VM options like:

-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000

You can connect to your OpenMRS instance from the IDE and hence get changes in other non controller classes get reflected in the running application without having to first generate and deploy the module. This uses the standard Java Hot Swap. Though the standard Java Hot Swapping is limited to simply changing method bodies without structural changes (like adding new methods and fields) getting detected. If you want those too, you could use DCEVM or spring-loaded.

Do you use DCEVM or spring-loaded with OpenMRS?

spring-loaded