This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | IllegalStateException on Kenai login, if project chat room contains malformed message | ||
---|---|---|---|
Product: | connecteddeveloper | Reporter: | Petr Dvorak <joshis> |
Component: | Chat | Assignee: | Jan Becicka <jbecicka> |
Status: | STARTED --- | ||
Severity: | normal | CC: | blaha, jglick, juhrik, tpavek |
Priority: | P3 | ||
Version: | 6.x | ||
Hardware: | PC | ||
OS: | Mac OS X | ||
URL: | http://www.igniterealtime.org/issues/browse/SMACK-307 | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: |
patch for smack
stacktrace Patched smack.jar |
Description
Petr Dvorak
2009-11-16 05:03:20 UTC
Hmm... actually, the chat works strange... I see number of the messages, sometimes even messages for a particular chatroom, but I am not able to send messages... :( Probably some idiotic server issue again... Any time login to kenai? It seems to be stopper! It is anytime I login to Kenai using my Sun account. Other logins, for example cdev_unit/****** works fine, no exception is thrown. It does not work for me as well. Needs to be properly evaluated. I did some debugging and problem seems to be in invalid message in chatroom of project "kenai": -------------- <message xmlns='jabber:client' from='kenai@muc.kenai.com/Frederic Jean' id='1258145104804+purplef5b633d8' to='jbecicka@kenai.com/NetBeans' type='groupchat' xml:lang='en'><body>502 - Bad Gateway A 502 status code indicates that a server, while acting as a proxy, received a response from a server further upstream that it judged invalid.</body><body xmlns='http://www.w3.org/1999/xhtml'><span style='font-weight: bold;'>502 - Bad Gateway</span>A 502 status code indicates that a server, while acting as a proxy, received a response from a server further upstream that it judged invalid.</body><delay xmlns='urn:xmpp:delay' stamp='2009-11-13T20:45:04.804+00:00'/></message> ----------------- this message cause error in Smack (xmpp library): ----------------- org.xmlpull.v1.XmlPullParserException: parser must be on START_TAG or TEXT to read text (position: START_TAG seen ...s=\'http://www.w3.org/1999/xhtml\'><span style=\'font-weight: bold;\'>... @143:226) at org.xmlpull.mxp1.MXParser.nextText(MXParser.java:1071) at org.jivesoftware.smack.util.PacketParserUtils.parseMessage(PacketParserUtils.java:89) at org.jivesoftware.smack.PacketReader.parsePackets(PacketReader.java:272) at org.jivesoftware.smack.PacketReader.access$000(PacketReader.java:44) at org.jivesoftware.smack.PacketReader$1.run(PacketReader.java:76) ------------------ The problematic message above has 2 <body> elements, which is against xmpp spec: http://www.ietf.org/rfc/rfc3921.txt --------------------- 2.1.2.2. Body The <body/> element contains human-readable XML character data that specifies the textual contents of the message; this child element is normally included but is OPTIONAL. The <body/> element MUST NOT possess any attributes, with the exception of the 'xml:lang' attribute. Multiple instances of the <body/> element MAY be included but only if each instance possesses an 'xml:lang' attribute with a distinct language value. The <body/> element MUST NOT contain mixed content (as defined in Section 3.2.2 of [XML]). --------------------- Bug reported to smack: http://www.igniterealtime.org/community/message/198213 *** Bug 168234 has been marked as a duplicate of this bug. *** Happens to me when I am logged in using my @sun.com account. I am a member of several projects. Jesse, of course you are member of several projects. But kenai.com project "kenai" contains some invalid xmpp messages in its project chat room, which cause Smack Library serious problems which leads to this bug. Ah, I misparsed your question. Yes, I am a member of the 'kenai' project. Created attachment 93092 [details]
patch for smack
patch for smack.jar
better patch available at http://www.igniterealtime.org/community/thread/41420 Created attachment 97128 [details]
stacktrace
Just logged in to Kenai.
OK. So what to do with this issue? The bug is in smack library. We have a patch, which was tested by author and me will not be integrated into official smack release in near future, because smack project is not very active. I'm attaching patched version of smack.jar for testing. We have 2 options: 1. Close this bug as invalid (the bug is not in netbeans code) 2. Waive the bug for 6.9 and wait, if the new version of smack will include this patch 3. Test the patch and if it is OK, distribute patched smack with NetBeans Created attachment 97142 [details]
Patched smack.jar
replacement for ide/modules/ext/smack.jar
waiver request justification: IllegalStateException is thrown, if malformed chat message is sent to team project chat room. The bug is not in NetBeans code, but in smack library, which is out of NetBeans control. Also we have patch for smack.jar, we cannot expect, that the patch will be integrated into smack SVN repository in 69 timeframe. I propose to waive this bug. Exception is now only informational. http://hg.netbeans.org/main-silver?cmd=changeset;node=6e2c3a677744 Integrated into 'main-golden', will be available in build *201005122200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/ User: Log: Will be probably fixed in Smack 3.1.1. http://www.igniterealtime.org/issues/browse/SMACK-307 |