Quantcast
Channel: SCN : All Content - SAP for Mobile
Viewing all articles
Browse latest Browse all 6147

SUP 2.2 with native Android: Incomplete connection settings

$
0
0

Hi!

We're trying to connect the Sybase Unwired Platform Server 2.2 with a Hello World android native app, but we'll always get error:

Error: 14802 Message: Connection settings are incomplete.

 

The Device is connected to the server via Service APN, so we are not using a relay server at the moment.

 

Complete stack trace:

04-29 16:12:31.650: V/MainActivity!(14255): onCreate()

04-29 16:12:31.740: I/MocaLog(14255): 29T161231, T1, ThreadID = Thread[main,5,main] maps to short thread id 1

04-29 16:12:31.740: W/System.err(14255): fsync failed: EBADF (Bad file number)

04-29 16:12:31.740: I/MocaLog(14255): 29T161231, T1, Starting Log.  Current time: 20130429T161231

04-29 16:12:31.740: W/System.err(14255): fsync failed: EBADF (Bad file number)

04-29 16:12:31.740: I/MocaLog(14255): 29T161231, T1, MocaLog Logging Level: Everything

04-29 16:12:31.740: W/System.err(14255): fsync failed: EBADF (Bad file number)

04-29 16:12:31.760: D/dalvikvm(14255): GC_CONCURRENT freed 229K, 7% free 12398K/13191K, paused 5ms+1ms, total 45ms

04-29 16:12:31.760: D/dalvikvm(14255): WAIT_FOR_CONCURRENT_GC blocked 9ms

04-29 16:12:31.760: I/MocaLog(14255): 29T161231, T1, MocaLog AppId: null

04-29 16:12:31.760: W/System.err(14255): fsync failed: EBADF (Bad file number)

04-29 16:12:31.760: I/MocaLog(14255): 29T161231, T1, iMo Version Number: 2.1.3.6429

04-29 16:12:31.760: W/System.err(14255): fsync failed: EBADF (Bad file number)

04-29 16:12:31.760: I/MocaLog(14255): 29T161231, T1, Creating DATA_CONNECTION_STATE listener

04-29 16:12:31.760: W/System.err(14255): fsync failed: EBADF (Bad file number)

04-29 16:12:31.775: I/MocaLog(14255): 29T161231, T1, MessagingClientLib: initInstance. App ID: hello22, Log Level 4

04-29 16:12:31.775: W/System.err(14255): fsync failed: EBADF (Bad file number)

04-29 16:12:31.780: I/MocaLog(14255): 29T161231, T1, Starting CmoBinary::cleanOldFiles

04-29 16:12:31.780: W/System.err(14255): fsync failed: EBADF (Bad file number)

04-29 16:12:31.780: I/MocaLog(14255): 29T161231, T1, Searching file pattern: /data/data/de.db.****:****.hellosup22/app_mobinary/mobinary_cookie_*

04-29 16:12:31.780: W/System.err(14255): fsync failed: EBADF (Bad file number)

04-29 16:12:31.785: I/MocaLog(14255): 29T161231, T1, Finished CmoBinary::cleanOldFiles

04-29 16:12:31.785: W/System.err(14255): fsync failed: EBADF (Bad file number)

04-29 16:12:31.795: I/MocaLog(14255): 29T161231, T1, MessagingClientLib: getConfigProperty

04-29 16:12:31.795: W/System.err(14255): fsync failed: EBADF (Bad file number)

04-29 16:12:31.810: I/System.out(14255): CONSOLE TRACE: setListener

04-29 16:12:31.810: I/System.out(14255): CONSOLE TRACE: addConnection for Connection key: hello22:1.0

04-29 16:12:31.810: I/System.out(14255): CONSOLE TRACE: leave setListener

04-29 16:12:31.810: V/MainActivity!(14255): call registerApplication....

04-29 16:12:31.825: I/MocaLog(14255): 29T161231, T1, MessagingClientLib: setConfigProperty

04-29 16:12:31.825: W/System.err(14255): fsync failed: EBADF (Bad file number)

04-29 16:12:31.825: I/MocaLog(14255): 29T161231, T1, MessagingClientLib: propertyDisplayOnly

04-29 16:12:31.825: W/System.err(14255): fsync failed: EBADF (Bad file number)

04-29 16:12:31.835: I/MocaLog(14255): 29T161231, T1, MessagingClientLib: setConfigProperty (1305):

04-29 16:12:31.835: W/System.err(14255): fsync failed: EBADF (Bad file number)

04-29 16:12:31.835: I/MocaLog(14255): 29T161231, T1, MessagingClientLib: setConfigProperty

04-29 16:12:31.835: W/System.err(14255): fsync failed: EBADF (Bad file number)

04-29 16:12:31.835: I/MocaLog(14255): 29T161231, T1, MessagingClientLib: propertyDisplayOnly

04-29 16:12:31.835: W/System.err(14255): fsync failed: EBADF (Bad file number)

04-29 16:12:31.840: I/MocaLog(14255): 29T161231, T1, MessagingClientLib: setConfigProperty (20): false

04-29 16:12:31.840: W/System.err(14255): fsync failed: EBADF (Bad file number)

04-29 16:12:31.840: I/MocaLog(14255): 29T161231, T1, MessagingClientLib: setConnectionProperties

04-29 16:12:31.840: W/System.err(14255): fsync failed: EBADF (Bad file number)

04-29 16:12:31.845: V/MainActivity!(14255): onRegistrationStatusChanged

04-29 16:12:31.860: I/MocaLog(14255): 29T161231, T2, ThreadID = Thread[registerApplication,5,main] maps to short thread id 2

04-29 16:12:31.860: W/System.err(14255): fsync failed: EBADF (Bad file number)

04-29 16:12:31.860: I/MocaLog(14255): 29T161231, T2, MessagingClientLib: initClient.

04-29 16:12:31.860: W/System.err(14255): fsync failed: EBADF (Bad file number)

04-29 16:12:31.860: I/MocaLog(14255): 29T161231, T2, MessagingClientLib: initClient error. Start aborted due to incomplete configuration.

04-29 16:12:31.860: W/System.err(14255): fsync failed: EBADF (Bad file number)

04-29 16:12:31.860: I/MocaLog(14255): 29T161231, T2, MocaLibrary: client initialize exception:

04-29 16:12:31.860: I/MocaLog(14255): Error: 14802 Message: Connection settings are incomplete.

04-29 16:12:31.860: I/MocaLog(14255):     at com.sybase.mo.MessagingClientLib.initClient(MessagingClientLib.java:139)

04-29 16:12:31.860: I/MocaLog(14255):     at com.sybase.mo.MessagingClientLib.getConfig(MessagingClientLib.java:1161)

04-29 16:12:31.860: I/MocaLog(14255):     at com.sybase.mo.MessagingClientMoObject.getNewConnection(MessagingClientMoObject.java:30)

04-29 16:12:31.860: I/MocaLog(14255):     at com.sybase.mo.MessagingClientMoObject.<init>(MessagingClientMoObject.java:58)

04-29 16:12:31.860: I/MocaLog(14255):     at com.sybase.messaging.MclServerRmiCalls.<init>(MclServerRmiCalls.java:37)

04-29 16:12:31.860: I/MocaLog(14255):     at com.sybase.mobile.Application$1.run(Application.java:357)

04-29 16:12:31.860: W/System.err(14255): fsync failed: EBADF (Bad file number)

04-29 16:12:31.865: I/MocaLog(14255): 29T161231, T2, Connection settings are incomplete.

04-29 16:12:31.865: W/System.err(14255): fsync failed: EBADF (Bad file number)

04-29 16:12:31.870: I/MocaLog(14255): 29T161231, T2, MessagingClientLib: getConfigProperty

04-29 16:12:31.870: W/System.err(14255): fsync failed: EBADF (Bad file number)

04-29 16:12:31.870: I/MocaLog(14255): 29T161231, T2, MessagingClientLib: getConfigProperty

04-29 16:12:31.870: W/System.err(14255): fsync failed: EBADF (Bad file number)

04-29 16:12:31.870: I/MocaLog(14255): 29T161231, T2, MessagingClientLib: getConfigProperty

04-29 16:12:31.870: W/System.err(14255): fsync failed: EBADF (Bad file number)

04-29 16:12:31.870: I/MocaLog(14255): 29T161231, T2, MessagingClientLib: getConfigProperty

04-29 16:12:31.870: W/System.err(14255): fsync failed: EBADF (Bad file number)

04-29 16:12:31.875: I/MocaLog(14255): 29T161231, T2, execute:  objectName='monet:DeviceManagement.dll:DeviceManagement' methodName='AddDeviceRegistration' param count(false)=9

04-29 16:12:31.875: W/System.err(14255): fsync failed: EBADF (Bad file number)

04-29 16:12:31.880: I/MocaLog(14255): 29T161231, T2, execute:  refreshing stale ServerVersionInfo

04-29 16:12:31.880: W/System.err(14255): fsync failed: EBADF (Bad file number)

04-29 16:12:31.880: I/MocaLog(14255): 29T161231, T2, Starting URL Template discovery

04-29 16:12:31.880: W/System.err(14255): fsync failed: EBADF (Bad file number)

04-29 16:12:31.880: I/MocaLog(14255): 29T161231, T2, Testing Relay Server URL Template:/tm/?cid=%cid%

04-29 16:12:31.880: W/System.err(14255): fsync failed: EBADF (Bad file number)

04-29 16:12:31.885: I/MocaLog(14255): 29T161231, T2, Cookies - setRequest:

04-29 16:12:31.885: W/System.err(14255): fsync failed: EBADF (Bad file number)

 

 

Coding:


private static final String NETWORK_PROTOKOL = "http";

    private static String USERNAME = "*******";

    private static String PASSWORD = "********";

    private static String HOST = "*******.*********.**.de"; // server: IP or















// name

    private static int PORT = 12345;

 

    private static final String applicationId = "hello22";

 

    private static int TIMEOUT = 100;

    // private CustomerListAdapter adapter;

    private static final String TAG = "MainActivity!";

 

    @Override

    protected void onCreate(final Bundle savedInstanceState) {


super.onCreate(savedInstanceState);

setContentView(R.layout.activity_main);

 


Log.v(TAG, "onCreate()");

 


// Initialize Application settings

final Application app = Application.getInstance();

 


// The identifier has to match the application ID deployed to the SUP

// server

app.setApplicationIdentifier(applicationId);

Hello22DB.getLogger().setLogLevel(LogLevel.TRACE);

// Set the android.content.Context for the application

app.setApplicationContext(this); // context is the










// android.content.Context

 


// ConnectionProperties has the infomation needed to register

// and connect to SUP server

final ConnectionProperties connProps = app.getConnectionProperties();

connProps.setServerName(HOST);

// 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.setPortNumber(PORT);

 


// if connecting using https without a relay server, set the network

// protocol

connProps.setNetworkProtocol(NETWORK_PROTOKOL);

 


// Set FarmId and UrlSuffix when connecting through the Relay Server.

 


// Provide user credentials

final LoginCredentials loginCred = new LoginCredentials(USERNAME,



PASSWORD);

connProps.setLoginCredentials(loginCred);

// Initialize generated package database class with this Application

// instance

Hello22DB.setApplication(app);

// ----- Register Application ----------------

 


if (app.getRegistrationStatus() != RegistrationStatus.REGISTERED) {


// If the application has not been registered to the server,


// register now


Log.v(TAG, "call registerApplication....");


app.registerApplication(TIMEOUT);


Log.v(TAG, "finished!");

 


} else {


// start the connection to server


Log.v(TAG, "call startConnection....");


app.startConnection(TIMEOUT);


Log.v(TAG, "finished!");

}

 

    }

 

 

 

Any ideas?


Viewing all articles
Browse latest Browse all 6147

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>