Support Java 9 for Bitbucket Server

XMLWordPrintable

      Problem Definition

      Bitbucket server does not run with Java 9. Bitbucket server fails to start with below error in atlassian-bitbucket.log

      2017-10-04 08:17:38,200 INFO [main] c.a.b.i.boot.log.BuildInfoLogger Starting Bitbucket 5.4.0 (9d5666b built on Tue Sep 19 14:26:24 AEST 2017)
      2017-10-04 08:17:38,201 INFO [main] c.a.b.i.boot.log.BuildInfoLogger JVM: Oracle Corporation Java HotSpot(TM) 64-Bit Server VM 9+181
      ..
      ..
      2017-10-04 08:17:43,048 WARN [spring-startup] o.s.w.c.s.XmlWebApplicationContext Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transferableStateManager' defined in class path resource [stash-context.xml]: BeanPostProcessor before instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.methodSecurityMetadataSourceAdvisor': Cannot resolve reference to bean 'org.springframework.security.access.method.DelegatingMethodSecurityMetadataSource#0' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.access.method.DelegatingMethodSecurityMetadataSource#0': Cannot create inner bean '(inner bean)#2c1658a3' of type [org.springframework.security.access.prepost.PrePostAnnotationSecurityMetadataSource] while setting constructor argument with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#2c1658a3': Cannot create inner bean '(inner bean)#29305df3' of type [org.springframework.security.access.expression.method.ExpressionBasedAnnotationAttributeFactory] while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#29305df3': Cannot resolve reference to bean 'org.springframework.aop.framework.ProxyFactoryBean#0' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.aop.framework.ProxyFactoryBean#0': BeanPostProcessor before instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.aop.aspectj.AspectJPointcutAdvisor#0': Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.aop.aspectj.AspectJPointcutAdvisor]: Constructor threw exception; nested exception is java.lang.IllegalArgumentException: error the @annotation pointcut expression is only supported at Java 5 compliance level or above
      2017-10-04 08:17:43,050 ERROR [spring-startup] o.s.b.f.s.DefaultListableBeanFactory Destroy method on bean with name 'eventListenerRegistrar' threw an exception
      java.lang.IllegalStateException: ApplicationEventMulticaster not initialized - call 'refresh' before multicasting events via the context: WebApplicationContext for namespace 'springMvc-servlet': startup date [Wed Oct 04 08:17:39 AEDT 2017]; parent: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@4e928fbf
      at org.springframework.context.support.AbstractApplicationContext.getApplicationEventMulticaster(AbstractApplicationContext.java:414)
      at org.springframework.context.support.ApplicationListenerDetector.postProcessBeforeDestruction(ApplicationListenerDetector.java:97)
      at org.springframework.context.support.AbstractApplicationContext.destroyBeans(AbstractApplicationContext.java:1030)
      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:556)
      at javax.servlet.GenericServlet.init(GenericServlet.java:158)
      at java.base/java.lang.Thread.run(Thread.java:844)
      ... 15 frames trimmed
      
      

      Suggested Solution

      Provide Java 9 support for Bitbucket Server

      Workaround

      Use supported versions of Java as specified in
      Supported platforms details - Java

            Assignee:
            Unassigned
            Reporter:
            Prasanth
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: