AnsweredAssumed Answered

Connection getting closed

Question asked by nsaoly on Oct 9, 2014
Latest reply on Jan 20, 2017 by vishal patoliya

Hello  ,

I followed Brief Tutorial on IQ Providers  and created a custom IQ for req. it was working good before i upgrade to asmack 4.x

after upgrade it disconnects by sending <<"</stream:stream>">>

 

I first authenticate then send my custom IQ server send the result when client parses the result it sends the <<"</stream:stream>">> and sever disconnects it.

Below is the log.

 

10-09 20:25:31.294  16420-16567/com.griffin D/SMACK﹕ SENT (0): <iq id='QO8B6-1' type='set'><session xmlns="urn:ietf:params:xml:ns:xmpp-session"/></iq>

10-09 20:25:31.574  16420-16568/com.griffin D/SMACK﹕ RCV (0): <iq type='result' id='QO8B6-1'/>

10-09 20:25:31.599  16420-16420/com.griffin D/SMACK﹕ User logged (0): +989845351839@ec2-57-101-132-5.compute-1.amazonaws.com/C5F731CA@ec2-57-101-132-5.compute-1.amazonaws.com

10-09 20:25:31.624  16420-16420/com.griffin D/ConnectionsManager﹕ authenticated

10-09 20:25:31.624  16420-16420/com.griffin D/GriffinAccounts﹕ Authenticated user+989845351839

10-09 20:25:31.634  16420-16567/com.griffin D/SMACK﹕ SENT (0): <presence id='QO8B6-2'><status>Online</status></presence>

10-09 20:25:31.804  16420-16567/com.griffin D/SMACK﹕ SENT (0): <iq id='QO8B6-3' type='get'><query xmlns='jabber:iq:roster'></query></iq>

10-09 20:25:31.874  16420-16568/com.griffin D/SMACK﹕ RCV (0): <presence from='+989845351839@ec2-75-101-132-5.compute-1.amazonaws.com/C5F731CA' to='+989845351839@ec2-75-101-132-5.compute-1.amazonaws.com/C5F731CA' id='QO8B6-2'><status>Online</status></presence>

 

10-09 20:25:32.184  16420-16568/com.griffin D/SMACK﹕ RCV (0): <iq from='+989845351839@ec2-75-101-132-5.compute-1.amazonaws.com' to='+989845351839@ec2-75-101-132-5.compute-1.amazonaws.com/C5F731CA' id='QO8B6-3' type='result'><query xmlns='jabber:iq:roster'/></iq>

 

10-09 20:25:40.629  16420-16567/com.griffin D/SMACK﹕ SENT (0): <iq id='QO8B6-4' to='ec2-75-101-132-5.compute-1.amazonaws.com' type='get'><query xmlns='griffin:iq:user'><verifyuser>1525BB6C84475464F40F76462C9EE6FF5154FB2C896 66EDB11D1BE71C912CAACEAF8B46A069DCEAA5BE286CB8B659A806B380F556C8BAA62EBB156144A2 297976930846A16D23843F354018EB9AFCDEA1F</verifyuser></query></iq>

10-09 20:25:40.994  16420-16568/com.griffin D/SMACK﹕ RCV (0): <iq from='ec2-75-101-132-5.compute-1.amazonaws.com' to='+989845351839@ec2-75-101-132-5.compute-1.amazonaws.com/C5F731CA' id='QO8B6-4' type='result'><query xmlns='griffin:iq:user'><username>+989845351839</username><verifyuser>+40984535 1839,+419845351839,+489845351839,+599845351839,+919764224003</verifyuser></query ></iq>

10-09 20:25:48.469  16420-16567/com.griffin D/SMACK﹕ SENT (0): </stream:stream>

10-09 20:25:48.489  16420-16568/com.griffin W/XMPPConnection﹕ Connection closed with error

    java.lang.NullPointerException

            at com.griffin.messenger.GriffinIQProvider.parseIQ(GriffinIQProvider.java:21)

            at org.jivesoftware.smack.util.PacketParserUtils.parseIQ(PacketParserUtils.java:46 3)

            at org.jivesoftware.smack.tcp.PacketReader.parsePackets(PacketReader.java:170)

            at org.jivesoftware.smack.tcp.PacketReader.access$000(PacketReader.java:47)

            at org.jivesoftware.smack.tcp.PacketReader$1.run(PacketReader.java:81)

10-09 20:25:48.519  16420-16568/com.griffin D/ConnectionsManager﹕ connectionClosedOnError

10-09 20:25:48.524  16420-16568/com.griffin D/SMACK﹕ Connection closed due to an exception (0)

 

Attavhed are my custom classes .

 

Why is it sending the  10-09 20:25:48.469  16420-16567/com.griffin D/SMACK﹕ SENT (0): </stream:stream>

 

Please help .

Outcomes