JAX-RS Web Services are not returning GZIP responses after upgrading to JBoss EAP 6.4.14
Issue
After upgrading to JBoss EAP 6.4.14 we are seeing that our JAX-RS resources are not returning ZIP content anymore. It happens even when we have the org.jboss.resteasy.annotations.GZIP annotation on the JAX-RS methods.
When we use RESTEasy client we have an exception:
org.jboss.resteasy.spi.ReaderException: java.util.zip.ZipException: Not in GZIP format
at org.jboss.resteasy.client.core.BaseClientResponse.readFrom(BaseClientResponse.java:466)
at org.jboss.resteasy.client.core.BaseClientResponse.getEntity(BaseClientResponse.java:376)
at org.jboss.resteasy.client.core.BaseClientResponse.getEntity(BaseClientResponse.java:351)
at org.jboss.resteasy.client.core.extractors.BodyEntityExtractor.extractEntity(BodyEntityExtractor.java:62)
at org.jboss.resteasy.client.core.ClientInvoker.invoke(ClientInvoker.java:127)
at org.jboss.resteasy.client.core.ClientProxy.invoke(ClientProxy.java:89)
at com.sun.proxy.$Proxy24.echo(Unknown Source)
(....)
Caused by: java.util.zip.ZipException: Not in GZIP format
at java.util.zip.GZIPInputStream.readHeader(GZIPInputStream.java:165)
at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:79)
at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:91)
at org.jboss.resteasy.plugins.interceptors.encoding.GZIPDecodingInterceptor$FinishableGZIPInputStream.<init>(GZIPDecodingInterceptor.java:30)
at org.jboss.resteasy.plugins.interceptors.encoding.GZIPDecodingInterceptor.read(GZIPDecodingInterceptor.java:47)
at org.jboss.resteasy.core.interception.MessageBodyReaderContextImpl.proceed(MessageBodyReaderContextImpl.java:109)
at org.jboss.resteasy.client.core.BaseClientResponse.readFrom(BaseClientResponse.java:430)
... 31 more
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 6.4.14
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
