cancel
Showing results for 
Search instead for 
Did you mean: 

SUP 2.1.2 Android-Can not propagate principal to SAP

Former Member
0 Kudos

Hi Guys

I have built an android app that connects to SAP to fetch data based on the user login in SAP. The RFC uses sy-uname to find who I am and responds with the relevant data. To make this happen, I have designed an MBO with runtime credentials set using in-built personalisation parameters aka username and password. When I synchronise the android app, I get a mobilink server error that says com......RfcGetException: Username or Password incorrect. JCO_LOGON_ERROR_FAILURE with error code 401.

This ofcourse means the username and password I use for the SAP system is wrong. But NO, the uid/pwd is correct and I have correctly set it in the code using personalisation parameters. To further debug the problem, I changed the MBO and removed the runtime credentials and allowed a hard coded value for connection to SAP. I removed the personalisation paramters code from android app and synced the app. It worked like a charm!

I am able to get data to the device. If I switch back to runtime credentials on the MBO and use personalisation parameters it fails with the same error (401). I am absolutely sure that I set the user name and password correctly.

Another problem I noticed is when I set sync paramters before calling the first synchronise, the code raises an exception saying "Illegal Key generated exception: Key not generated for synchrnoisation" {My mbo also has a sync parameter to fetch data but this is not mapped to any load parameter}.

However if I change the MBO as I said above i.e remove the peronalisation paramaters; I am able to sync successfully even with the sync parameter.

System Environment:

Android 2.3.3 + ADT 16.0.0

SUP 2.1.2

ECC 6.0

The android simulator appears online in SCC, I can see that it is susbcribed under replication tab in the MBO as well. How can I check the default personalisation parameters I PASS to SUP in SCC?

PS: Iam able to execute the RFC from an iOS device via SUP succesfully.

Regards

LNV

Accepted Solutions (0)

Answers (4)

Answers (4)

rakshit_doshi
Active Contributor
0 Kudos

Hi ppl,

This is a very basic problem.

Try restarting the server machine. Stop the unwired services. Start the services again and check all the services are running or not from services.msc in command prompt

Once that is done start the process of registration from the device first with user supAdmin and password is the one that you use to login to SCC default is s3pAdmin

It should complete smoothly

Hope this helps

Thanks

Former Member
0 Kudos

Hi,

My problem was that when trying to synchronize a "personalization key" for sending data to the server.

My system is 2.1.3.

My user / password of the user making the connection RFC's fine.

But I get the error:

com.sybase.persistence.SynchronizeException: com.ianywhere.ultralitejni12.implementation.JniException: UltraLiteJ Error [-857]: Synchronization failed due to an error on the server: [-10 244] The MobiLink server has encountered an Error and the synchro

In the sybase server log is the following error:

Thread-242 [SMP_HHVETAS_APP_COBROS_MBO_SAP.server.SMP_HHVETAS_APP_COBROS_MBO_SAPDB]{"_op":"C","level":5,"code":401,"eisCode":"0","message":"com.sap.conn.rfc.exceptions.RfcGetException:Name or password is incorrect (repeat logon)", "component":"SMP_HHVETAS_APP_COBROS_MBO_SAPDB","entityKey":null,"operation":"synchronize","requestId":null,"timestamp":"2013-06-03 16:10:04.599","messageId":0,"_rc":0}

I fixed the error that was giving me this issue.

I deleted on the sup server configuration from SSC, the connection from Sybase to SAP.

Each time you change this connexion in the workspace, you have to go to SSC to modify too.

Regards.

Former Member
0 Kudos

Hi Jeison,

How do you modify the connection from sybase to SAP in the Sybase Control Centre?

Could you please help me?

Thank you.

Regards,

Adam

Former Member
0 Kudos

Hi

Have you resolved this issue? I got the same problem.

Thanks.

Former Member
0 Kudos

A quick update on what I found. I am able to synchronise when I remove runtime credential mapping to personalisation parameters in the MBO. This means I use hard coded credentials to login to SAP. When I put back the pers params i am not able to sync.

To debug further I checked the PersonalisationPrameters class instance after the sync failed, I was surprised to find that it has SUP login credentials instead of what I set {SAP credentials}. I still cant find a way out anyone?

Former Member
0 Kudos

Hi Lakshminarayanan Vijayaraghavan

I'm sorry but I don't able to help you but you maybe very helpful for me.

I'm a newbie to use SUP and I have to write an APP iOS that communicate with SAP through SUP.

I have some problems for use a CRMFunction from our MBO Object.

Once we have connecting our mobile app to SUP server, what I have to do to call a CRM function?

I have written a code like this :

// before i register the app

MyObj_FIND_CUSTOMEROperation *opi =  [[MyObj_FIND_CUSTOMEROperation alloc] init];

[opi setName: @"Roberto"];

[opi save];

[opi submitPending];

I receveing the error: 'Illegal kei generator status. It must be populated first by the server after a client call to beginOnlineLogin or subscribe'

If I delete the line [opi save] then I don't receive any error but it don't call the CRM function.

Do you have any idea for resolving this problem?

Do you have any sample?

Thanks

Roberto

Former Member
0 Kudos

Heyy Roberto

Would be glad if I can help. Ok I got the same error on Android but not on iOS.

So what I would suggest is the following:

1. register with the SUP server

2. On successful registration, call the beginOnlineLogin method

3. On Login success. set ur sync parameters

4. Call subscrribe on your generated DB class.

5. If you have created an operation on the MBO, now set the operation parameters

6. Call submit pending

7. call begin synchronise (if you use cache policy on demand with 0 cache interval) or You should have already set the apply to cache policy on you MBO in the operation settings.

I know these steps are not very clear. Please post more details on how your MBO is designed and what you wish to with it. But I can clearly see that you have not called beginOnlineLogin in your code before you do anything with your MBOs.

Regards

LNV

Former Member
0 Kudos

Hi LNV,

Thanks a lot for your availability! your help is very precious for us.

Here a piece of my code written after the registration:

    [CRMCustomersCRMCustomersDB beginOnlineLogin:@"supAdmin" password: @"s3pAdmin"];

    while ([CRMCustomersCRMCustomersDB getOnlineLoginStatus].status == SUPLoginPending) {

        [NSThread sleepForTimeInterval: 0.2];

       

    }

   

    switch ([CRMCustomersCRMCustomersDB getOnlineLoginStatus].status) {

        case SUPLoginPending:

            NSLog(@"PENDING");

            break;

        case SUPLoginFailure:

            NSLog(@"FAILURE");

            break

        case SUPLoginSuccess:

            NSLog(@"SUCCESS");

            break;             

        default:

            break;

    }

   

    [CRMCustomersCRMCustomersDB subscribe];

   

    CRMCustomersCRMCustomersObjectZCRM_FIND_CUSTOMERSOperation *opi = [[CRMCustomersCRMCustomersObjectZCRM_FIND_CUSTOMERSOperation alloc] init];

   

    [opi setI_NAME_LAST: @"*"];

   

    //[opi save];

    [opi submitPending];

    [CRMCustomersCRMCustomersDB synchronize];

   

    CRMCustomersCRMCustomersObject_peer1List *ciccio = [CRMCustomersCRMCustomersObject_peer1 getPendingObjects];

    NSLog(@"RESULT: %d", [ciccio size]);

   

    CRMCustomersCRMCustomersObjectZCRM_FIND_CUSTOMERSOperationList *ciccio2 = [CRMCustomersCRMCustomersObjectZCRM_FIND_CUSTOMERSOperation getPendingObjects];

   

    NSLog(@"RESULT: %d", [ciccio2 size]); 

This code is correct? if yes, How can see the server log file for monitoring this operation? This code doesn't throw any exception but don't retrieve any data.

if I decomment the line [opi save] I receive the error " Illegal Generator key .... "

Sorry for all these questions, but we are stucked in this point

Thanks

King Regards

Roberto

Former Member
0 Kudos

Hi roberto

Sorry about the delayed repsonse. Yes the piece of code is correct. Do not use

  [CRMCustomersCRMCustomersDB synchronize]; instead use

  [CRMCustomersCRMCustomersDB beginSynchronize];

if you are not on 2.1.3

I did get a similar error on android, I dint resolve it still. It looks a local error though. Please enavle trace and post the log here, we can have a look. Enable the trace on your device coding. Thanks.

Former Member
0 Kudos
Re: SUP 2.1.2 Android-Can not propagate principal to SAP

Hi L. V.!


I have the same error, and cant find solution too.

My system is 2.1.3.

Without user/password pers. keys - all is ok.

With them - error:  'com.sap.conn.rfc.exceptions.RfcGetException:Name or password is incorrect (repeat logon)"

Is there any progress in your case?


Thanks in advance,

Serg


Former Member
0 Kudos

Nothing mate so far. I did report the case to Sybase, waiting to see if i can find an answer. I will post if I get an update.

Regards

LNV

Former Member
0 Kudos

Hi Lakshminarayanan,

You have received some help from sap, how did you overcome this error?


Regards.