org.xmlpull.v1.XmlPullParserException: start tag not allowed in epilog but

Hi all,

I’‘m working with smack 2.1 and 2.2, I’'m developing a java client to connect to my jabber server ‘‘sun1.org’’.

My server is running on port 5222.[/b]

I’‘ve tried with PLAIN and SSL connections. But I’'m not able to logged in.

From Exodus I’'m able to logged into my server sun1.org - PLAIN connection only

I’'m providing the trace here,

With PLAIN connection:[/b]


code:[/b]

XMPPConnection connection = new XMPPConnection(“sun1.org”, 5222);

connection.login(userName, password, “MyClient”);

I got below exception

org.xmlpull.v1.XmlPullParserException: start tag not allowed in epilog but got i (position: END_TAG seen …</stream:features><i… @1:187) /b

Debugger Trace:[/b]

Sent[/b]

Received[/b]

With SSL connection:[/b]


code:[/b]

XMPPConnection connection = new SSLXMPPConnection(“sun1.org”, 5222);

connection.login(userName, password, “MyClient”);

I got below exception

javax.net.ssl.SSLException: Connection has been shutdown: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?[/b]

Debugger Trace:[/b]

Sent[/b] <stream:stream to=“sun1.org” xmlns=“jabber:client” xmlns:stream=“http://etherx.jabber.org/streams”>

Received[/b] - I didnt get any response from server.

I’'ve tried with Thread.sleep(1000); before Login also, but no use.

Is there any thing wrong with my code or smack api?

Any help would be appreciated greatly.

Thanks & regards,

Rajesh Manem

Hey Rajesh,

In your Received section there is something weird:

Which server are you using? Have you copied that content from the raw tab of the debugger? The server is closing a stream:features element that was never opened. So Smack is detecting that error.

Regarding the “javax.net.ssl.SSLException: Connection has been shutdown: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?” exception. Which server are you using and which version? If you are using Wildfire 2.6.2 or previous then could you test using the latest nightly build and see if it happens again?

Regards,

– Gato

Hey Rajesh,

Whoops, I misread the received XML. The server is opening and closing the stream:features element. However, the server is not sending a new stream header after SASL was successful. So my questions still apply.

– Gato

Hi Gato,

Thanks for the reply.

I’'m using sun1.org[/b] server.

Yes, I’‘ve copied the content from Lite debugger trace. I’'ve enble debugger in my code

using the statement XMPPConnection.DEBUG_ENABLED = true;[/b]

Regarding the “javax.net.ssl.SSLException”, I’'m using my XMPP Server

sun1.org[/b]

From Exodus, I’‘m able to connect and logged into my server (Here I’'m using PLAIN connection only).

From my Java app I’'m getting these exceptions, with or without using SSL.

Thanks,

Rajesh