powered by Jive Software

SAXParseError

I’‘ve added a jabber:iq:version provider to smack - which works most of the time. Sometimes, however, it crashes jbother. Here’'s an instance when it does:

smack recieves this packet:

<iq xmlns=''jabber:client'' from=''aim-transport.linuxpowered.com'' type=''error'' id=''pV4QA-5'' to=''mysticone@jabber.linuxpowered.com/Home''>
<error xmlns=''urn:ietf:params:xml:ns:xmpp-stanzas'' type=''cancel''>
<text xmlns=''urn:ietf:params:xml:ns:xmpp-stanzas''> Not implemented.</text>
</error>
</iq>

Which causes this exception:

** Transformation error  org.xml.sax.SAXParseException: Value must be quoted. org.xml.sax.SAXParseException: Value must be quoted.     at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3376)     at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3364)     at org.apache.crimson.parser.Parser2.parseLiteral(Parser2.java:861)     at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1583)     at org.apache.crimson.parser.Parser2.content(Parser2.java:1963)     at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1691)     at org.apache.crimson.parser.Parser2.content(Parser2.java:1963)     at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1691)     at org.apache.crimson.parser.Parser2.content(Parser2.java:1963)     at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1691)     at org.apache.crimson.parser.Parser2.content(Parser2.java:1963)     at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1691)     at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:667)     at org.apache.crimson.parser.Parser2.parse(Parser2.java:337)     at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:448)     at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:452)     at org.jivesoftware.smackx.debugger.EnhancedDebugger.formatXML(EnhancedDebugger.java:724)     at org.jivesoftware.smackx.debugger.EnhancedDebugger.addReadPacketToTable(EnhancedDebugger.java:644)     at org.jivesoftware.smackx.debugger.EnhancedDebugger.access$000(EnhancedDebugger.java:51)     at org.jivesoftware.smackx.debugger.EnhancedDebugger$1.processPacket(EnhancedDebugger.java:161)     at org.jivesoftware.smack.PacketReader$ListenerWrapper.notifyListener(PacketReader.java:823)     at org.jivesoftware.smack.PacketReader.processListeners(PacketReader.java:227)     at org.jivesoftware.smack.PacketReader.access$100(PacketReader.java:45)     at org.jivesoftware.smack.PacketReader$2.run(PacketReader.java:79)

Hey Adam,

I think that you just hit two different issues.

Issue 1: Smack does not have full support for XMPP 1.0 That includes the lack of support for errors. Smack requires the error to include a code as a way to identity the type of error. Anyway, I just made a modification so that errors could be parsed even if they don’'t have an error code. Currently, if an error occurs while parsing the XML stanza, the connection gets closed.

Issue 2: The stack trace that you got comes from the debugger while trying to pretty print the received XML packet. It seems that you got a packet that was not correctly formed in order to print it. You may want to ignore that error message.

Regards,

– Gato