Unable to start OpenMRS 2.x alongside SDK

OpenMRS: newest release cloned from 1.11.0-beta + reference application cloned from 2.2

I have followed the instructions of setting up 2.x development enviroment, cloned core, cloned reference app, used the script to copy the modules to the module directory - and when I’m starting webapp using jetty:run, it throws an exception:

Unable to start OpenMRS. Error thrown was: org.openmrs.api.APIException: Service not found: interface org.openmrs.scheduler.SchedulerService

and the webapp does not start. After a long search I’ve found that removing htmlformentry-2.5.omod module makes it start, but then it fails to load any of these 2.x modules (as one can see on the attached image).

I have literally just followed these three steps and have no idea what could go wrong.

log without module: log_without_module - Pastebin.com log with module: log with module - Pastebin.com

I am complete beginner with OpenMRS and will be grateful for any help.

Jack,

Do you mind trying again without using a beta version of 1.11?

@dkayiwa It doesn’t work with any version, I’ve tried them all.

What errors do you get on running it with 1.11.3?

The errors remain the same

@jacek, do you have the same issue when using the sdk?

@raff I don’t understand. I’ve used SDK and it works (it generates all the files), but it doesn’t start webapp, so it doesn’t show these errors.

EDIT: Ok, I got it running by

mvn openmrs-sdk:setup
mvn openmrs-sdk:run

I guess it solves the problem, but can I use it like that? (I mean: is there any difference between normal

mvn jetty:run

and that, any drawbacks of using sdk to run it?)

openmrs-sdk:run calls jetty:run under the hood. The main difference is that jetty:run can be only run from the openmrs-core/webapp directory, whereas openmrs-sdk:run can be run from any directory as it uses the war file from maven repository (you don’t even have to have the openmrs-core code cloned). Thus, it is more convenient for module development.

In addition you can setup many instances of OpenMRS using openmrs-sdk:setup and run them by specifying serverId. We also provide extra tooling for those instances like installing modules openmrs-sdk:install-module, resetting DB openmrs-sdk:reset and so on.