cancel
Showing results for 
Search instead for 
Did you mean: 

SUP 2.1.3 Sync Error: SUPPersistenceException: SUPPersistenceException from synchronize: -- SUPSynchronizeException: The application connection doesn't match with the application id

Former Member
0 Kudos

Hi all,

I am developing a native iOS application using SUP 2.1.3. I got an error:

SUPPersistenceException: SUPPersistenceException from synchronize: -- SUPSynchronizeException: The application connection doesn't match with the application id

And also on the server side this error is occured:

2012-07-31 08:58:05.407 ERROR Mobilink Thread-156 [com.sybase.ml.sup.Logger] [-10052]The authenticate_parameters script returned 3004


I didnt get this error before but added a few fields to RFC and regenerated code. Then added them to my project and I got this error.

In apps viewDidLoad method:

o any additional setup after loading the view from its nib.

        SUPApplication *app = [SUPApplication getInstance];

        [app setApplicationIdentifier:@"MobileProject"];

        SUPConnectionProperties *connectionProperties = [app connectionProperties];

        [connectionProperties setServerName:@"sapsybase"];

        [connectionProperties setPortNumber:5001];

        SUPLoginCredentials *loginCredantials = [SUPLoginCredentials getInstance];

        [loginCredantials setUsername:@"supuname"];

        [loginCredantials setPassword:@"suppassword"];

        [connectionProperties setLoginCredentials:loginCredantials];

        [app setApplicationCallback:callbackHandler];

        [MobileProjectMobileProjectDB setApplication:app];

        @try {

            [app registerApplication:30];

        }

        @catch (NSException *exception) {

            NSLog(@"%@",exception);

        }

        @finally {

        }

        ///

        [MobileProjectMobileProjectDB openConnection];

        if (![MobileProjectMobileProjectDB databaseExists]) {

            [MobileProjectMobileProjectDB createDatabase];

        }else{

            [MobileProjectMobileProjectDB deleteDatabase];

            [MobileProjectMobileProjectDB createDatabase];

        }

And in method which fired by button:

    SUPConnectionProfile *cp = [MobileProjectMobileProjectDB getSynchronizationProfile];

    [cp setUser:@"supuname"];

    [cp setPassword:@"suppassword"];

    [cp setServerName:@"sapsybase"];

    [cp setPortNumber:2480];

    [MobileProjectMobileProjectDB registerCallbackHandler:callbackHandler];

    MboileProjectMPMBOSynchronizationParameters *syncParams = [MobileProjectMPMBO getSynchronizationParameters];

    [syncParams setIp_fp:@"3000019006"];

    [syncParams setIp_sp:@"1q2w3e"];

    [syncParams setIp_spUserDefined:YES];

    [syncParams setIp_fpDefined:YES];

    @try {

        MobileProjectKeyGenerator *gene = [MobileProjectKeyGenerator getInstance];

        [gene save];

        [syncParams save];

        [MobileProjectMobileProjectDB synchronize];  

    }

    @catch (NSException *exception) {

        NSLog(@"%@",exception);

    }

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

This is the solution:

Create a new project in XCode. Implement SUP code, run your iOS project. It will work. Then try your old iOS project. It will work too. That's ridicilous but it works. It happened twice.

Former Member
0 Kudos

Hi Erhan,

May i ask you if you experienced some problems when subscribing to your app? im getting some

loginFail,Sync failed exception when im trying to.

Regards,

Daniel

Former Member
0 Kudos

Hi Daniel,

I got no errors when subscribing app.

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi ,

I am using unwired server to connect my native iOS application sap. i got the connection successful but at the time of synchronisation I am getting following error.

[ERROR] [SubscribeController.m:72] SUPPersistenceException: Sync failed: -1305 (MOBILINK_COMMUNICATIONS_ERROR) %1:63 %2: %3:2;Parameter 1:63;Parameter 2:;Parameter 3:2

Can any one please help me on this , I am new in SUP development and trying to resolve the error since long time.

Thank you in advance.

Sandip.

D_Olderdissen
Advisor
Advisor
0 Kudos

Sounds like the application ID got messed up. Make sure your application is using the SAME application ID when connecting to SUP as you defined it inside SCC when setting up the Application template. The app ID is used to associate an incoming client connection with the application template. So if you got a missmatch in the app ID SUP can not associate your app with the app template and has no clue, what to do with your connection.

In that respect, you need to understand that with SUP 2.1.3 the synchronized SUP clients are using messaging for registration and replication for data transport (replication). So your app has one app ID that you may need to use inside SUP (SCC) for the registration and replication configuration.

Check out the infocenter docs on Application ID.

Former Member
0 Kudos

Hi,

Application Id is same as in SCC. I double checked. And also removed deployed app and redeployed application from Sybase Unwired Workspace. And before this error my iOS application worked fine. Then I added a field in RFC and redeployed package. And here is error. And also I created a new project in Xcode it works now. But old iOS application still does not work. I think there is something wrong in SUP generated code side. SUP messed up iOS application. In this sitution I did not change anything in code. Only re generated code replaced generated code files. 

D_Olderdissen
Advisor
Advisor
0 Kudos

If you add a field in "RFC" and redeploy a package, you will need to regenerate the code as it will other wise not contain your changes and your SUP app does not match the data model on your SUP. No wonder SUP complains.

Former Member
0 Kudos

Hi,

Of course I rengenerated code. That doesnt explains error. As I said before I created a new iOS application and it worked. But original iOS application does not work. SUP generates a lot of meaningless errors for applications and generates trouble for developers.

D_Olderdissen
Advisor
Advisor
0 Kudos

As much as you are entitled to your opinion, it is still your choice how to approach your project. Hating things because it does not work the way you expect may not be the best way. 🙂

Let me summarize what I understood:

1. You got a default working iOS synced app on SUP 2.1.3

2. You added some code to the connection initiation sequence

3. Now you get the errors mentioned above.

Well, what do you want to achieve with those changes? There must be a reason why you do those changes, what is the reason?

Former Member
0 Kudos

Hi,

These are my opinions I think SUP does not help very well me to develop mobile applications.

My iOS application was working fine. Then I added some fields and code on ABAP side as export parameters to RFC. That's my need. Then I regenerated code, deployed to SUP Server and got Generated Code and updated files in my Xcode Project. And I started to receive exception "SUPPersistenceException: SUPPersistenceException from synchronize: -- SUPSynchronizeException: The application connection doesn't match with the application id" I changed nothing on code in XCode side. Then I created a new XCode project and added generated codes to project. It worked! I did not get the point. Because there is no changes in XCode except iOS Project Name. I think I summarized well my problem

tahir_z
Contributor
0 Kudos

Hi,

Remove the application in the iphone simulator and re-compile the project. I had same issue with android app and it solved my problem.

Regards

Tahir.

Former Member
0 Kudos

Hi,

I already tried that but didnt help.