on 07-20-2013 1:57 PM
Hi,
As far as I know, app.RegisterApplication() command creates Application Connection on SUP server.
And after this command every subsequent start of application should return REGISTERED(203) status in app.RegistrationStatus property.
But in our case app.RegistrationStatus is always equal to UNREGISTERED(205) after application relaunch, while it permanently exists in "Application Connections" tab of SCC:
According to Registering application gudelines it is necessary to call RegisterApplication() only once, all subsequent application startups should use app.StartConnection() method (http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc01726.0213/doc/html/jne13...). But in our case we always call RegisterApplication(), because of the condition:
if (app.RegistrationStatus != RegistrationStatus.REGISTERED)
{
app.RegisterApplication();
}
else
{
app.StartConnection();
}
The question is why don't we get REGISTERED status of application in the case?
Thanks, Andrew
Hello guys,
I am experiencing the same identical problem on SUP 2.2.4.
Any suggestions?
Thank you
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Andrea,
Please double check if you are providing below values for corresponding fields:
Connection profile details should be
server:relay server
port:80 or 443
farmid: MBS farm ID.
Synchronization profile should be
server:relayserver
port: 80 or 443
stream parameter : url suffix(/ias_relay_server/client/rs_client.dll/RBS farm ID)
Regards,
Jitendra
Hello Jitendra thank you for replying,
1- For "Connection Profile details" do you mean DB connection profile or app's Connection Properties?
If you meant the first, i can't find a way to setup farmid onDB connection profiles.
2- in my case the port is not 80 or 443 but 5001
3- I'm a bit confused; how many times have I to set credentials (uname and password). I see that it is possible in DB connection props, Synchronization profile and App's Connection Properties?
You can see a paste of my code in the post above.
Thank you very much
Is it possible that I'm missing some dependency?
SUP2.2.4 manual says to import 3 jar dependencies into eclipse:
sup_client2.jar
UltraLiteJ12.jar
MCL.jar (messaging client libraries)
However I'm not able to import MCL because of a Duplicate class error during application packaging.
Here is my eclipse console output:
Exported static routine: .main(String[]) is multiply defined.
ClientConfig.java: Error!: Duplicate definition for 'com.sybase.messaging.common.ClientConfig' found in: com.sybase.messaging.common.ClientConfig
For such reason I don't include MOC.jar to the application.
Maybe this is the reason?
Thank you for your help
Hi Andrea,
you are trying with BlackBerry Native app development. correct?
there is only two jar files are required (to import) sup_client2.jar and UltraLiteJ12.jar .
SUP2.2.4 manual says to import 3 jar dependencies into eclipse
which document you are referring which says to import 3 jar files? please share that.
you can check this document for more details.
Regards,
Jitendra
The document I'm referring is downloaded from Sybase Control Center.
I downloaded the pdf of SUP2.2.4-Tutorial.pdf.
The section is Section is Adding Required .jar and .cod Files (pag 17)
Hi Andrea,
document you are referring is correct one only.
However I'm not able to import MCL because of a Duplicate class error during application packaging.
where does it say to import MCL file?
Please follow the document that I mentioned above.
http://scn.sap.com/docs/DOC-48708
Regards,
Jitendra
I followed the tutorial guide and this sample sup101 app worked for me. i installed BB Java Plug-in for Eclipse.
You should get the registered status from the second time when you run the app. From the second time the the condition goes to else loop.
Can you please provide the complete code, to understand where you are doing the mistake.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here is the code:
Sybase.Mobile.Application app = Sybase.Mobile.Application.GetInstance();
app.ApplicationIdentifier = "mobcrm";
IApplicationCallback appCallback = new MyApplicationCallback();
app.ApplicationCallback = appCallback;
// ConnectionProperties has the information needed to register
// and connect to SUP server
ConnectionProperties connProps = app.ConnectionProperties;
connProps.ServerName = "srvname";
// if you are using relay server, then use the correct port number for the relay server
// if connecting using http without a relay server, use the messaging administration port, by default 5001.
// if connecting using https without a relay server, then use a new port for https, for example 9001.
connProps.PortNumber = 80;
// if connecting using https, set the network protocol
connProps.NetworkProtocol = "http";
// Set FarmId and UrlSuffix when connecting through the Relay Server.
connProps.FarmId = "sup-farm2";
connProps.UrlSuffix = "/ias_relay_server/client/rs_client.dll";
// Provide user credentials
LoginCredentials loginCred = new LoginCredentials("login", "password");
//LoginCredentials loginCred = new LoginCredentials("asumsc5", "Nz9Zvfir");
connProps.LoginCredentials = loginCred;
//Connection Props
ConnectionProfile connProfile = MobCRMDB.GetConnectionProfile();
connProfile.SetEncryptionKey("your encryption key");
connProfile.CacheSize = 409600;
connProfile.Save();
//Sync props
ConnectionProfile syncProfile = MobCRMDB.GetSynchronizationProfile();
syncProfile.ServerName = "srvname";
syncProfile.PortNumber = 80;
syncProfile.NetworkProtocol = "http";
NetworkStreamParams streamParams = syncProfile.StreamParams;
streamParams.Url_Suffix = "/ias_relay_server/client/rs_client.dll/sup-farm1";
syncProfile.DomainName = "default";
if (app.RegistrationStatus != RegistrationStatus.REGISTERED)
{
app.RegisterApplication();
}
else
{
app.StartConnection();
}
One more addition, here is the log from ApplicationCallback:
OnConnectionStatusChanged was called.
connectionStatus: 103 (CONNECTED)
errorCode: 0
errorMessage:
OnConnectionStatusChanged was called.
connectionStatus: 105 (DISCONNECTED)
errorCode: 3952
errorMessage: Error: 3952 Detail: A database error occurred. See native error code. Native Error: -1 Source: moCA.cpp 1993.
OnConnectionStatusChanged was called.
connectionStatus: 103 (CONNECTED)
errorCode: 0
errorMessage:
OnConnectionStatusChanged was called.
connectionStatus: 105 (DISCONNECTED)
errorCode: 6401
errorMessage: Error: 6401 Detail: Error writing data to a stream. Source: moClient.cpp 1844.
OnConnectionStatusChanged was called.
connectionStatus: 103 (CONNECTED)
errorCode: 0
errorMessage:
OnConnectionStatusChanged was called.
connectionStatus: 105 (DISCONNECTED)
errorCode: 3952
errorMessage: Error: 3952 Detail: A database error occurred. See native error code. Native Error: -1 Source: moCA.cpp 1993.
OnConnectionStatusChanged was called.
connectionStatus: 103 (CONNECTED)
errorCode: 0
errorMessage:
OnConnectionStatusChanged was called.
connectionStatus: 105 (DISCONNECTED)
errorCode: 6401
errorMessage: Error: 6401 Detail: Error writing data to a stream. Source: moClient.cpp 1844.
OnConnectionStatusChanged was called.
connectionStatus: 103 (CONNECTED)
errorCode: 0
errorMessage:
and so on...
Moreover, in SCC "Application connections" after calling app.RegisterApplication() from client code application connects in Offline status (screenshot in first message).
I know that this thread is probably dead, but I would like to share my solution while it helped me in my Win32 client. My symptom was that I get a slightly different error (I left it for web crawlers):
OnConnectionStatusChanged: 105, 3952, Error: 3952 Detail: A database error occurred. See native error code. Source: moRecordset.cpp 1787.
To overcome the error, I have reduced the page size that was set by SMP SDK from 8k to 1k:
static SAPReXDB() {
Sybase.Persistence.ConnectionProfile _cp0 = Sybase.Persistence.ConnectionProfile.Find(_profile.GetName());
...
else
{
_profile.SetProperty("databaseFile", "sAPRetailEx3_3.udb");
_profile.SetProperty("enableStreaming", "true");
GetConnectionProfile().PageSize = 1024; // it was 8192
}
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.