Having great difficulty getting started. Any help would be appreciated. I have reasonable basic Java SE skills and teach introductory Java course. I have also worked for years on other open-source projects but mostly in C++. I work mostly terminal/vi but have used Eclipse on larger projects. I have never used Maven or J2EE before. Xubuntu 17.10 64-bit.
I initially setup up my development environment using the PDF document openmrs-devmanual (Sept. 2017). I did the manual install instructions. Builds went fine but it did fail a test. However I could run the core application and got the initial screens. However the discovery of the complexity of this application made me realize I needed to use Eclipse to be productive.
In the mean time, I got a welcome message response which directed me to setup my development environment using https://wiki.openmrs.org/display/docs/Step+by+Step+Installation+for+Developers. I followed these instructions to setup a Eclipse environment. This went well except many compile errors indicted by Eclipse. It seems J2EE was needed. I added the jee jar to the project and it fixed those issues. This exposed other errors which seems to have exposed other errors. These seem to be Spring API errors. I have downloaded the Spring “bundle”, which it seems most I do not need. Many jars. I don’t know which one(s). to install.
Going back to my initial manual install (totally separate tree), it stopped running because of an port conflict with port 8080. I noticed Tomcat was using 8080 (which I optionally installed via the manual instructions) and I reconfigured Tomcat to use 8085. Why this install worked originally is quite strange. However when using starting this install (mvn jetty:run), I get this error:
[ERROR] Failed to execute goal org.eclipse.jetty:jetty-maven-plugin:9.3.3.v20150827:run (default-cli) on project openmrs-webapp: Failure: Address already in use -> [Help 1]
Going back through the trace, I don’t see any indication of what address they are referring to.
At this point, I have two failing installs. I would like to work in the Eclipse environment. I can start over again but I would like to know what I did wrong and which of the two sets of instructions should I use. I have already spent the equivalent of at least two full days getting this far. I also have all of this software on my system. I am not sure how well I can back it out.
Hi @bassdeal seems like you already have some other process listening on port 8080 still, did you make sure the tomcat process was killed off? You can also assign another port to jetty in the webapp/pom.xml file as mentioned here
Hello Willa. Thanks for your offer to help. Upon thought, I would like to get my Eclipse-setup working but maybe the manual setup (no Eclipse) will be enlightening.
I don’t think there is an address conflict. Below is the output of a relevant netstat command:
jdeal@:webapp$ netstat -lp | grep 80
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp6 0 0 [::]:8085 [::]:* LISTEN -
tcp6 0 0 localhost:8005 [::]:* LISTEN -
jdeal@:webapp$
I am not sure if this post should be part of this thread or a new thread. Anyway here goes.
Working on my Eclipse issue with trying to resolve the Spring errors. It seems I need the Spring jar files linked to my project. I have installed the Eclipse Spring plugin and have downloaded the Spring tool kit. There are many Spring jar files. I have added almost all of the Spring jar files I could find in the STS bundle. I could not find any Spring jar files with the “test” anywhere in the name since it seems this is one of the jar files the first error is looking for. Importing the jar files that I found did not seem to resolve any of the errors (at least as far as I can tell). I have a image of my Eclipse project showing some errors and some of the referenced Spring jar files OpenMRS Eclipse Spring Errors.
I have seen this failure before, with some people. But i have not got a chance to go through it more interactively on IRC with any reporter. Do you think you can ping me on IRC (dkayiwa) and we look at it?
Hi @dkayiwa
I am getting openmrs webapp Address already in use, after command mvn jetty:run
On my local server, default port 8080 is already in use and i don’t want to change that.
Can we change openmrs default server port 8080 to another port