on 2011 Jul 05 10:01 PM
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.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm use to older BlackBerry simulators/devices which have sane defaults for the permissions. Newer BlackBerry devices are like Androids and require resetting the permissions everytime you re-install the app. Argh!
Glad you solved it. Drop me or Tom a line about what your project is about - firstname.lastname at sybase.com. Best of luck on your project!
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
71 | |
11 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.