Application Name: SDK
Version Number: 3.0.0
Question:
Is it normal that I am getting this all of a sudden when starting Jetty?
The JDK 1.7.0_79 is not compatible with OpenMRS Platform 2.3. Please use JDK 1.8 to run this server.
Upgrading to Java 8 solves the above strictly speaking, but it still breaks my dev environment since I cannot remote debug anymore in Eclipse.
I thought perhaps my sources where out of sync with the JARs previously built with Java 7 so I rebuilt the Platform and my module in development with Java 8, to no avail.
I keep looking but if anyone could save those frustrating hours of plumbing that I have not asked for, I would be really grateful!
P.S. Moreover I believe that ‘OpenMRS Platform 2.3.’ is not a valid reference. I am in fact running the Ref App distro 2.3 on Platform 1.11.4. All this was working perfectly fine with Java 7 until this morning.
During development of SDK, format of server properties file had been changed. SDK 2.x has bug, it saves version of distribution as openmrs.platform.version. Now, if you set up your server with SDK 2.x and try to run it with SDK 3.0, it reads version of reference application as version of platform, and shows error. Unfortunately your use case had been overlooked. SDK 3.1 is going to be released very soon and certainly it will fix some problems with compability, we’re sorry for inconvenience.
It is recommended to setup new server with SDK 3.0, but if you don’t want to do it, go to openmrs/{serverId}/ in your home directory, and edit openmrs-server.properties file (if there isn’t any, open installation.properties). Set openmrs.version to 2.3 and openmrs.platform.version to 1.11.4 (basically switch it). After you save changes and run server again, all should work fine.
@darius this message you got is intentional. Again, it is recommended to setup new server with SDK 3.0. During setup, user can choose JDK he/she wants to use when running particular instance of OpenMRS. I think @raff can explain purpose of this design much better than me.
@mksd I’m sorry for the inconvenience. To address your other issue with debugging please see updated instructions at http://om.rs/sdk. In short you either need to connect to your server using a remote debugger or run the server with -Dfork=false.
@darius, I’ve experienced a number of issues when running RefApp with Java 8, thus wanted to prevent users from going that path. From previous conversations I understood we don’t plan to fix 1.x platform releases to be runnable on Java 8, thus I didn’t even report the issues.
Just wanted to update you that in SDK 3.1 we will make it just a recommendation to use JDK 7 with platform 1.x instead of a strict requirement so you will be able to use JDK 8 for platform 1.x.
Thanks, I’ll appreciate this. (So you know, my use case is that I don’t necessarily care about having the entire reference application run correctly, but I may just want to see how a particular module behaves, and I don’t want to have to switch between Java versions.)
I don’t know if the duplication of reporting is a bug or a feature.
Broadly I don’t know how the different properties files are used, and I don’t know what the different lines in openmrs-server.properties mean. It’s probably worth documenting this on the wiki.
For reference, I had a run configuration in IntelliJ that used to work for remote debuggin in SDK 2.x, with -Xmx2048m -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000. Now, however, when I run this it looks like:
/Library/Java/JavaVirtualMachines/jdk1.7.0_75.jdk/Contents/Home/bin/java -Xmx2048m -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 “-Dmaven.home=/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3” “-Dclassworlds.conf=/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3/bin/m2.conf” -Didea.launcher.port=7532 “-Didea.launcher.bin.path=/Applications/IntelliJ IDEA.app/Contents/bin” -Dfile.encoding=UTF-8 -classpath “/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3/boot/plexus-classworlds-2.4.jar:/Applications/IntelliJ IDEA.app/Contents/lib/idea_rt.jar” com.intellij.rt.execution.application.AppMain org.codehaus.classworlds.Launcher -Didea.version=2016.1.2 openmrs-sdk:run -DserverId=reporting
Listening for transport dt_socket at address: 8000
and it hangs there. To make this work in SDK 3.0 I had to set up a run configuration with:
Command line: openmrs-sdk:run -DserverId=reporting -Dfork=false
VM options: -Xmx2048m -XX:PermSize=256m -XX:MaxPermSize=512m