on 04-05-2012 11:35 AM
Hi all,
I am using SUP 2.1 with iOS 5 SDK.
After creating a connection profile in the SUP server, i have been trying to run my application on iPad device but i keep getting the error: "SUPPersistenceException from checkInitialized: -- SUPMessageClient is not initialized".
This does not happen when i run the application on the simulator...
Please suggest what could be the cause or how to fix this issue...
Regards,
Naveen.
Hi Naveen and Ponnu ,
Couple of things you have to do if you are not able to run the app in device but able to run in simulator.
i>Reset all contents of your device.
ii>Check device is connected with internet or not.
iii>Delete all application connections from Sybase control centre for that device and create a new connection.
If these points will not work ,plz let me know.
Hope that helps,
Ashish jha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi all,
i've got the same problem as Naveen, but i already have to face it when i deploy to the simulator.
My setup is a SUP 2.2 and iOS 6.1 and the code basically looks like the following:
SUPApplication* supApp = [SUPApplication getInstance];
supApp.applicationIdentifier = appID;
SUPConnectionProperties* props = supApp.connectionProperties;
props.serverName = server;
props.portNumber = 5001;
SUPLoginCredentials* login = [SUPLoginCredentials getInstance];
login.username = user;
props.activationCode = activationCode;
props.loginCredentials = login;
[MYGENERATEDDB setApplication: supApp];
When i hit the last line i get:
[SUPApplication.m:1348] SUPPersistenceException from checkInitialized: -- SUPMessageClient is not initialized
What i already tried is:
- Delete the only exiting Application Connection for this Device + AppID + User
(it worked at very first try, were this Application Connection was created)
- Deleting the database programmatically if it is present before executing any line from the code above
- Reseting the Simulator
Is there anybody who can help?
Thanks in advance,
Robert
P.S. What confuses me is that i use SUP 2.2 but the Exception mentions "SUPMessageClient" were as the Message Client API was removed in SUP 2.1 as stated here http://infocenter.sybase.com/help/topic/com.sybase.infocenter.dc60009.0212/doc/html/apr1331167335175...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Robert,
To initial the SUPMessage Client in SUP 2.2, you have to do following steps,
i> setAppIdentifier.
SUPApplication* app = [SUPApplication getInstance];
if([SUPApplication messageClientStatus]== MC_STATUS_NOT_INITIALIZED)
{
app.applicationIdentifier = @"Here you need to pass package name which you have given while deploying and it is case sensitive";
}
ii> settingApplicationConnection.
SUPApplication* app = [SUPApplication getInstance];
SUPConnectionProperties *properties = [app connectionProperties];
[properties setServerName: pass server name];
[properties setPortNumber:5001];
[properties setFarmId: pass farmid];
//[properties setUrlSuffix:@"/tm/?cid=%cid%"]; these lines will be commented if you are not using relay sever.
// [properties setUrlSuffix:@"/ias_relay_server/client/rs_client.dll"];
[properties setNetworkProtocol:@"http"];
SUPLoginCredentials *loginCred = [SUPLoginCredentials getInstance];
[loginCred setUsername: pass user name];
[loginCred setPassword:nil];
[properties setLoginCredentials:loginCred];
[properties setActivationCode: pass activation code];
iii> SettingDBForConnectionProfile
SUPApplication* app = [SUPApplication getInstance];
SUPConnectionProfile *cp = [MYGENERATEDDB getConnectionProfile];
[cp.syncProfile setDomainName:appDefaultSettings->Domain];
[cp enableTrace:NO];
[cp.syncProfile enableTrace:NO];
[MYGENERATEDDB setApplication:app];
iv> RegisterOrStartConnection
SUPApplication* app = [SUPApplication getInstance];
if (![app isRegistered])
{
// If the application has not been registered to the server,
// register now
[app registerApplication:60];
} else{
// start the connection to server
[SUPApplication startConnection:30];
}}
v> SetRBSSynchronizationProperties];
SUPConnectionProfile *connprofile = [MYGENERATEDDB getSynchronizationProfile];
[connprofile setServerName : pass server name ];
[connprofile setDomainName: pass Domain name];
[connprofile setNetworkProtocol:@"http"];
[connprofile setNetworkStreamParams:@"trusted_certificates=;url_suffix="];
[connprofile setPortNumber: pass RBS port value];
[connprofile setUser: pass user];
[connprofile setPassword: pass password];
[connprofile setAsyncReplay:NO];
Let me know if it wont help you..
Ashish jha
Hi Naveen,
So there are a couple of things to check here. I assume that since this works on the simulator that technically speaking your starting of the messaging server is correct, something like:
NSInteger result = [SUPMessageClient start];
But really speaking this sounds to me like the database does not exist at the point where you are starting your Messaging client. It may not be happening on the simulator as the database may have already existed from a previous time during your development.
As a rule of thumb, before starting you messaging client, make sure your database exists and if not, create it, otherwise you could get the error you described above.
if (![SomeTitleDB databaseExists])
[SomeTitleDB createDatabase];
Hope that helps,
Cheers,
Brenton.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi brenton
i am also facing the same problem..
http://scn.sap.com/thread/3313526
wats the solution of this exception?
pleas help out!!
Thanks in advance
Couple of Things you could check.
- You did create another device registration (I believe it is called application-connection in SCC now) right?
- How about your network ? Is your iPad (assuming you are using WiFi) on the same network as your Mac running the emulator? Basically it should be able to hit the IPAddress/Port of your SUP server (or Relay Server as the case may be).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Naveen,
I do not have much expertise in the offline applications of SUP, but have you entered all the settings properly in the settings page. This could be one of the reasons why you might be getting this error.
Best Regards, Pramod
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.