I am randomly getting following exception, when I try to make a connection (xmppConnection = new XMPPConnection(serverUrl) to my Jabber server (Openfire).
org.xmlpull.v1.XmlPullParserException: processing instruction can not have PITarget with reserveld xml name (position: END_TAG seen … at org.xmlpull.mxp1.MXParser.parsePI(MXParser.java:2453)
at org.xmlpull.mxp1.MXParser.nextImpl(MXParser.java:1245)
at org.xmlpull.mxp1.MXParser.next(MXParser.java:1093)
at org.jivesoftware.smack.PacketReader.parsePackets(PacketReader.java:382)
at org.jivesoftware.smack.PacketReader.access$000(PacketReader.java:43)
at org.jivesoftware.smack.PacketReader$1.run(PacketReader.java:63)
I’ve had the same issue and solved it so as this is the first post appearing in google when searching for the error I thought it could be useful to someone.
I actually had this issue during a trip far from my work place where the server is. And it appeared that the issue was the “packetReplyTimeout”. So after commenting out this line: