本文主要是介绍java.lang.IllegalArgumentException: Illegal JID,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
1 问题描述
做微信在线客服时,连接openfire,跟踪源码,出现如下问题。而且发现起了很多线程。
Exception in thread "httpbind-worker-12" java.lang.IllegalArgumentException: Illegal JID: zx0001@[object HTMLInputElement]/Stropheat org.xmpp.packet.JID.<init>(JID.java:542)at org.xmpp.packet.Packet.<init>(Packet.java:94)at org.xmpp.packet.IQ.<init>(IQ.java:105)at org.jivesoftware.openfire.SessionPacketRouter.getIQ(SessionPacketRouter.java:86)at org.jivesoftware.openfire.SessionPacketRouter.route(SessionPacketRouter.java:67)at org.jivesoftware.openfire.http.HttpSession.sendPendingPackets(HttpSession.java:639)at org.jivesoftware.openfire.http.HttpSession$HttpPacketSender.run(HttpSession.java:1271)at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalArgumentException: The input is not a valid JID domain part: [object HTMLInputElement]at org.xmpp.packet.JID.domainprep(JID.java:368)at org.xmpp.packet.JID.<init>(JID.java:530)... 9 more
2 解决方案
出现多个线程的原因,是因为我前台js启动了一个定时器,几秒就发起iq请求,
The input is not a valid JID domain part: [object HTMLInputElement]
则表明self.connection.ping.ping(seat,_success, _error);
中seat的值是错误的。
这篇关于java.lang.IllegalArgumentException: Illegal JID的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!