i 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:
> 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 !
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to