我的代碼連接XMPP聊天應用程序是異常與服務器
try {
ConnectionConfiguration connConfig = new ConnectionConfiguration(hostname, portno, "");
conn = new XMPPConnection(connConfig);
conn.connect();
}
catch (XMPPException e)
{
throw new ProtocolException(e.toString());
}
如何解決這個問題呢?
07-23 11:54:08.126: W/dalvikvm(19805): VFY: unable to resolve static method 3144: Ljavax/swing/SwingUtilities;.invokeLater (Ljava/lang/Runnable;)V 07-23 11:54:08.126: D/dalvikvm(19805): VFY: replacing opcode 0x71 at 0x0006 07-23 11:54:08.126: D/dalvikvm(19805): VFY: dead code 0x0009-0009 in Lorg/jivesoftware/smackx/debugger/EnhancedDebugger;.userHasLogged (Ljava/lang/String;)V 07-23 11:54:09.507: W/System.err(19805): java.lang.reflect.InvocationTargetException 07-23 11:54:09.517: W/System.err(19805): at java.lang.reflect.Constructor.constructNative(Native Method) 07-23 11:54:09.517: W/System.err(19805): at java.lang.reflect.Constructor.newInstance(Constructor.java:415) 07-23 11:54:09.527: W/System.err(19805): at org.jivesoftware.smack.XMPPConnection.initReaderAndWriter(XMPPConnection.java:1027) 07-23 11:54:09.527: W/System.err(19805): at org.jivesoftware.smack.XMPPConnection.initConnection(XMPPConnection.java:850) 07-23 11:54:09.547: W/System.err(19805): at org.jivesoftware.smack.XMPPConnection.connectUsingConfiguration(XMPPConnection.java:834) 07-23 11:54:09.577: W/System.err(19805): at org.jivesoftware.smack.XMPPConnection.connect(XMPPConnection.java:1276) 07-23 11:54:09.607: W/System.err(19805): at com.src.protocol.XMPPProtocolManager.connect(XMPPProtocolManager.java:116) 07-23 11:54:09.607: W/System.err(19805): at com.src.screen.Login.onClick(Login.java:80) 07-23 11:54:09.607: W/System.err(19805): at android.view.View.performClick(View.java:2532) 07-23 11:54:09.607: W/System.err(19805): at android.view.View$PerformClick.run(View.java:9293) 07-23 11:54:09.617: W/System.err(19805): at android.os.Handler.handleCallback(Handler.java:587) 07-23 11:54:09.617: W/System.err(19805): at android.os.Handler.dispatchMessage(Handler.java:92) 07-23 11:54:09.627: W/System.err(19805): at android.os.Looper.loop(Looper.java:150) 07-23 11:54:09.627: W/System.err(19805): at android.app.ActivityThread.main(ActivityThread.java:4310) 07-23 11:54:09.637: W/System.err(19805): at java.lang.reflect.Method.invokeNative(Native Method) 07-23 11:54:09.637: W/System.err(19805): at java.lang.reflect.Method.invoke(Method.java:507) 07-23 11:54:09.647: W/System.err(19805): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839) 07-23 11:54:09.647: W/System.err(19805): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597) 07-23 11:54:09.657: W/System.err(19805): at dalvik.system.NativeStart.main(Native Method) 07-23 11:54:09.657: W/System.err(19805): Caused by: java.lang.NoClassDefFoundError: javax.swing.JTabbedPane 07-23 11:54:09.667: W/System.err(19805): at org.jivesoftware.smackx.debugger.EnhancedDebugger.createDebug(EnhancedDebugger.java:158) 07-23 11:54:09.667: W/System.err(19805): at org.jivesoftware.smackx.debugger.EnhancedDebugger.(EnhancedDebugger.java:147) 07-23 11:54:09.667: W/System.err(19805): ... 19 more 07-23 11:54:09.677: E/[Login.java] : onConnection :(19805): java.lang.NullPointerException 07-23 11:54:12.190: E/[Login.java] : login :(19805): java.lang.IllegalStateException: Not connected to server.
提供更多詳情 – emaillenin 2012-07-24 04:35:46