Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-58507

Confluence fails to start/upgrade with AdoptOpenJDK when using OPENJ9 flavor

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Low Low
    • None
    • 6.13.0, 6.15.4
    • Server - Platform
    • None

      From Confluence 6.13.x onward, the application accept the AdoptOpenJDK JVM.

      If we attempt to install/run Confluence 6.13.x or above when using the OPENJ9 flavor, the application will crash with the following error in the UI and a stacktrace in the logs:

       

      2019-06-21 18:38:58,146 ERROR [http-nio-8134-exec-9] [springframework.web.context.ContextLoader] initWebApplicationContext Context initialization failed2019-06-21 18:38:58,146 ERROR [http-nio-8134-exec-9] [springframework.web.context.ContextLoader] initWebApplicationContext Context initialization failed -- referer: http://Confluence_base_URL:8134/setup/evallicense.action | url: /setup/setupembeddeddb-default.action | traceId: 003832a7ce09a048 | userName: anonymous | action: setupembeddeddb-defaultorg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'platformInitializer' defined in URL [jar:file://atlassian-confluence-6.13.4/webapps/../confluence/WEB-INF/lib/confluence-6.13.4.jar!/monitoringContext.xml]: Invocation of init method failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'platformInitializerServer' defined in URL [jar:file://atlassian-confluence-6.13.4/webapps/../confluence/WEB-INF/lib/confluence-6.13.4.jar!/monitoringContext.xml]: Cannot resolve reference to bean 'javaMemoryMonitor' while setting constructor argument with key [4]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'javaMemoryMonitor' defined in URL [jar:file://atlassian-confluence-6.13.4/webapps/../confluence/WEB-INF/lib/confluence-6.13.4.jar!/monitoringContext.xml]: Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.atlassian.confluence.internal.diagnostics.JavaMemoryMonitor]: Constructor threw exception; nested exception is java.lang.ClassCastException: com.ibm.lang.management.internal.ExtendedThreadMXBeanImpl incompatible with com.sun.management.ThreadMXBean at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1631) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:481) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312)
      
      

      Based on the supported platforms, there are no mentions of which flavor Confluence should support, therefore we must test with all provided or specify which one is supported.

      How to replicate

      Install the AdoptOpenJDK with OPENJ9 flavor and set the JAVA_HOME system variable to use this version.

      Expected behavior

      Confluence should run correctly with this JDK flavor.

      Workaround

      Install the AdoptOpenJDK using the HOTSPOT flavor instead.

      In case the Linux package installer does not provide the option to choose the flavor, it should be installed manually on the server and the JAVA_HOME variable changed to the new path.

              Unassigned Unassigned
              rgadami Rodrigo Girardi Adami
              Votes:
              6 Vote for this issue
              Watchers:
              9 Start watching this issue

                Created:
                Updated: