powered by Jive Software

Smack 3.3.1 jar not working in eclipse ADT

Hi All,

I added all the jar into eclipse ADT. Below was my connection to my locally setup openfire server.

private String Connection() throws XMPPException

{

txtUid = (EditText)findViewById(R.id.txt_uid);

txtPass= (EditText)findViewById(R.id.txt_pass);

String sReply = “”;

ConnectionConfiguration config = new ConnectionConfiguration(“10.0.2.2”);

//ConnectionConfiguration config = new ConnectionConfiguration(“10.0.2.2”, 5222,“localhost”);

//ConnectionConfiguration config = new ConnectionConfiguration(“eclipsercp.org”);

XMPPConnection connection = new XMPPConnection(config);

try

{

connection.connect();

connection.login(txtUid.getText().toString().trim(), txtPass.getText().toString().trim());

//connection.login(“reader”, “secret”, Long.toString(System.currentTimeMillis()));

Presence presence = new Presence(Presence.Type.available);

connection.sendPacket(presence);

sReply = “Connected.”;

}

catch (XMPPException ex)

{

sReply = ex.toString();

}

return sReply;

}

The connection.connect(); method was executed successful without any error or exception. When came to connection.login(txtUid.getText().toString().trim(), txtPass.getText().toString().trim()); eclipse ADT shows Source Not Found page without any XMPPException at all. So i don’t know what is the error i encountered. i’ve tested my openfire server with spark IM, all features worked fine where by i can chat using the users created in the admin console. kindly need help from anyone on this issue. thanks.

Kindly refer to my attached print screen for more detail. hope to hear from anyone soon. thanks.
log.txt.zip (2132 Bytes)