Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

'Subscribe failed exception : name = SUPPersistenceException description = 0 (OK)' during new registration

Hi Experts,

I'm working on iphone native app with SUP 2.1.3. We are getting the SUPPersistanceException while subscribing the local db with SCC. This is occurring only during the new registration of the iphone native app in  SUP 2.1.3 in SCC.

I'm doing the following steps for sup connection on click of loginButton:

  1. Setup NSNotification observers
  2. Get the SupApplication instance and set the appIdentifier and callback handler.
  3. Register the callback handler instance to db class: [SUPDB registerCallbackHandler:callback];
  4. Update the connectionProperties of SUPApplication. (serverName, port, urlSuffix, farmid, loginCredentials, httpCredentials)
  5. Get the SupVault, unlock it and get the key (if exists).
  6. If database exists-->          a) Get the key from the vault b) [[SUPDB connectionProfile] setEncryptionkey:key]; c) clean the SUPDB
  7. If database does not exists-->          a) [SUPDB createDatabase] b) [SUPDB generateEncryptionKey] c) [SUPDB closeConnection] d) update the key into vault and lock vault.
  8. Set the SupApplication instance to dbclass. [SUPDB setApplication:app];
  9. Call registerApplication. [app registerApplication:TIME_OUT];
  10. When the registration/connection success notification triggers i'm updating the database synchronizationProfile. (username, password, servername, portnumber, domainNumber, networkProtocol, networkStreamParameters).
  11. Then calling the [SUPDB subscribe]; causes SUPPersistanceException.  @catch issues [app stopConnection];

When repeating the above steps, step-6c causing the SUPPersistanceException (while cleaning the database).

In both the cases the error description of SUPPersistanceException is : "0 (OK)".

If I quit the application from the memory and run it again, it runs normally and fetches data from sup. I can only repeat the problem on first launch of app from device/simulator. (not everytime)

Please suggest a solution for the above problem. let me know if you need more information.

Thanks in advance.

Sarath.

Tags:
Former Member
Former Member replied

We are using SUP 2.1.3 using RBS to fetch data from SUP. I realized that subscribe is part of MBS and should not be used in RBS procedure. we commented the [db subscribe], since then app is working fine.

1 View this answer in context
Not what you were looking for? View more on this topic or Ask a question