Error while deploying openmrs war file

I’m getting this error while deploying openmrs war file on server . How can this be fixed? I changed the version of war.openmrs in openmrs-server properties file, yet I get the error.

Any help on this is appreciated.

Thank you :slight_smile:

May be you create a server which support another version of openmrs. Try to create a new server which supports the version of openmrs which you want to deploy

@rushikesh I am trying to fix a bug occurring on this particular version of openmrs. Also as far as I know this is the only version of openmrs running openmrs-core with version 2.2.x .Do you have any idea on version of openmrs that runs openmrs-core 2.2.1-SNAPSHOT? Could you suggest some other solution to fix this? :slight_smile:

@haripriya , can you be more detailed on what your trying to do , i mean can you list down the steps you were trying to carry out clearly ??

@mozzy The following are the steps I followed:

  1. Made changes to core and ran the command mvn clean package
  2. Copied the war file from openmrs-core\webapp\target and pasted it in the server
  3. changed the value of war.openmrs in openmrs-server properties file on server to 2.2.1-SNAPSHOT
  4. Ran the command mvn openmrs-sdk run: -DserverId=server and I get this error

@haripriya, if you want your changes to run on reff app, build a new server with a distribution for reff app 2.10-snapshot. it runs on platform 2.2

mvn openmrs-sdk:setup -Ddistro=referenceapplication:2.10-SNAPHOT

or if you specifically want the platform , build a new server that runs on platform 2.2

mvn openmrs-sdk:setup -Dplatform=2.2`

@mozzy I’m running these changes on Reff App 2.10.0-SNAPSHOT version of openmrs yet I’m encountering this error . I see that by default Reff app 2.10.0-Snapshot runs 2.2.0 version of openmrs-core. I made changes to this repo , and on building, it gives, 2.2.1-SNAPSHOT war file.

Did you take a look at openmrs-distro.properties from here? https://wiki.openmrs.org/display/docs/OpenMRS+SDK+Step+By+Step+Tutorials

@dkayiwa I updated the version of war.openmrs in openmrs-distro yet I get this error

Hey @haripriya, create a new server and instead of running command mvn clean package, run mvn clean install openmrs-sdk:run -DserverId=your_server_id . It will directly deploy openmrs core into your server, you don’t need to copy a war file.

@rushikesh I tried it the way you suggested, but I don’t think it’s deploying the war I want, as I don’t see any System.out.println’s I gave in the code.

@haripriya do you specifically want to run the changes in reff app ?

@mozzy Yes, I want to run it specifically on Reff App 2.10.0-SNAPSHOT

Now after changing the war file version in the distro-file for reff app 2.10 , Now just use that file ,to create a new server from scartch.

mvn openmrs-sdk:setup -Ddistro=<dirrectory>\openmrs-distro.properties

Like do not just run the same server , rather build another new server but using that very same distro-file created above for ref-app2.10 , but now after changing the core version

Thank you @mozzy . I tried it this way. It’s working :slight_smile:

1 Like