Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    SmartGWT + Jetty8 Compression Filter + Logging Issue

    Isomorphic SmartClient Framework
    (v8.2p_2012-08-22/PowerEdition Deployment 2012-08-22)

    Hi,

    I'm trying to deploy a web application to jetty8 server.

    When I put the exact same application that I run on Tomcat, I have 2 issues:

    1) I have attached log4j config, notmally on tomact/log foler, I have a KasBoxClient.log file but it didn't cretad on jetty8.

    2) ın web.xml, I have default smartgwt compression filter, but it gave error like below:

    Code:
    === 2013-07-05 13:36:02,448 [2-17] ERROR Compression - Caught exception in doFilter() - for URI: /KasBox_2.0/KasBox.html
    java.lang.IllegalStateException: NO CONTENT
    	at org.eclipse.jetty.http.HttpGenerator.addContent(HttpGenerator.java:176)
    	at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:155)
    	at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:107)
    	at java.io.ByteArrayOutputStream.writeTo(ByteArrayOutputStream.java:109)
    	at com.isomorphic.compression.ServletCompression.compressAndSend(ServletCompression.java:159)
    	at com.isomorphic.servlet.CompressionFilter.doFilter(CompressionFilter.java:386)
    	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419)
    	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:455)
    	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
    	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)
    	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
    	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1075)
    	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:384)
    	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
    	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1009)
    	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
    	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
    	at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
    	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
    	at org.eclipse.jetty.server.Server.handle(Server.java:370)
    	at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)
    	at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:949)
    	at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1011)
    	at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:644)
    	at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
    	at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
    	at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:668)
    	at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
    	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
    	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
    	at java.lang.Thread.run(Thread.java:662)

    I changes the smartgwt Compression filter with below jetty compression filter like below and everything is fine. I just want to understand why it's different with Tomcat and Jetty

    This doesnt work on Jetty, cause error
    Code:
    	<filter>
    		<filter-name>CompressionFilter</filter-name>
    		<filter-class>com.isomorphic.servlet.CompressionFilter</filter-class>
    	</filter>
    	<!-- CompressionFilter for dynamic compression -->
    	<filter-mapping>
    		<filter-name>CompressionFilter</filter-name>
    		<url-pattern>/*</url-pattern>
    	</filter-mapping>
    this seems fine, no error on the log
    Code:
    <filter>
        <filter-name>GzipFilter</filter-name>
        <filter-class>org.eclipse.jetty.servlets.GzipFilter</filter-class>
        <init-param>
            <param-name>mimeTypes</param-name>
            <param-value>text/html,text/plain,text/xml,application/xhtml+xml,text/css,application/javascript,application/x-javascript,image/svg+xml</param-value>
        </init-param>
    	</filter>
    	<filter-mapping>
    		<filter-name>GzipFilter</filter-name>
    		<url-pattern>/*</url-pattern>
    	</filter-mapping>

    Can I get your idea on that? do I need to add any Jetty libs during compile or something??
    Attached Files

    #2
    Any news

    I've updated my GWT to 2.6 today, and am getting this same error inside eclipse. Is there any info how to deal with this issue? I deploy to tomcat so ideally I don't want to edit my web.xml file into jetty specific compression

    Comment


      #3
      I've also the same error...

      Comment

      Working...
      X