Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GWTGzipFilter doesn't work with Spring Boot #5

Closed
heyarny opened this issue Feb 9, 2017 · 6 comments
Closed

GWTGzipFilter doesn't work with Spring Boot #5

heyarny opened this issue Feb 9, 2017 · 6 comments

Comments

@heyarny
Copy link

heyarny commented Feb 9, 2017

There is some kind of recursive error happening.

java.lang.StackOverflowError: null at org.eclipse.jetty.server.Dispatcher$IncludeAttributes.getAttribute(Dispatcher.java:400) ~[jetty-server-9.4.1.v20170120.jar:9.4.1.v20170120] at org.eclipse.jetty.server.Dispatcher$IncludeAttributes.getAttribute(Dispatcher.java:400) ~[jetty-server-9.4.1.v20170120.jar:9.4.1.v20170120] at org.eclipse.jetty.server.Dispatcher$IncludeAttributes.getAttribute(Dispatcher.java:400) ~[jetty-server-9.4.1.v20170120.jar:9.4.1.v20170120] at org.eclipse.jetty.server.Dispatcher$IncludeAttributes.getAttribute(Dispatcher.java:400) ~[jetty-server-9.4.1.v20170120.jar:9.4.1.v20170120] at org.eclipse.jetty.server.Dispatcher$IncludeAttributes.getAttribute(Dispatcher.java:400) ~[jetty-server-9.4.1.v20170120.jar:9.4.1.v20170120] at org.eclipse.jetty.server.Dispatcher$IncludeAttributes.getAttribute(Dispatcher.java:400) ~[jetty-server-9.4.1.v20170120.jar:9.4.1.v20170120] at org.eclipse.jetty.server.Dispatcher$IncludeAttributes.getAttribute(Dispatcher.java:400) ~[jetty-server-9.4.1.v20170120.jar:9.4.1.v20170120]

This is happening on GWTGzipFilter only.
The cache filter is working as intended.

@realityforge
Copy link
Owner

It seems it may be a bug in the way the container handles the way it is mapped. A similar bug is reported at https://bugs.eclipse.org/bugs/show_bug.cgi?id=444124 except this one is manifested by setAttribute call. However googling around it seems like there be other ways to trigger it. How is it being mapped - what does the web.xml fragment look like?

@heyarny
Copy link
Author

heyarny commented Feb 9, 2017

Actually there is no web.xml in spring boot.
You just use beans to attach filters, like so:

@Configuration
public class WebFiltersConfig {

	@Bean
	public FilterRegistrationBean gwtCacheFilterRegistration() {
	    FilterRegistrationBean registration = new FilterRegistrationBean();
	    registration.setFilter(gwtCacheFilter());
	    registration.addUrlPatterns("/_res_user/*");
	    registration.setName("gwtCacheFilter");
	    return registration;
	}

	@Bean(name = "gwtCacheFilter")
	public Filter gwtCacheFilter() {
	    return new GWTCacheControlFilter();
	}

}

The GWTCacheControlFilter is working, but GWTGzipFilter is not.

@realityforge
Copy link
Owner

If you change the line registration.setName("gwtCacheFilter"); to registration.setName("GWTGzipFilter"); does it work? The underlying filter has a different name and this may fix it if spring boot does any annotation scanning.

@heyarny
Copy link
Author

heyarny commented Feb 10, 2017

@realityforge that didn't work either

@realityforge
Copy link
Owner

Unfortunately I don't have any more ideas but if you come up with something please post back here

@realityforge
Copy link
Owner

Closing this as no ability to reproduce and long period of no activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants