cancel
Showing results for 
Search instead for 
Did you mean: 

MobiLink communication error Android development SUP

Former Member
0 Kudos

Does anyone have any idea about this error:

05-08 20:27:33.690: W/System.err(5059): Caused by: com.ianywhere.ultralitejni12.implementation.JniException: UltraLiteJ Error[-1305]: MobiLink communication error -- code: 63, parameter: , system code: 111

We have been trying to pull data from the Unwired Server Platform to our android app, but so far it does not work.

We have followed the sample codes that SUP provide.  But when we run the sample application, we got the above error.

Any help and info regarding this error is greatly appreciated.

Thanks,

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Tai,

To me it looks like there is some problem at the code level it self, you can have a lookinto my recent blog post http://scn.sap.com/community/mobile/blog/2012/05/02/sup-212-native-android-mbo-non-doe-based-approac...

That might be helpful.

Regards,

Srinivas Divakarla

Former Member
0 Kudos

thanks for your post Srinivas, the issue is resolved now

However, I still could not get the device to synchronize with the remote server correctly.

The error code I got is:

05-09 01:54:34.240: W/System.err(4952): com.sybase.persistence.SynchronizeException: com.ianywhere.ultralitejni12.implementation.JniException: UltraLiteJ Error[-1497]: The synchronization failed because MobiLink returned authentication status '4' with value '4000'

I googled it and it seems like we need to set up a mobile link user name on the remote database and register it on the consolidated database

Have you ever run into this problem as well?

Thanks for your help.

Former Member
0 Kudos

I didn't came across this particular issue, but I think there is something wrong at client code level only.

Are you able to register the application successfully ?

rakshit_doshi
Active Contributor
0 Kudos

Even i am facing with the same error..The device is going online but i dont think its getting registered..

Former Member
0 Kudos

My similar problem is not yet resolved i think now  we need to set up a mobile link user name on the remote database and register it on the consolidated database.

Anyone knows how to do above setup???

midhun_vp
Active Contributor
0 Kudos

Hi tai

I got the same error as yours

UltraLiteJ Error[-1497]: The synchronization failed because MobiLink returned authentication status '4' with value '4000'

how you solved it?

Former Member
0 Kudos

Hi Tai Bo,

I have the same error MobiLink communication error -- code: 63, parameter: , system code: 110

when I try to lounch native Android App via Internet. Via wi-fi everything is ok.

Could you tell how you resolved problem?

Thanks, Sergey

Answers (1)

Answers (1)

Former Member
0 Kudos

Even i am facing with the same error..The device is going online but mobilink communcation error is coming when calling synchronize() first time.

com.sybase.persistence.SynchronizeException: com.ianywhere.ultralitejni12.implementation.JniException: UltraLiteJ Error[-1305]: MobiLink communication error -- code: 57, parameter: HOST, system code: 0Details:

StreamErrorCode = 57

StreamErrorMessage = HOST

I am stuck in this now. I have done all modifications you have suggested. Host i am providing the relay server URL and port number is 80.

Former Member
0 Kudos

Hi Mayur,

I managed to fix the mobillnk communication error, thanks to Srinivas's post. 

One thing I would suggest is to make sure that the ports for synchronization are open. (By default, i think port 2480 for http and port 2481 for https)

you can use a website like yougetsignal.com to check if those ports are open on your server.

If they are not open, mobile link error can occur.

Hope this helps.

Former Member
0 Kudos

Hello Tai,

Just a quick question, when you refer to ports 2480 and 2481, can you please clarify if you are referring to SUP ports or Relay Sever ports. I have the same problem from post 4 days and I am unable to solve this.

My Relay Server is on our corporate network DMZ with port 80 and 443 opened and i have installed SUP in an internal network which talks to RS.

rakshit_doshi
Active Contributor
0 Kudos

Hi Nagesh,

If you are using relayserver then you should not use port 2480 and 2481.

You will used port 80 of the relayserver instead for the port 2480 and 443 for 2481.

2480 and 5001 are used only when you are directly connecting to the SUP Server.

Hope this helps

Former Member
0 Kudos

Got that.

Thanks Rakshit.

midhun_vp
Active Contributor
0 Kudos

Rakshit,

I tried with 2480 then am getting the error-Caused by: com.ianywhere.ultralitejni12.implementation.JniException: UltraLiteJ Error[-1497]: The synchronization failed because MobiLink returned authentication status '4' with value '4000'

WHEN I TRIED WITH port 5000 i got the error "address protocol not supported"

Do you have any solution for this?

midhun_vp
Active Contributor
0 Kudos

Rakshit,

I tried with 2480 then am getting the error-Caused by: com.ianywhere.ultralitejni12.implementation.JniException: UltraLiteJ Error[-1497]: The synchronization failed because MobiLink returned authentication status '4' with value '4000'

WHEN I TRIED WITH port 5000 i got the error "address protocol not supported"

Do you have any solution for this?

midhun_vp
Active Contributor
0 Kudos

I tried with 2480 then am getting the error-Caused by: com.ianywhere.ultralitejni12.implementation.JniException: UltraLiteJ Error[-1497]: The synchronization failed because MobiLink returned authentication status '4' with value '4000'

WHEN I TRIED WITH port 5000 i got the error "address protocol not supported"

Do you have any solution for this?

rakshit_doshi
Active Contributor
0 Kudos

Hi Midhun,

Can you please post your whole code so that i can figure out where you are going wrong.

midhun_vp
Active Contributor
0 Kudos

following is my main code:

public class userlogin extends Activity {

           private static String USERNAME ;

              private static String ACTIVATION_CODE;

              private static String HOST = "host1";

              private static int PORT = 5001;

              EditText username;

              EditText activationCode;

              Application app;

              //private CustomerListAdapter adapter;

    @Override

    public void onCreate(Bundle savedInstanceState) {

        super.onCreate(savedInstanceState);

        setContentView(R.layout.userlogin);

        username = (EditText)findViewById(R.id.username);

        activationCode = (EditText)findViewById(R.id.activation_code);

                    Button login=(Button)findViewById(R.id.login_button);

                    login.setOnClickListener(new View.OnClickListener()

                    {

                              public void onClick(View v)

                              {

                                        String returnMsg= "success";

                                        USERNAME = username.getText().toString().trim();

                                        ACTIVATION_CODE = activationCode.getText().toString().trim();

                                         app = Application.getInstance();

                                        //ApprovalDB.registerCallbackHandler(new CustomerDBCallback());

                                        app.setApplicationIdentifier("PurchaseOrderApproval");

                                        app.setApplicationContext(userlogin.this);

                                        ConnectionProperties connProps = app.getConnectionProperties();

                      connProps.setServerName(HOST);

                      connProps.setPortNumber(PORT);

                      connProps.setActivationCode(ACTIVATION_CODE);

             ApprovalDB.setApplication(app);

                      LoginCredentials loginCredentials = new LoginCredentials(USERNAME, ACTIVATION_CODE);

                      connProps.setLoginCredentials(loginCredentials);

                      try{

                      if (app.getRegistrationStatus() != RegistrationStatus.REGISTERED)

                      {

                          app.registerApplication(600);

                      }

                      else

                      {

                          app.startConnection(600);

                      }

                      }

                      catch (Exception e) {

                                returnMsg = e.getMessage();

                                        }

                      AlertDialog.Builder builder =new  AlertDialog.Builder(userlogin.this);

                      if(returnMsg.equalsIgnoreCase("success"))

                                        {

                                if(! ApprovalDB.databaseExists()){

                            ApprovalDB.createDatabase();

                                          Log.d("Database 2", "Value is"+ ApprovalDB.databaseExists());

                                }

                                else{

                   ApprovalDB.openConnection();

                                }

                                ConnectionProfile connectionProfile = ApprovalDB.getSynchronizationProfile();

                                connectionProfile.setServerName("host1");

                                connectionProfile.setPortNumber(2480);

                                connectionProfile.setNetworkProtocol("http,https");

                                connectionProfile.setAsyncReplay(true);

                                connectionProfile.setDomainName("default");

                                connectionProfile.save();

                                PersonalizationParameters param = new PersonalizationParameters();

                                param.setPK_REL_CODE("02");

                                param.setPK_REL_GROUP("PH");

                                param.setUsername(USERNAME);

                                param.setPassword(ACTIVATION_CODE);

                                param.save();

                                Log.d("Subscribe","Start");

                      ApprovalDB.subscribe();

                                Log.d("Subscribe","End");

                                System.out.println("Submit pending");

                      ApprovalDB.submitPendingOperations();

                                System.out.println("Submit pending 2");

                                System.out.println("Subscribe");

                                if (!ApprovalDB.isSynchronized("default"))

                    {

                        ApprovalDB.disableChangeLog();

                        ApprovalDB.synchronize(); // Initial Synchronize

                        SynchronizationGroup sg = ApprovalDB.getSynchronizationGroup("default");

                        sg.setEnableSIS(true);

                        sg.save();

                        ApprovalDB.synchronize();

                              Header header = new Header();

                                                      String head = header.getPO_NUMBER();

                    }

                    ApprovalDB.enableChangeLog();

                                                  /*Intent go=new Intent(userlogin.this,HomeScreen.class);

                                                  startActivity(go);*/

                                        }

                                        else

                                        {

                                                  builder.setTitle("ERROR !").setMessage(returnMsg).setPositiveButton("OK",new DialogInterface.OnClickListener() {

                                                            @Override

                                                            public void onClick(DialogInterface dialog, int which) {

                                                            }

                                                  }).create().show();

                                        }

                              }

               });

midhun_vp
Active Contributor
0 Kudos

  can you please look at the code

rakshit_doshi
Active Contributor
0 Kudos

Assuming you are running the application on your emulator. Plz delete the application from the emulator and delete the user from the SCC and try with this code

following is my main code:

public class userlogin extends Activity {

           private static String USERNAME=supAdmin ;

       private static String PASSWORD=s3pAdmin ;

              private static String ACTIVATION_CODE;

              private static String HOST = "host1";

              private static int PORT = 5001;

               private static int PORTSYNC=2480

              EditText username;

              EditText activationCode;

              Application app;

              //private CustomerListAdapter adapter;

    @Override

    public void onCreate(Bundle savedInstanceState) {

        super.onCreate(savedInstanceState);

        setContentView(R.layout.userlogin);

        username = (EditText)findViewById(R.id.username);

        activationCode = (EditText)findViewById(R.id.activation_code);

                    Button login=(Button)findViewById(R.id.login_button);

                    login.setOnClickListener(new View.OnClickListener()

                    {

                              public void onClick(View v)

                              {

                                        String returnMsg= "success";

//                                        USERNAME = username.getText().toString().trim();

                                        ACTIVATION_CODE = activationCode.getText().toString().trim();

                                         app = Application.getInstance();

                                        //ApprovalDB.registerCallbackHandler(new CustomerDBCallback());

                                        app.setApplicationIdentifier("PurchaseOrderApproval");

                                        app.setApplicationContext(userlogin.this);

                                        ConnectionProperties connProps = app.getConnectionProperties();

                      connProps.setServerName(HOST);

                      connProps.setPortNumber(PORT);

  //                    connProps.setActivationCode(ACTIVATION_CODE);

             ApprovalDB.setApplication(app);

                      LoginCredentials loginCredentials = new LoginCredentials(USERNAME, PASSWORD);

                      connProps.setLoginCredentials(loginCredentials);

                      try{

                      if (app.getRegistrationStatus() != RegistrationStatus.REGISTERED)

                      {

                          app.registerApplication(600);

                      }

                      else

                      {

                          app.startConnection(600);

                      }

                      }

                      catch (Exception e) {

                                returnMsg = e.getMessage();

                                        }

                      AlertDialog.Builder builder =new  AlertDialog.Builder(userlogin.this);

                      if(returnMsg.equalsIgnoreCase("success"))

                                        {

                                if(! ApprovalDB.databaseExists()){

                            ApprovalDB.createDatabase();

                                          Log.d("Database 2", "Value is"+ ApprovalDB.databaseExists());

                                }

                                else{

                   ApprovalDB.openConnection();

                                }

                                ConnectionProfile connectionProfile = ApprovalDB.getSynchronizationProfile();

                                connectionProfile.setServerName("host1");

                                connectionProfile.setPortNumber(2480);

                                connectionProfile.setNetworkProtocol("http");

                                connectionProfile.setAsyncReplay(true);

                                connectionProfile.setDomainName("default");

                                connectionProfile.save();

                                PersonalizationParameters param = new PersonalizationParameters();

                                param.setPK_REL_CODE("02");

                                param.setPK_REL_GROUP("PH");

//                                param.setUsername(USERNAME);

  ///                              param.setPassword(ACTIVATION_CODE);

                                param.save();

                                Log.d("Subscribe","Start");

                      ApprovalDB.subscribe();

                                Log.d("Subscribe","End");

                                System.out.println("Submit pending");

                      ApprovalDB.submitPendingOperations();

                                System.out.println("Submit pending 2");

                                System.out.println("Subscribe");

                                if (!ApprovalDB.isSynchronized("default"))

                    {

                        ApprovalDB.disableChangeLog();

                        ApprovalDB.synchronize(); // Initial Synchronize

                        SynchronizationGroup sg = ApprovalDB.getSynchronizationGroup("default");

                        sg.setEnableSIS(true);

                        sg.save();

                        ApprovalDB.synchronize();

                              Header header = new Header();

                                                      String head = header.getPO_NUMBER();

                    }

                    ApprovalDB.enableChangeLog();

                                                  /*Intent go=new Intent(userlogin.this,HomeScreen.class);

                                                  startActivity(go);*/

                                        }

                                        else

                                        {

                                                  builder.setTitle("ERROR !").setMessage(returnMsg).setPositiveButton("OK",new DialogInterface.OnClickListener() {

                                                            @Override

                                                            public void onClick(DialogInterface dialog, int which) {

                                                            }

                                                  }).create().show();

                                        }

                              }

               });

PLEASE NOTE I HAVE COMMENTED CERTAIN FIELDS AND CHANGED SOME PART.USE THIS CODE AND GIVE A TRY.     IT WILL DEFINITELY WORK

midhun_vp
Active Contributor
0 Kudos

Ok .Let me try.Thanks

midhun_vp
Active Contributor
0 Kudos

Subscription is working but the syc is not workin

ApprovalDB.synchronize(); // Initial Synchronize

its showin the error

Caused by: com.ianywhere.ultralitejni12.implementation.JniException: UltraLiteJ Error[-857]: Synchronization failed due to an error on the server: [-10244] The MobiLink server has encountered an error and the synchro

rakshit_doshi
Active Contributor
0 Kudos

Now There are only two ways out of this.

1. You restart all the SUP services and the machine.

2. Develop a new Android Project and import all the same codes in it and try.

I had these errors earlier and were resolved by using any one of the step. Hope this helps you

midhun_vp
Active Contributor
0 Kudos

Ok.Let me try the final step.Thanks

midhun_vp
Active Contributor
0 Kudos

 

I tried. am getting the same error when sync

Caused by: com.ianywhere.ultralitejni12.implementation.JniException: UltraLiteJ Error[-857]: Synchronization failed due to an error on the server: [-10244] The MobiLink server has encountered an error and the synchro

In the scc am getting error

2012-07-05 12:51:24.736  Subsystem=Error  Application ID=PurchaseOrderApproval, Application Connection ID=Simulator2d9807f0-bc67-42ac-8441-603ef8ca2145__PurchaseOrderApproval, User=supAdmin@admin, Correlation ID=, Package=purchaseorderapproval:1.0, MBO=LogRecordImpl, Operation=create, Thread ID=184, Node ID=SYS20-393516, Error=[-10158] Exception thrown in method: 'public java.lang.String com.sybase.djc.mobilink.EventHandler.beginDownloadConnection(java.sql.Timestamp,java.lang.String)'. Error description: 'com.sybase.djc.SystemException: com.sybase.djc.transaction.TransactionContext.*AnonymousTransaction*'.

Stack trace: 'com.sybase.djc.SystemException: com.sybase.djc.transaction.TransactionContext.*AnonymousTransaction*



rakshit_doshi
Active Contributor
0 Kudos

Error -857 occurs only when your device or emulator is not able to communicate with the SUP Server.

What you can do is Use the shortcut of Stop unwired services to stop the server. Then run taskmanager and in services search for all of Sybase Services. Stop all of them (there are normally 4 of them).

Then as a safety measure restart the machine and then start the unwired services and try relaunching the application.

This time it should definitely work.