-
Bug Report
-
Resolution: Fixed
-
L3 - Default
-
None
-
None
-
Not defined
Brief summary of the bug. What is it ? Where is it ?
Making use of a common spring-boot configuration (for response compression causes Optimize not to boot.
This came up while testing in Cloud SaaS where these properties are commonly set for webapps.
Steps to reproduce:
1. set the spring boot environment var
SERVER_COMPRESSION_ENABLED=true
2. start Optimize
Actual result:
Optimize Startup fails with:
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
09:24:43.038 [main] ERROR o.s.boot.SpringApplication - Application run failed
org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is java.lang.ClassCastException: class org.eclipse.jetty.server.handler.gzip.GzipHandler cannot be cast to class org.eclipse.jetty.webapp.WebAppContext (org.eclipse.jetty.server.handler.gzip.GzipHandler and org.eclipse.jetty.webapp.WebAppContext are in unnamed module of loader 'app')
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:165)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:577)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:147)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:734)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:408)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:308)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1306)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1295)
at org.camunda.optimize.Main.main(Main.java:18)
Caused by: java.lang.ClassCastException: class org.eclipse.jetty.server.handler.gzip.GzipHandler cannot be cast to class org.eclipse.jetty.webapp.WebAppContext (org.eclipse.jetty.server.handler.gzip.GzipHandler and org.eclipse.jetty.webapp.WebAppContext are in unnamed module of loader 'app')
at org.camunda.optimize.OptimizeJettyServerCustomizer.overwriteJettyErrorHandler(OptimizeJettyServerCustomizer.java:78)
at org.camunda.optimize.OptimizeJettyServerCustomizer.lambda$customize$0(OptimizeJettyServerCustomizer.java:44)
at org.springframework.boot.web.embedded.jetty.JettyServletWebServerFactory.getWebServer(JettyServletWebServerFactory.java:171)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:184)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:162)
... 8 common frames omitted
Expected result:
irregardless of internal special gzip setup the common spring boot properties should work