Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

upgrading bitbucket server from 7 to 8

Алексей Волков
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 23, 2023

upgrading bitbucket server from 7 to 8

catching error after start

 

2023-04-23 20:25:57,015 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 'fileServerServlet' defined in URL [jar:file:/opt/atlassian/bitbucket/8.9.0/app/WEB-INF/lib/bitbucket-platform-8.9.0.jar!/com/atlassian/stash/internal/plugin/FileServerServlet.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pluginResourceDownload' defined in class path resource [stash-context.xml]: Cannot resolve reference to bean 'contentTypeResolver' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'contentTypeResolver' defined in URL [jar:file:/opt/atlassian/bitbucket/8.9.0/app/WEB-INF/lib/bitbucket-platform-8.9.0.jar!/com/atlassian/stash/internal/plugin/SimpleContentTypeResolver.class]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.atlassian.stash.internal.plugin.SimpleContentTypeResolver]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: com/sun/activation/registries/LogSupport
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:800)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:920)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583)
at javax.servlet.GenericServlet.init(GenericServlet.java:158)
at java.base/java.lang.Thread.run(Unknown Source)
... 18 frames trimmed
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pluginResourceDownload' defined in class path resource [stash-context.xml]: Cannot resolve reference to bean 'contentTypeResolver' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'contentTypeResolver' defined in URL [jar:file:/opt/atlassian/bitbucket/8.9.0/app/WEB-INF/lib/bitbucket-platform-8.9.0.jar!/com/atlassian/stash/internal/plugin/SimpleContentTypeResolver.class]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.atlassian.stash.internal.plugin.SimpleContentTypeResolver]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: com/sun/activation/registries/LogSupport
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:342)
... 5 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'contentTypeResolver' defined in URL [jar:file:/opt/atlassian/bitbucket/8.9.0/app/WEB-INF/lib/bitbucket-platform-8.9.0.jar!/com/atlassian/stash/internal/plugin/SimpleContentTypeResolver.class]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.atlassian.stash.internal.plugin.SimpleContentTypeResolver]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: com/sun/activation/registries/LogSupport
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1334)
... 5 common frames omitted
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.atlassian.stash.internal.plugin.SimpleContentTypeResolver]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: com/sun/activation/registries/LogSupport
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:224)
... 5 common frames omitted
Caused by: java.lang.NoClassDefFoundError: com/sun/activation/registries/LogSupport
at javax.activation.MimetypesFileTypeMap.<init>(MimetypesFileTypeMap.java:130)
at javax.activation.MimetypesFileTypeMap.<init>(MimetypesFileTypeMap.java:301)
at com.atlassian.stash.internal.plugin.SimpleContentTypeResolver.<init>(SimpleContentTypeResolver.java:25)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:211)
... 5 common frames omitted
Caused by: java.lang.ClassNotFoundException: com.sun.activation.registries.LogSupport
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(Unknown Source)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(Unknown Source)
... 12 common frames omitted

 

3 answers

0 votes
Nick Murray January 17, 2024

Any update on this?  another thread suggested using Java 1.8, this fixed the problem, but now 1.8 is deprecated as on 8.17.0, and is therefore not a long term solution.

0 votes
Алексей Волков
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 19, 2023

helps write to start-bitbucket.sh

export ATLASSIAN_DIR="/opt/atlassian/bitbucket/app/WEB-INF/lib/WEB-INF/lib"

Gonchik Tsymzhitov
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 1, 2023

did not help to me ? :(

0 votes
Baskar Annamalai April 25, 2023

Hi @Алексей Волков ,

 

Seems like javax.activation-api-1.x.x.jar doesn't have the package that previous Bitbucket versions had. You might want to consider upgrading to a different Bitbucket version or updating the javax.mail to the latest manually - take into consideration of CVE as well.

Best regards,
Baskar Annamalai
ServiceRocket

Gonchik Tsymzhitov
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 8, 2023

Hi @Baskar Annamalai , 

added no luck

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events