android & Smack

by Micka » Wed, 25 Jun 2008 00:07:38 GMT


Sponsored Links
 Hi,

i make a program on Android with the librairy smack.


It's work when i want to connect the server, easy !


but when i want t get the ServiceDiscoveryItem , i've a crash
system ... :


Uncaught handler: thread Main exiting due to uncaught exception

java.lang.RuntimeException: Unable to start activity
ComponentInfo{test.msn/test.msn.msn}: java.lang.ClassCastException:
Lorg/jivesoftware/smack/PacketReader$4;

at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
1758)

at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
1770)

at android.app.ActivityThread.access$1500(ActivityThread.java:99)

at android.app.ActivityThread$H.handleMessage(ActivityThread.java:
1271)
at android.os.Handler.dispatchMessage(Handler.java:80)
at android.os.Looper.loop(Looper.java:91)

at android.app.ActivityThread.main(ActivityThread.java:3052)

at java.lang.reflect.Method.invokeNative(Native Method)

at java.lang.reflect.Method.invoke(Method.java:356)

at android.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1547)

at android.os.ZygoteInit.main(ZygoteInit.java:1445)

at android.dalvik.NativeStart.main(Native Method)
Caused by: java.lang.ClassCastException: Lorg/jivesoftware/smack/
PacketReader$4;

at
org.jivesoftware.smackx.ServiceDiscoveryManager.discoverItems(ServiceDiscoveryManager.java:
462)
at
org.jivesoftware.smackx.ServiceDiscoveryManager.discoverItems(ServiceDiscoveryManager.java:
426)

at test.msn.msn.onCreate(msn.java:39)

at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:
847)

at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
1728)

... 11 more


i didn't unserstand!


that is my code to test the connection :

XMPPConnection connexion;

ConnectionConfiguration connConfig = new ConnectionConfiguration(
"xx.xxx.net", 5222);
connexion = new XMPPConnection(connConfig);

try{
connexion.connect();
connexion.login("micka", "micka");
}catch (XMPPException e){

}

ServiceDiscoveryManager serviceDiscoveryManager = new
ServiceDiscoveryManager(
connexion);
try {
serviceDiscoveryManager.discoverItems(connexion.getHost());

// return serviceDiscoveryManager.discoverItems(entityId);
} catch (XMPPException e) {
Log.e("msn","Can't get discovery items for entityId: "+
" : " + e);

} catch(NullPointerException e){

}

the probleme is in the discoveryintems function :(

can you help me ? please !

thank you very much !

--~--~---------~--~----~------------~-------~--~----~



android & Smack

by Micka » Fri, 27 Jun 2008 01:28:38 GMT


  discovered that the error is here :



smack 3.0.4 :



smack/XMPPConnection.java




if (isFirstInitialization) {
// Notify listeners that a new connection has been established
for (ConnectionCreationListener listener :
connectionEstablishedListeners) {
listener.connectionCreated(this); <== in this line

}
}







can you explain me, what i can do ?



On 24 juin, 17:49, Micka <[EMAIL PROTECTED]> wrote:
--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Other Threads

1. ADP1 shipping time to Portland, OR by FeDex Ground?

I have ordered an ADP1 on Apr 3, 2009, and here is the shipment travel
history:
Apr 4, 2009 08:38 Departed FedEx location CHICAGO, IL
Apr 3, 2009 22:09 Arrived at FedEx location CHICAGO, IL
Apr 3, 2009 19:54 Left FedEx origin facility WHEELING, IL
Apr 3, 2009 16:24 Arrived at FedEx location WHEELING, IL
Apr 3, 2009 16:19 Shipment information sent to FedEx
Apr 3, 2009 11:48 Picked up WHEELING, IL

Does anyone know how long will it take to ship ADP1 to Portland, OR by
FeDex Ground?

Thanks!

--~--~---------~--~----~------------~-------~--~----~

2. libexpat.so Error 1

Dear all...
I complier the Android source code for superH.
.....
....
....
host Executable: apriori (out/host/linux-x86/obj/EXECUTABLES/
apriori_intermediates/apriori)
true
Install: out/host/linux-x86/bin/apriori
target Prelink: libexpat (out/target/product/migor/symbols/system/lib/
libexpat.so)
build/tools/apriori/apriori.c(2261): Can't handle DT_RELA and
DT_RELASZ entries!
make: *** [out/target/product/migor/symbols/system/lib/libexpat.so]
Error 1

anyone could tell me what happened ?
THX
adik
--~--~---------~--~----~------------~-------~--~----~
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: 

3. How to change the background color of an element in a list ?

4. list of request codes - their names and values?

5. How To Rotate A View?

6. application un-installation protection

7. How to start oprofile in Android