Bitbucket fails on startup via web interface

ctFenix March 10, 2020

Error suggests that OS or java is outdated, but I'm running Windows 10 and java runtime should be based on AdoptOpenJDK Java JRE based on the documentation... Any guidance would be appreciated.

Logs report following error:

2020-03-10 16:28:05,132 ERROR [spring-startup]  c.a.j.s.w.s.JohnsonDispatcherServlet SpringMVC dispatcher [springMvc] could not be started
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'hookScriptInvoker' defined in URL [jar:file:/C:/Atlassian/Bitbucket/7.0.1/app/WEB-INF/lib/bitbucket-service-impl-7.0.1.jar!/com/atlassian/stash/internal/hook/script/DefaultHookScriptInvoker.class]: Unsatisfied dependency expressed through constructor parameter 5; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'nioProcessHelper' defined in class path resource [stash-context.xml]: Invocation of init method failed; nested exception is com.atlassian.bitbucket.internal.process.NioUnsupportedException: Failed to initialize NIO
 at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:798)
 at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:878)
 at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550)
 at javax.servlet.GenericServlet.init(GenericServlet.java:158)
 at java.lang.Thread.run(Thread.java:748)
 ... 18 frames trimmed
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'nioProcessHelper' defined in class path resource [stash-context.xml]: Invocation of init method failed; nested exception is com.atlassian.bitbucket.internal.process.NioUnsupportedException: Failed to initialize NIO
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1796)
 ... 5 common frames omitted
Caused by: com.atlassian.bitbucket.internal.process.NioUnsupportedException: Failed to initialize NIO
 at com.atlassian.bitbucket.internal.process.nu.NuNioProcessHelper.validate(NuNioProcessHelper.java:133)
 ... 5 common frames omitted
Caused by: java.lang.UnsatisfiedLinkError: com.sun.jna.Native.getNativeVersion()Ljava/lang/String;
 at com.sun.jna.Native.getNativeVersion(Native Method)
 at com.sun.jna.Native.<clinit>(Native.java:197)
 at com.sun.jna.Memory.malloc(Memory.java:721)
 at com.sun.jna.Memory.<init>(Memory.java:113)
 at com.sun.jna.ptr.ByReference.<init>(ByReference.java:42)
 at com.sun.jna.ptr.IntByReference.<init>(IntByReference.java:33)
 at com.sun.jna.ptr.IntByReference.<init>(IntByReference.java:29)
 at com.zaxxer.nuprocess.windows.ProcessCompletions.<init>(ProcessCompletions.java:99)
 at com.zaxxer.nuprocess.windows.ProcessCompletions.<init>(ProcessCompletions.java:74)
 at com.zaxxer.nuprocess.windows.WindowsProcess.<clinit>(WindowsProcess.java:91)
 at com.zaxxer.nuprocess.windows.WinProcessFactory.runProcess(WinProcessFactory.java:50)
 at com.zaxxer.nuprocess.NuProcessBuilder.run(NuProcessBuilder.java:273)
 at com.atlassian.bitbucket.internal.process.nu.NuNioProcessHelper.validate(NuNioProcessHelper.java:128)
 ... 5 common frames omitted

1 answer

0 votes
Jack Nolddor _Sweet Bananas_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
March 10, 2020

Hi ctFenix and Welcome,

 

Is you JAVA_HOME set? If so, then Bitbucket probably is using that one instead using the default JRE that is shipped together with the appliction.

Could you double-check that?

Restart Command Prompt to reload the environment variables then use the following command to check if the variable is set:

echo %JAVA_HOME%

You shouldn't se nothing here. if you see the path to an existing JDK (or JRE) installation, that's the one Bitbucket is using when starting so in this case please ensure that is a supported one bu checking the Supported platforms  page.

 

Regards

ctFenix March 11, 2020

Hi Jack,

Thanks for the response! JAVA_HOME is not currently set. Echo just returns the text %JAVA_HOME%. At this point, would it be worth just manually installing a supported JDK and setting the home variable to force the use of that install?

Jack Nolddor _Sweet Bananas_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
March 11, 2020

It worths to try for sure!

ctFenix March 11, 2020

Gave it a shot. Installed jdk-8.0.242.08 and updated JAVA_HOME to reflect its location. Same error occurs. Web startup gets to plugins and then fails with above error message in log. 

MarkJ August 31, 2020

@ctFenix 

I think I am having the same problem, but the Java is set correctly to 11.0.8, so I'm thinking it's a red herring. Did you have any luck working this out?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events