Unexpected end of ZLIB input stream

Hic cup
Added almost 3 years ago


My java project as a client use jaxmpp. it works well in eclipse. But throw Exception as follow when i export as a Runnable JAR file.

The operation when throw exception is room_join. login is OK. Unexpected end of ZLIB input stream
        at Source)
        at Source)

tigase.jaxmpp.core.client.exceptions.JaxmppException: Not connected!
        at tigase.jaxmpp.core.client.JaxmppCore$2.write(
        at tigase.jaxmpp.core.client.JaxmppCore.send(
        at java.util.concurrent.Executors$ Source)
        at Source)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(Unknown Source)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ Source)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$ Source)
        at Source)


Replies (2)

Added by Wojciech Kapcia TigaseTeam almost 3 years ago

It looks like the problem with ZLIB compression - you can disable it with following:

jaxmpp.getProperties().setUserProperty(SocketConnector.COMPRESSION_DISABLED_KEY, Boolean.TRUE);

Added by Hic cup almost 3 years ago

think for replay!

It's caused by coding what i use is "utf-8",I export as a runnable jar file via ecilpse and run in cmd.

java -jar xx.jar

It's should be add args as follow.

java -Dfile.encoding=utf-8 jar xx.jar