on 05-15-2012 4:06 PM
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.
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..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
profileSync.setAsyncReply(boolean) is missing
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
Regards,
Srinivas Divakarla
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
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.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.