Connection getting closed

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):

10-09 20:25:31.574 16420-16568/com.griffin D/SMACK﹕ RCV (0):

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): Online

10-09 20:25:31.804 16420-16567/com.griffin D/SMACK﹕ SENT (0):

10-09 20:25:31.874 16420-16568/com.griffin D/SMACK﹕ RCV (0): Online

10-09 20:25:32.184 16420-16568/com.griffin D/SMACK﹕ RCV (0):

10-09 20:25:40.629 16420-16567/com.griffin D/SMACK﹕ SENT (0): 1525BB6C84475464F40F76462C9EE6FF5154FB2C896 66EDB11D1BE71C912CAACEAF8B46A069DCEAA5BE286CB8B659A806B380F556C8BAA62EBB156144A2 297976930846A16D23843F354018EB9AFCDEA1F

10-09 20:25:40.994 16420-16568/com.griffin D/SMACK﹕ RCV (0): +989845351839+40984535 1839,+419845351839,+489845351839,+599845351839,+919764224003

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 .
GriffinFilter.java (357 Bytes)
GriffinIQProvider.java (2328 Bytes)
GriffinIQ.java (2793 Bytes)

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

Because

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)

Thanks Flow .

I had to create a new packet .

It works now.

Can you please help me Chat App for Android using a XMPP Server and Firebase Cloud Messaging for Push Notifications - Stack Overflow