Hi, I need some help, hopefully someone can help me get over this error as I have tried searching Sybase documentation but can't find a solution to it.
I have already setup my mobiLink server to listen using HTTP protocol at Port 80 (When I deploy the Synchronization Model) and use the .bat file to startup the mobiLink server. The server is up and running but when it hits conn.synchronize() method, I was thrown with an error.
SyncParms syncParms = conn.createSyncParms(SyncParms.HTTP_STREAM, "OPS_ML_USER", "OPS_SYNC_SCRIPT_VERSION" ); StreamHTTPParms streamParms = syncParms.getStreamParms(); streamParms.setHost("10.0.2.2"); streamParms.setPort(80); conn.synchronize(syncParms); << ---- Error got thrown in my Android Logcat when it hits this line.
Error display at the Logcat: 07-05 16:07:45.532: VERBOSE/com.test.ops.dbase.PersonDB(339): com.ianywhere.ultralitejni12.implementation.JniException: UltraLiteJ Error[-1305]: MobiLink communication error -- code: 58, parameter: , system code: %3
I am running my code (UltraliteJ) in Android Emulator and using SQL Anywhere 12.0.1.
Is there anything that I have done wrong. Please help me. Thanks.
asked 05 Jul '11, 21:01
MobiLink communication error code 58 is "unable to create a TCP/IP socket" (see http://dcx.sybase.com/index.html#1201/en/saerrors/mlcommerr58.html).
That makes me wonder if you have given your application permission to access the Internet. One symptom of this cause is that you see the error on synchronize() thrown immediately the function is called in your code (rather than, for example, after some timeout).
To give your application permission to access the Internet, open your AndroidManifest.xml file, click Permissions on the tabs (along the bottom), click Add and choose "Uses Permission" from the list in the modal dialog. You are given a dropdown list; select android.permission.INTERNET.
answered 05 Jul '11, 21:36
The first step would be to check the MobiLink log to see if the client attempted to connect.
Double check the MobiLink batch file to ensure it is using "-x http".
Using the browser on the emulator, can you reach the MobiLink server?
Where you able to get the tutorial to work?
Another thing that frequently happens when using port 80 is that the port may already be in use (IIS on Windows). Make sure MobiLink launched properly and stayed up.
Hi, thanks for the reply :)
The following is the startup script: mlsrv12 -v+ -zu+ -c "DSN=OPS_DSN;UID=OPS;PWD=PASSWORD" -x http(port=80) -ot ml.mls
When I try http://10.0.2.2:80 on the emulator browser, it shows the following error: Document Not Found The document cannot be found
I manage to get CustDB to sync on my android.
I follow all the steps to setup the synchronization model and deploy it to get the .bat files.
Kindly advise. Thanks.
answered 05 Jul '11, 21:52
Thank you all for helping me. :)
I manage to solve the problem. I found out that I have not grant INTERNET permission to my app.
answered 05 Jul '11, 22:13