cancel
Showing results for 
Search instead for 
Did you mean: 

The synchronization failed because MobiLink returned authentication status '4'

Former Member
0 Kudos

Hi,

I want synchronize DB, but I have error: Error: com.sybase.persistence.SynchronizeException: com.ianywhere.ultralitejni12.implementation.JniException: UltraLiteJ Error[-1497]: The synchronization failed because MobiLink returned authentication status '4' with value '4000'

My code:

  ConnectionProfile profileSync = MBOSimpleProjectDB.getSynchronizationProfile();

                    profileSync.setServerName(SERVERNAME);

                    profileSync.setPortNumber(2480);

                    profileSync.setNetworkProtocol("http");

                    profileSync.setDomainName("default");

                    profileSync.save();

 

                    try {

                              MBOSimpleProjectDB.synchronize("system");

                              Log.d(tag, "Success sync");

                    } catch (Exception e) {

                              Log.d(tag, "Error: " + e.toString());

                    }

Thanks.

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Actually Synchronization profile is not having credential details in your code...

Right code is:

ConnectionProfile syncProf = DvrMiniDB

                                                                      .getSynchronizationProfile();

                                                  syncProf.setServerName(pref.getString("server_name", SERVER));

                                                  syncProf.setPortNumber(Integer.parseInt(pref.getString("server_port",PORT)));

                                                  syncProf.setNetworkProtocol(pref.getString("server_protocol", PROTOCOL));

                                                  NetworkStreamParams streamParams = syncProf.getStreamParams();

                                                  streamParams.setUrl_Suffix(pref.getString("server_url_suffix", URL_SUFFIX));                                   syncProf.setUserName(DvrMiniDB.getPersonalizationParameters().getUsername());

                                                  syncProf.setPassword(DvrMiniDB.getPersonalizationParameters().getPassword());

                                                  syncProf.setDomainName("default");

                                                  syncProf.setAsyncReplay(false);

                                                  syncProf.save();

Please give reward points if useful..

MakotoS
Product and Topic Expert
Product and Topic Expert
0 Kudos

I've get the same error and fixed the problem after setting up the license of SUP server properly.

In the same envrinment, when I tried running an App with Hybrid Web Contaner, I got an error like "the The number of registered devices has reached the maximum limit for your license" or so and noticed that was a problem of license.

I hope it helps.

Regards,

Makoto

Former Member
0 Kudos

profileSync.setAsyncReply(boolean) is missing

Former Member
0 Kudos

Hi Pavel

I suppose that the following error is related to the SCC. If we are using the free version of SUP then atmost we can connect only five devices with SCC. So check if there are already devices reistered with your Sup Server. Delete them and create new user i suppose now your problem will be solved. We had a similar problem.

Former Member
0 Kudos

Thanks for sharing the solution. I had a similar problem and I was able to fix by removing registered users from SCC.

Former Member
0 Kudos

Hi Pavel,

Some time back I did faced similar challenges while developing android application though, and at the end I have resolved it, probably the recent blog post might help you

http://scn.sap.com/community/mobile/blog/2012/05/02/sup-212-native-android-mbo-non-doe-based-approac...

Regards,

Srinivas Divakarla

Former Member
0 Kudos

Hi Srinivas Divakarla,

I have not worked 3 step

My code:

  ConnectionProfile profileSync = MBOSimpleProjectDB.getSynchronizationProfile();

                    profileSync.setServerName(SERVERNAME);

                    profileSync.setPortNumber(2480);

                    profileSync.setNetworkProtocol("http");

                    profileSync.setAsyncReplay(true);

                    profileSync.setDomainName("default");

                    profileSync.save();

 

                    try {

                              MBOSimpleProjectDB.synchronize();

                              Log.d(tag, "Success sync");

                    } catch (Exception e) {

                              Log.d(tag, "Error: " + e.toString());

                    }

Thanks.

Former Member
0 Kudos

Hi Pavel

you need not to this on your own code, try to modify the generated code

Please refer to the step 4 of the blog, there replace the ports from 80 to 5001 and port 80 to 2480 for connectionProfile & and for synchronizationProfile respectively, if your trying to connect through SUP directly.