Hi,
I have developped my chat application using Smack with Eclipse and it works perfectly. As a matter of fact, I am trying to export my project in .jar archive but I am facing a strange problem…
I can run my application executing my .class with java -cp /output/smack.jar:/output/smackx.jar MainClass but I cannot run it when I add Smack’'s .class files with my own files. I get this error message:
+java.lang.ClassCastException
at org.jivesoftware.smackx.muc.MultiUserChat.getMUCUserExtension(MultiUserChat.jav a:1895)
at org.jivesoftware.smackx.muc.MultiUserChat.access$600(MultiUserChat.ja va:45)
at org.jivesoftware.smackx.muc.MultiUserChat$8.processPacket(MultiUserCh at.java:2110)
at org.jivesoftware.smack.PacketReader$ListenerWrapper.notifyListener(PacketReader .java:563)
at org.jivesoftware.smack.PacketReader.processListeners(PacketReader.jav a:218)
at org.jivesoftware.smack.PacketReader.access$100(PacketReader.java:42)
at org.jivesoftware.smack.PacketReader$2.run(PacketReader.java:70)+
I am using the smack-dev-2005-03-03 version of Smack and I tried several way to solve the problem:
-
extract .class files from smack.jar and smackx.jar files
-
use ant script outputs
-
recompile from sources
-
…
Since I have no idea why I can only run my application with Smack’‘s .jar files and not with Smack’'s .class files, could you give me some help/ideas?