Project

General

Profile

Unexpected end of ZLIB input stream

Hic cup
Added almost 3 years ago

Hi!

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.

java.io.EOFException: Unexpected end of ZLIB input stream
        at java.util.zip.InflaterInputStream.fill(Unknown Source)
        at java.util.zip.InflaterInputStream.read(Unknown Source)
        at tigase.jaxmpp.j2se.connectors.socket.TextStreamReader.read(TextStreamReader.java:49)
        at tigase.jaxmpp.j2se.connectors.socket.Worker.run(Worker.java:99)

tigase.jaxmpp.core.client.exceptions.JaxmppException: Not connected!
        at tigase.jaxmpp.core.client.JaxmppCore$2.write(JaxmppCore.java:168)
        at tigase.jaxmpp.core.client.JaxmppCore.send(JaxmppCore.java:583)
        at com.cai.im.JaxmppManager$SingleTask.run(JaxmppManager.java:359)
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(Unknown Source)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)

thx!


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

    (1-2/2)