Uploaded image for project: 'Camunda Optimize'
  1. Camunda Optimize
  2. OPT-6283

Enabling SERVER_COMPRESSION_ENABLE prevents Optimize from booting

    XMLWordPrintable

Details

    • Bug Report
    • Resolution: Fixed
    • L3 - Default
    • 3.9.0, 3.9.0-preview-1
    • None
    • backend
    • None
    • Not defined

    Description

      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

      mgm-controller-panel

        This is the controller panel for Smart Panels app

        Attachments

          Activity

            People

              Unassigned Unassigned
              sebastian.bathke Sebastian Bathke
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Salesforce