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

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

SpringMVC dispatcher [springMvc] could not be started [SOLVED]

Edited

After updating my linux machine from Ubuntu 19.04 to 20.04.2 LTS Bitbucket is not starting anymore - JIRA is running as expected. Mysql 8.0 is running as DB backend. Im using 

mysql-connector-java-8.0.23

This is what the log says:

 

2021-01-31 01:00:51,014 INFO  [main]  c.a.b.i.b.BitbucketServerApplication No active profile set, falling back to default profiles: default

2021-01-31 01:00:51,846 INFO  [main]  c.a.b.i.boot.log.BuildInfoLogger Starting Bitbucket 7.9.1 (738dc90 built on Thu Jan 14 05:37:14 CET 2021)

2021-01-31 01:00:51,846 INFO  [main]  c.a.b.i.boot.log.BuildInfoLogger JVM: AdoptOpenJDK OpenJDK 64-Bit Server VM 1.8.0_275-b01

2021-01-31 01:00:52,956 INFO  [main]  c.a.b.i.b.BitbucketServerApplication Started BitbucketServerApplication in 3.116 seconds (JVM running for 3.645)

2021-01-31 01:00:56,064 INFO  [spring-startup]  c.a.s.internal.home.HomeLockAcquirer Successfully acquired lock on home directory /var/data/bitbucket

2021-01-31 01:00:57,063 WARN  [spring-startup]  c.z.hikari.util.DriverDataSource Registered driver with driverClassName=com.mysql.jdbc.Driver was not found, trying direct instantiation.

2021-01-31 01:00:59,200 WARN  [spring-startup]  o.s.w.c.s.XmlWebApplicationContext Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'crowdAliasDao': Unsatisfied dependency expressed through method 'setSessionFactory' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sharedHomeLockAcquirer' defined in class path resource [stash-context.xml]: Cannot resolve reference to bean 'licenseHelper' while setting constructor argument; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'licenseHelper' defined in URL [jar:file:/var/bitbucket/app/WEB-INF/lib/bitbucket-service-impl-7.9.1.jar!/com/atlassian/stash/internal/license/DefaultLicenseHelper.class]: Unsatisfied dependency expressed through constructor parameter 2; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bootstrapLiquibase' defined in class path resource [stash-context.xml]: Invocation of init method failed; nested exception is java.lang.ClassCastException: java.time.LocalDateTime cannot be cast to java.lang.String

2021-01-31 01:00:59,206 INFO  [spring-startup]  c.a.s.internal.home.HomeLockAcquirer Releasing lock on /var/data/bitbucket

2021-01-31 01:00:59,211 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 'crowdAliasDao': Unsatisfied dependency expressed through method 'setSessionFactory' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sharedHomeLockAcquirer' defined in class path resource [stash-context.xml]: Cannot resolve reference to bean 'licenseHelper' while setting constructor argument; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'licenseHelper' defined in URL [jar:file:/var/bitbucket/app/WEB-INF/lib/bitbucket-service-impl-7.9.1.jar!/com/atlassian/stash/internal/license/DefaultLicenseHelper.class]: Unsatisfied dependency expressed through constructor parameter 2; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bootstrapLiquibase' defined in class path resource [stash-context.xml]: Invocation of init method failed; nested exception is java.lang.ClassCastException: java.time.LocalDateTime cannot be cast to java.lang.String

at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredMethodElement.inject(AutowiredAnnotationBeanPostProcessor.java:723)

at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:879)

at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:551)

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 'sharedHomeLockAcquirer' defined in class path resource [stash-context.xml]: Cannot resolve reference to bean 'licenseHelper' while setting constructor argument; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'licenseHelper' defined in URL [jar:file:/var/bitbucket/app/WEB-INF/lib/bitbucket-service-impl-7.9.1.jar!/com/atlassian/stash/internal/license/DefaultLicenseHelper.class]: Unsatisfied dependency expressed through constructor parameter 2; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bootstrapLiquibase' defined in class path resource [stash-context.xml]: Invocation of init method failed; nested exception is java.lang.ClassCastException: java.time.LocalDateTime cannot be cast to java.lang.String

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:342)

... 5 common frames omitted

Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'licenseHelper' defined in URL [jar:file:/var/bitbucket/app/WEB-INF/lib/bitbucket-service-impl-7.9.1.jar!/com/atlassian/stash/internal/license/DefaultLicenseHelper.class]: Unsatisfied dependency expressed through constructor parameter 2; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bootstrapLiquibase' defined in class path resource [stash-context.xml]: Invocation of init method failed; nested exception is java.lang.ClassCastException: java.time.LocalDateTime cannot be cast to java.lang.String

at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:797)

... 5 common frames omitted

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bootstrapLiquibase' defined in class path resource [stash-context.xml]: Invocation of init method failed; nested exception is java.lang.ClassCastException: java.time.LocalDateTime cannot be cast to java.lang.String

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1794)

... 5 common frames omitted

Caused by: java.lang.ClassCastException: java.time.LocalDateTime cannot be cast to java.lang.String

at liquibase.changelog.StandardChangeLogHistoryService.getRanChangeSets(StandardChangeLogHistoryService.java:324)

at liquibase.changelog.AbstractChangeLogHistoryService.upgradeChecksums(AbstractChangeLogHistoryService.java:66)

at liquibase.changelog.StandardChangeLogHistoryService.upgradeChecksums(StandardChangeLogHistoryService.java:293)

at liquibase.Liquibase.checkLiquibaseTables(Liquibase.java:1221)

at liquibase.Liquibase.update(Liquibase.java:193)

at liquibase.Liquibase.update(Liquibase.java:179)

at liquibase.integration.spring.SpringLiquibase.performUpdate(SpringLiquibase.java:317)

at liquibase.database.ExtendedSpringLiquibase.afterPropertiesSet(ExtendedSpringLiquibase.java:39)

... 5 common frames omitted

1 answer

1 accepted

0 votes
Answer accepted

I also get this error after upgrade bitbucket from 7.0.1 to 7.9.1.

It worked before with 7.9.1 on Ubuntu 19.04 - so I guess the version is not the issue. On which OS are you running Bitbucket?

Windows Server 2019

Ok. Seems not to be related. Funny thing is, that a vanilla installation works as expected, so I guess it's somehow related to the data stored in the database. I even restored different older versions of the DB and the data files, with the same result.

Really strange and frustrating, that there is no support from Atlassian side in this case (there are several similar cases in this forum).

I find the solution!

Bitbucket server does not support Conector/J 8.0.

It only supports 5.1.

After I replace the jdbc driver to version 5.1.49, it is resolved.

Like # people like this

Works like a charm :-)

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
7.9.1
TAGS
Community showcase
Published in Bitbucket

New improvements to user management in Bitbucket Cloud 👥

Hey Community! We’re willing to wager that quite a few of you not only use Bitbucket, but administer it too. Our team is excited to share that we’ll be releasing improvements throughout this month of...

3,811 views 10 16
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you