The following error code is generated when we run the Android Java code for the synchronization:
com.ianywhere.ultralitejni12.implementation.JniException: UltraLiteJ Error[-1305]: MobiLink communication error -- code: 63, parameter: , system code: 101
This is a network level error, right? Source: http://dcx.sybase.com/index.html#1201/en/saerrors/mlcommerr63.html Due to a lack of knowledge of the hardware side, we don't know how to solve this. Which steps have we missed out?
Below some more information how we set up the server and client environment:
SQLAnywhere consolidated (server) database
We use SQL Anywhere database as the consolidated database. This database is set up using the Sybase Central application. We did the following actions:
We made a new Mobilink project using the Sybase Central application create project wizard.
Ultralite remote (client) database
For the client database we use UltraliteJ with Android OS. The local database was created using Java code. We have generated a publication using the following Java code:
String createQuery = "CREATE PUBLICATION IF NOT EXISTS ActionsPubs (TABLE action, TABLE actionParameter)"; PreparedStatement ps = connection.prepareStatement(createQuery);
We connect using the SyncParms from the UltraliteJ API:
Connection conn = DatabaseManager.getConnection(context); createPublications(conn); SyncParms syncParms = conn.createSyncParms(SyncParms.HTTP_STREAM, config.getUsername(), "1.0" ); syncParms.setPassword(config.getPassword()); syncParms.setPublications(publications); StreamHTTPParms streamParms = (StreamHTTPParms) syncParms.getStreamParms(); streamParms.setHost("220.127.116.11"); streamParms.setPort(config.getPortNumber()); //portnumber is 3306 conn.synchronize( syncParms );
So when we debug, we get the error mentioned above after passing the conn.synchronize(syncParms); line.
Is there any advice on where to look and check for this problem? Thanks in advance!
The problem is finally solved with the help of Bill Frier, Jeff Albion, Andy Quick and Volker Barth. I will summarize below what I have changed during problem solving.
From this point I have connection the Mobilink server, but I get other errors.
So after these changes I am able to synchronize between the Android Ultralite remote database and the SQLAnywhere database. Thanks to all the persons who contributed in this thread!
Being a gateway machine, does this mean it has two or more NICs? If yes, MobiLink may not be listening on the one you expect. Try specifying the HTTP (or HTTPS) host option. Something like,
mlsrv12 -c "dsn=mobiel-cmp;uid=xxx;pwd=xxx" -x http(host=18.104.22.168;port=3306)
The host option is used to specify the host name or IP number on which the MobiLink server should listen. The way I read your question, you want the ML server to listen on the public IP. In the sample mlsrv12 command line above, that is done with,
It is common to want the ML server and its consolidated database behind a firewall. In such a case you would would specify the internal IP and port and ensure that your router/firewall allows the communication to get through or use something such as Sybase Relay Server to relay the communication across the firewall without the need to open any inbound ports.
StreamHTTPParms streamParms = (StreamHTTPParms) syncParms.getStreamParms(); streamParms.setHost("22.214.171.124"); streamParms.setPort(config.getPortNumber()); mlsrv12 -c "dsn=mobiel-cmp;uid=xxx;pwd=xxx" -x tcpip(port=3306)
You're requesting HTTP synchronization from your UltraLiteJ client code (which is the only protocol UltraLiteJ supports), but starting a regular TCP listener (-x tcpip) on your MobiLink server. You'll need to start the HTTP protocol instead, using "-x http":
mlsrv12 -c "dsn=mobiel-cmp;uid=xxx;pwd=xxx" -x http(port=3306)
answered 23 Dec '11, 10:57
Yes, this is a network error. Please provide details about the MobiLink server and client. Is the UltraLiteJ application running in the emulator? Or, is it running on a device? If so, what is the network being used? Is the server reachable via that IP address from a web browser? Thanks.
answered 22 Dec '11, 14:50