OpenMRS Android Error: Cannot find server

Hello community members,

I have openmrs manual install running on my laptop on jetty and I can access the webpage using

http://localhost:8080/openmrs.

I have done the import of demo data into mysql as well from the web login.

Laptop IP address : 192.168.0.100

So to connect to this server I entered URL as http://192.168.0.100:8080/openmrs and I get error in jetty

WARN - DispatcherServlet.noHandlerFound(1120) |2015-06-13 15:05:01,106| No mapping found for HTTP request with URI [/openmrs/ws/rest/v1/location] in DispatcherServlet with name ‘openmrs’

And the android app shows the dialog.

Server error error occurred. Please check the URL or internet connection and try again.


Thanks & Regards, Vishal Moorthy

did you installed the rest module ? its required.

Nope. I didn’t come across any mentioning of installing rest module in getting started or android related documentation. Can u provide me with link to install which module and installation details.

Just found a link hopefully I am going in the right path

REST module

https://wiki.openmrs.org/display/docs/REST+Module

Installation

Adding a Web Service Step by Step Guide for Core Developers - Documentation - OpenMRS Wiki

To test Android Client you can login to our test server at http://devtest04.openmrs.org:8080/openmrs or you can setup your local server by following this recipe:

1 Like

I was able to connect test server on the first try but the next day it started throwing EOFException by volley.

The standalone server is giving the following error. The following error occurred at startup:

Failed to read candidate component class: URL [jar:file:/home/vishal/Projects/git/OpenMRS/SDK/openmrs-standalone-2.2/openmrs-standalone.jar!/org/openmrs/standalone/MainFrame.class]; nested exception is org.springframework.core.NestedIOException: ASM ClassReader failed to parse class file - probably due to a new Java class file version that isn’t supported yet: class path resource [javax/swing/JFrame.class]; nested exception is java.lang.IllegalArgumentException

Can you try again with a version of Java lower than 8? https://wiki.openmrs.org/display/docs/OpenMRS+Standalone

1 Like

:grinning: Yup its working :grinning:

I was running java 8, shifting to java 7 worked.

1 Like

@veeshal To successfully allow your Android phone to make requests to a local OpenMRS instance running on your laptop, you will have to disable the “Multi-AP Isolation”/ “AP Isolation” security feature of your wireless router.

Read more about AP Isolation here: http://www.ehow.com/info_12180751_ap-isolation.html