users@jersey.java.net

RE: [Jersey] fastinfoset and gzip

From: Florian Hehlen <Florian.Hehlen_at_imc.nl>
Date: Thu, 21 Jan 2010 14:33:23 +0100

If I unzip the content of the the file(attached) obtained when doing the call:

$ curl -s -HAccept:application/fastinfoset -HAccept-encoding:gzip http://localhost:8080/symbol/desc/DAX30

it contains the stack trace from below in plain text.

The server logs contain the following:

Jan 21, 2010 2:28:23 PM com.sun.jersey.api.container.filter.LoggingFilter filter
INFO: 3 * Server in-bound request
3 > GET http://melanie.trading.imc.intra:8080/symbol/desc/DAX30
3 > x-imforwards: 20
3 > accept-encoding: gzip
3 > connection: keep-alive
3 > host: melanie.trading.imc.intra:8080
3 > user-agent: curl/7.19.6 (x86_64-redhat-linux-gnu) libcurl/7.19.6 NSS/3.12.4.1 Beta zlib/1.2.3 libidn/1.9 libssh2/1.0
3 > via: 1.1 zugprx001.nl.imc.local:3128 (IronPort-WSA/5.6.2-102)
3 > accept: application/fastinfoset
3 >

Jan 21, 2010 2:28:23 PM com.sun.jersey.spi.container.ContainerResponse write
SEVERE: A message body writer for Java type, class java.util.ArrayList, and MIME media type, application/fastinfoset, was not found
Jan 21, 2010 2:28:23 PM com.sun.jersey.server.impl.application.WebApplicationImpl onException
SEVERE: Internal server error
javax.ws.rs.WebApplicationException
       at com.sun.jersey.spi.container.ContainerResponse.write(ContainerResponse.java:253)
       at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:814)
       at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:740)
       at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:731)
       at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:372)
       at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:452)
       at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:633)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
       at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
       at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
       at java.lang.Thread.run(Thread.java:619)
Jan 21, 2010 2:28:23 PM com.sun.jersey.api.container.filter.LoggingFilter$Adapter finish
INFO: 3 * Server out-bound response
3 < 500
3 < Content-Type: text/plain
3 <
­�

Cheers,
Florian

From: Paul.Sandoz_at_Sun.COM [mailto:Paul.Sandoz_at_Sun.COM]
Sent: 21 January, 2010 13:01
To: users_at_jersey.dev.java.net
Subject: Re: [Jersey] fastinfoset and gzip

Hi Florian,

Is there any additional output logged? for example:

  A message body writer for Java type...

The GZIP filter is generic so it should not really matter what the content to be GZIP'ed is.

Paul.

On Jan 21, 2010, at 10:15 AM, Florian Hehlen wrote:


Hi,

I am doing some tests on my server using curl on the command line.

I have added the gzip filter to some size and speed tests. Combining fastinfoste and the gzip encoding fails.

Jan 21, 2010 11:06:35 AM com.sun.jersey.server.impl.application.WebApplicationImpl onException
SEVERE: Internal server error
javax.ws.rs.WebApplicationException
       at com.sun.jersey.spi.container.ContainerResponse.write(ContainerResponse.java:253)
       at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:814)
       at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:740)
       at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:731)
       at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:372)
       at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:452)
       at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:633)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
       at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
       at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
       at java.lang.Thread.run(Thread.java:619)

Using fastinfoset on it’s own is working fine. Using gzip encoding with other media types like xml and json works fine.

Is there something special to setup or is just not possible to combine the 2?

Cheers,
Florian

________________________________
The information in this e-mail is intended only for the person or entity to which it is addressed.

It may contain confidential and /or privileged material. If someone other than the intended recipient should receive this e-mail, he / she shall not be entitled to read, disseminate, disclose or duplicate it.

If you receive this e-mail unintentionally, please inform us immediately by "reply" and then delete it from your system. Although this information has been compiled with great care, neither IMC Financial Markets & Asset Management nor any of its related entities shall accept any responsibility for any errors, omissions or other inaccuracies in this information or for the consequences thereof, nor shall it be bound in any way by the contents of this e-mail or its attachments. In the event of incomplete or incorrect transmission, please return the e-mail to the sender and permanently delete this message and any attachments.

Messages and attachments are scanned for all known viruses. Always scan attachments before opening them.


________________________________
The information in this e-mail is intended only for the person or entity to which it is addressed.

It may contain confidential and /or privileged material. If someone other than the intended recipient should receive this e-mail, he / she shall not be entitled to read, disseminate, disclose or duplicate it.

If you receive this e-mail unintentionally, please inform us immediately by "reply" and then delete it from your system. Although this information has been compiled with great care, neither IMC Financial Markets & Asset Management nor any of its related entities shall accept any responsibility for any errors, omissions or other inaccuracies in this information or for the consequences thereof, nor shall it be bound in any way by the contents of this e-mail or its attachments. In the event of incomplete or incorrect transmission, please return the e-mail to the sender and permanently delete this message and any attachments.

Messages and attachments are scanned for all known viruses. Always scan attachments before opening them.