cancel
Showing results for 
Search instead for 
Did you mean: 

Application registration status never becomes REGISTERED (203)

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hello guys,

I am experiencing the same identical problem on SUP 2.2.4.

Any suggestions?

Thank you

Former Member
0 Kudos

Please share the code you are using in order for us to be able to help.

For starters, double check the connection info in ConnectionProfile and ConnectionProperties.  E.g. is the server name reachable, correct port #, etc...

Thanks,

Andrew.

Former Member
0 Kudos
Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert
0 Kudos

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

Former Member
0 Kudos

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

Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Andrea,

connection profile is for making connection from device to Sybase unwired server.

Relay server is there right? you are implementing it in your mobile app development? correct?

please confirm this first.

Regards,

Jitendra

Former Member
0 Kudos

Yes I'm using a relay server in my architecture.

Former Member
0 Kudos

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

Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert
0 Kudos

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

Former Member
0 Kudos

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)

SyBooks Online

Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert
0 Kudos

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

Former Member
0 Kudos

This is a screenshot to the document

Could you please tell me where the registration status is written locally?

Is there a way to understand if such info is not being correctly saved?

Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert
0 Kudos

I followed the tutorial guide and this sample sup101 app worked for me. i installed BB Java Plug-in for Eclipse.

Former Member
0 Kudos

You mean that the second start of the application does pass for registration again?

I'll try it out,

thank you

Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert
0 Kudos
You mean that the second start of the application does pass for registration again?

i didnt understand.

Former Member
0 Kudos

I'm sorry, it was a mistake. I try to reformulate:

When you say it worked for me, you mean the app  appears as REGISTERED the 2nd time it is started.

Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert
0 Kudos

2nd time when i launched BB simulator, i can see user status as ONLINE in SCC and also data is there in simulator. I can do the transactions also.

midhun_vp
Active Contributor
0 Kudos

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.

- Midhun VP

Former Member
0 Kudos

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();

}

Former Member
0 Kudos

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).

Vlad
Advisor
Advisor
0 Kudos

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

    }