bhq / asmack

Automatically exported from code.google.com/p/asmack
Other
0 stars 0 forks source link

Using the ServiceDiscoveryManager throws an error #17

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What are you doing to produce the error?
1. discoveryManager.discoverInfo or discoveryManager.discoverItems

What do you see instead? (Please attach a debug enabled logcat)
05-17 12:29:25.999: ERROR/AndroidRuntime(798): java.lang.RuntimeException:
Failure delivering result ResultInfo{who=null, request=0, result=2,
data=null} to activity {...}: java.lang.ClassCastException:
org.jivesoftware.smack.util.PacketParserUtils$2

What version of aSmack / Android / Device do you use?
the latest version of aSmack (2010.05.07)

What server do you use? Is there a public server to reproduce the problem?
OpenFire

Comments...
It seems like the smackx.jar is missing from the classpath... so none of
the relevant classes are being loaded... isn't smackx.jar already inbuilt
within asmack... or do I need to manually add this jar ? if so, could you
please let me know which version to add.. is there a specific one for
android or can I just use the general one found at "ignite realtime"

much appreciated

Original issue reported on code.google.com by eehk...@gmail.com on 17 May 2010 at 5:17

GoogleCodeExporter commented 9 years ago
ClassCastExceptions are cause whenever you've missed to register some parsing 
classes.

See
http://github.com/phonegap/phonegap-android/commit/947248fad673d398b6ca188012e32
497fd689d67
or
http://code.google.com/p/buddycloud/source/browse/trunk/client/android/main/src/
com/buddycloud/jbuddycloud/BuddycloudClient.java#45
to get an idea how to do it.

Regards,
  Rene

Original comment by rtreffer@gmail.com on 17 May 2010 at 7:55

GoogleCodeExporter commented 9 years ago
(DiscoverItems) result will get an error in ServiceDiscoveryManager.class ,the 
error is java.lang.ClassCastException: 
org.jivesoftware.smack.util.PacketParserUtils$2 ,I don not know how to do . 

Original comment by geolo...@gmail.com on 23 Jul 2010 at 11:12