Failed parsing JSON source

165 views
Skip to first unread message

Paulo Henrique Cardoso Alves

unread,
Feb 1, 2012, 7:41:54 PM2/1/12
to sana-developers
Hello,

I'm not able to upload the phone to patients in OpenMRS.
The error message is:

E/MDSInterface(235): postResponses(): Error parsing MDS JSON response:
Failed parsing JSON source: java.io.StringReader@43800370 to Json

What can I do to fix it?

Thanks,

Eric Winkler

unread,
Feb 1, 2012, 8:24:51 PM2/1/12
to sana-de...@googlegroups.com
Hi Paulo,
Please send the following information:

1. Client version
2. mds version.

It will help if you can also send a few more lines from the device logcat output. After that, you may need to dig around in the mds logs. Will be happy to help on the last one if you need some more info.
Best,
Eric
PS If you are concerned about posting any of the log files publicly, feel to send directly.

Paulo Henrique Cardoso Alves

unread,
Feb 1, 2012, 8:42:34 PM2/1/12
to sana-de...@googlegroups.com
Hi Eric

version:
mds: 1.1
client: the latest available in the repository

which logs should I send to help us solve this problem?

Thanks

2012/2/1 Eric Winkler <winkl...@gmail.com>

Eric Winkler

unread,
Feb 1, 2012, 8:57:05 PM2/1/12
to sana-de...@googlegroups.com
Hi Paulo,
The device log which is accessible with the logcat command. For the mds log, if you got to:


You should see what looks like a list of items similar to this

01/21/2012 04:50:48/mds/json/procedure/submit/ 0.7129s

If you mouse click on the last item, which should be the last encounter you sent, it should drop down and you will see some additional lines similar to:

+0.489s openmrs.py:256  Validating permissions to manage sana queue
+0.491s openmrs.py:260  Got result {"status":"OK","code":"unspecified","message":"User has Manage Sana Queue privileges"}
+0.491s openmrs.py:267  Uploading procedure
+0.491s openmrs.py:279  Encoded parameters, checking files.
+0.491s openmrs.py:292  About to post to http://sana-demo.mit.edu:8081/openmrs/moduleServlet/moca/uploadServlet
+0.712s openmrs.py:294  Got result {"status":"FAIL","code":"unspecified","message":"Concept Undefined: (execute, Press button to calculate BP)"}
+0.712s openmrs.py:300  Done with upload
+0.713s api.py:307  API: RESULT = False
+0.713s json.py:229  Failed to register procedure: sp.pk -> 371, Concept Undefined: (execute, Press button to calculate BP) 

What you are looking for is to see how far the message gets up the chain; i.e. did it actually make it to openmrs, fail at the mds level, no error on the server, etc. Let me know if you have more questions.
Eric

Paulo Henrique Cardoso Alves

unread,
Feb 1, 2012, 9:10:58 PM2/1/12
to sana-de...@googlegroups.com
Hi Eric,

I can not access http://myIp/mds/log
but I can get the message "Sanamobile MDS: Online" through http://myIp:8000

The log on which I have access is http://myIp:8000/log

How I can pass for you the full address of my server in private?

Thanks,
Reply all
Reply to author
Forward
0 new messages