Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Can't start Bitbucket Server - SpringMVC dispatcher [springMvc] could not be started

Robert007 March 15, 2019

When I try to start Bitbucket Server I get the following error message:

"SpringMVC dispatcher [springMvc] could not be started"

 

Here are some information about the my system:
Bitbucket version:  6.2.2
OS:    Windows Server 2012
JRE:    openjdk8u192-b12

 

From the log-file "atlassian-bitbucket.log" I get message like these:

2019-03-15 11:12:21,295 ERROR [spring-startup] c.a.e.i.AsynchronousAbleEventDispatcher There was an exception thrown trying to dispatch event [com.atlassian.plugin.event.events.PluginFrameworkStartingEvent@64ecad87] from the invoker [SingleParameterMethodListenerInvoker{method=public void com.atlassian.plugin.osgi.container.felix.FelixOsgiContainerManager.onStart(com.atlassian.plugin.event.events.PluginFrameworkStartingEvent), listener=com.atlassian.plugin.osgi.container.felix.FelixOsgiContainerManager@7e65144a} (monitored)]
java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.ExceptionInInitializerError. Listener: com.atlassian.plugin.osgi.container.felix.FelixOsgiContainerManager event: com.atlassian.plugin.event.events.PluginFrameworkStartingEvent
at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:55)
at com.atlassian.diagnostics.internal.platform.event.EventSystemMonitor.invokeMonitored(EventSystemMonitor.java:109)
at com.atlassian.diagnostics.internal.platform.event.MonitoredListenerInvoker.invoke(MonitoredListenerInvoker.java:38)
at com.atlassian.event.internal.AsynchronousAbleEventDispatcher.lambda$null$0(AsynchronousAbleEventDispatcher.java:37)
at com.atlassian.event.internal.AsynchronousAbleEventDispatcher.dispatch(AsynchronousAbleEventDispatcher.java:85)
at com.atlassian.diagnostics.internal.platform.event.MonitoredEventDispatcher.dispatch(MonitoredEventDispatcher.java:36)
at com.atlassian.event.internal.LockFreeEventPublisher$Publisher.dispatch(LockFreeEventPublisher.java:215)
at com.atlassian.event.internal.LockFreeEventPublisher.publish(LockFreeEventPublisher.java:88)
at com.atlassian.stash.internal.event.TransactionAwareEventPublisher.internalPublish(TransactionAwareEventPublisher.java:155)
at com.atlassian.stash.internal.event.TransactionAwareEventPublisher.publish(TransactionAwareEventPublisher.java:99)
at com.atlassian.plugin.event.impl.DefaultPluginEventManager.broadcast(DefaultPluginEventManager.java:92)
at com.atlassian.plugin.manager.DefaultPluginManager.broadcastIgnoreError(DefaultPluginManager.java:1872)
at com.atlassian.plugin.manager.DefaultPluginManager.earlyStartup(DefaultPluginManager.java:520)
at com.atlassian.stash.internal.plugin.StashPluginManager.lambda$earlyStartup$0(StashPluginManager.java:54)
at com.atlassian.stash.internal.plugin.PluginUpgradeHelper.withUpgrade(PluginUpgradeHelper.java:76)
at com.atlassian.stash.internal.plugin.StashPluginManager.earlyStartup(StashPluginManager.java:54)
at com.atlassian.plugin.manager.DefaultPluginManager.init(DefaultPluginManager.java:509)
at com.atlassian.stash.internal.plugin.SpringPluginSystemLifecycle.start(SpringPluginSystemLifecycle.java:35)
at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:182)
at org.springframework.context.support.DefaultLifecycleProcessor.access$200(DefaultLifecycleProcessor.java:53)
at org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.start(DefaultLifecycleProcessor.java:360)
at org.springframework.context.support.DefaultLifecycleProcessor.startBeans(DefaultLifecycleProcessor.java:158)
at org.springframework.context.support.DefaultLifecycleProcessor.onRefresh(DefaultLifecycleProcessor.java:122)
at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:879)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:549)
at javax.servlet.GenericServlet.init(GenericServlet.java:158)
at java.lang.Thread.run(Thread.java:748)
... 8 frames trimmed
Caused by: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.ExceptionInInitializerError
at io.github.lukehutch.fastclasspathscanner.FastClasspathScanner.getUniqueClasspathElementURLs(FastClasspathScanner.java:1840)
at io.github.lukehutch.fastclasspathscanner.FastClasspathScanner.getUniqueClasspathElementURLs(FastClasspathScanner.java:1875)
at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:40)
... 27 common frames omitted
Caused by: java.util.concurrent.ExecutionException: java.lang.ExceptionInInitializerError
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:192)
at io.github.lukehutch.fastclasspathscanner.FastClasspathScanner$5.call(FastClasspathScanner.java:1782)
at io.github.lukehutch.fastclasspathscanner.FastClasspathScanner$5.call(FastClasspathScanner.java:1779)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
... 2 common frames omitted
Caused by: java.lang.ExceptionInInitializerError: null
at io.github.lukehutch.fastclasspathscanner.scanner.Scanner.call(Scanner.java:214)
at io.github.lukehutch.fastclasspathscanner.scanner.Scanner.call(Scanner.java:56)
... 4 common frames omitted
Caused by: java.lang.RuntimeException: Could not resolve current directory: C:\Programme\atlassian\Bitbucket\6.1.1\app
at io.github.lukehutch.fastclasspathscanner.utils.FileUtils.getCurrDirPathStr(FileUtils.java:56)
at io.github.lukehutch.fastclasspathscanner.scanner.ClasspathFinder.<clinit>(ClasspathFinder.java:47)
... 6 common frames omitted
Caused by: java.nio.file.AccessDeniedException: C:\Programme\atlassian\Bitbucket\6.1.1\app
at sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:83)
at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:90)
at sun.nio.fs.WindowsLinkSupport.getRealPath(WindowsLinkSupport.java:259)
at sun.nio.fs.WindowsPath.toRealPath(WindowsPath.java:836)
at sun.nio.fs.WindowsPath.toRealPath(WindowsPath.java:44)
at io.github.lukehutch.fastclasspathscanner.utils.FileUtils.getCurrDirPathStr(FileUtils.java:52)
... 7 common frames omitted
2019-03-15 11:12:22,154 ERROR [spring-startup] c.a.p.p.XmlDescriptorParserUtils There were problems loading the module 'client-resource' in plugin 'System Web Resources - DO NOT DEPEND ON THESE'. The module has been disabled.
2019-03-15 11:12:22,154 ERROR [spring-startup] c.a.p.p.XmlDescriptorParserUtils Error creating bean with name 'com.atlassian.plugins.client.resource.ClientResourceModuleDescriptor': Bean instantiation via constructor failed; nested exception is java.lang.NullPointerException
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.atlassian.plugins.client.resource.ClientResourceModuleDescriptor': Bean instantiation via constructor failed; nested exception is java.lang.NullPointerException
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:304)
at com.atlassian.stash.internal.plugin.OsgiSafeHostContainer.create(OsgiSafeHostContainer.java:75)
at com.atlassian.plugin.DefaultModuleDescriptorFactory.getModuleDescriptor(DefaultModuleDescriptorFactory.java:56)
at com.atlassian.plugin.parsers.XmlDescriptorParserUtils.newModuleDescriptor(XmlDescriptorParserUtils.java:46)
at com.atlassian.plugin.parsers.XmlDescriptorParser.createModuleDescriptor(XmlDescriptorParser.java:171)
at com.atlassian.plugin.parsers.XmlDescriptorParser.configurePlugin(XmlDescriptorParser.java:141)
at com.atlassian.plugin.loaders.SinglePluginLoader.loadPlugin(SinglePluginLoader.java:121)
at com.atlassian.plugin.loaders.SinglePluginLoader.loadAllPlugins(SinglePluginLoader.java:70)
at com.atlassian.plugin.loaders.ClassPathPluginLoader.loadClassPathPlugins(ClassPathPluginLoader.java:53)
at com.atlassian.plugin.loaders.ClassPathPluginLoader.loadAllPlugins(ClassPathPluginLoader.java:61)
at com.atlassian.plugin.loaders.PermissionCheckingPluginLoader.loadAllPlugins(PermissionCheckingPluginLoader.java:28)
at com.atlassian.plugin.manager.DefaultPluginManager.earlyStartup(DefaultPluginManager.java:530)
at com.atlassian.stash.internal.plugin.StashPluginManager.lambda$earlyStartup$0(StashPluginManager.java:54)
at com.atlassian.stash.internal.plugin.PluginUpgradeHelper.withUpgrade(PluginUpgradeHelper.java:76)
at com.atlassian.stash.internal.plugin.StashPluginManager.earlyStartup(StashPluginManager.java:54)
at com.atlassian.plugin.manager.DefaultPluginManager.init(DefaultPluginManager.java:509)
at com.atlassian.stash.internal.plugin.SpringPluginSystemLifecycle.start(SpringPluginSystemLifecycle.java:35)
at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:182)
at org.springframework.context.support.DefaultLifecycleProcessor.access$200(DefaultLifecycleProcessor.java:53)
at org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.start(DefaultLifecycleProcessor.java:360)
at org.springframework.context.support.DefaultLifecycleProcessor.startBeans(DefaultLifecycleProcessor.java:158)
at org.springframework.context.support.DefaultLifecycleProcessor.onRefresh(DefaultLifecycleProcessor.java:122)
at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:879)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:549)
at javax.servlet.GenericServlet.init(GenericServlet.java:158)
at java.lang.Thread.run(Thread.java:748)
... 14 frames trimmed
Caused by: java.lang.NullPointerException: null
at com.atlassian.plugin.osgi.container.felix.FelixOsgiContainerManager.getHostComponentRegistrations(FelixOsgiContainerManager.java:492)
at com.atlassian.stash.internal.plugin.OsgiSafeProxyProvider.maybeInitialize(OsgiSafeProxyProvider.java:161)
at com.atlassian.stash.internal.plugin.OsgiSafeProxyProvider.proxy(OsgiSafeProxyProvider.java:50)
at com.atlassian.stash.internal.plugin.OsgiSafeProxyProvider.proxy(OsgiSafeProxyProvider.java:68)
at com.atlassian.stash.internal.plugin.OsgiSafeHostContainer$ProxyingInstantiationStrategy.instantiate(OsgiSafeHostContainer.java:102)
... 26 common frames omitted

 

2019-03-15 11:12:33,466 ERROR [spring-startup] c.a.p.loaders.ScanningPluginLoader Unable to deploy plugin 'com.atlassian.upm.atlassian-universal-plugin-manager-plugin' from 'Unit: C:\Program Files\Atlassian\ApplicationData\Bitbucket\shared\plugins\installed-plugins\plugin.4982183237719845563.atlassian-universal-plugin-manager-plugin-2.22.11.jar (1529659076471)'.
2019-03-15 11:12:33,466 ERROR [spring-startup] c.a.p.loaders.ScanningPluginLoader Because of the following exception:
java.lang.IllegalStateException: Unable to create a tracker when osgi is not running
at com.atlassian.plugin.osgi.container.felix.FelixOsgiContainerManager.getServiceTracker(FelixOsgiContainerManager.java:445)
at com.atlassian.plugin.loaders.ScanningPluginLoader.deployPluginFromUnit(ScanningPluginLoader.java:145)
at com.atlassian.plugin.loaders.ScanningPluginLoader.loadAllPlugins(ScanningPluginLoader.java:90)
at com.atlassian.plugin.loaders.PermissionCheckingPluginLoader.loadAllPlugins(PermissionCheckingPluginLoader.java:28)
at com.atlassian.plugin.manager.DefaultPluginManager.earlyStartup(DefaultPluginManager.java:530)
at com.atlassian.stash.internal.plugin.StashPluginManager.lambda$earlyStartup$0(StashPluginManager.java:54)
at com.atlassian.stash.internal.plugin.PluginUpgradeHelper.withUpgrade(PluginUpgradeHelper.java:76)
at com.atlassian.stash.internal.plugin.StashPluginManager.earlyStartup(StashPluginManager.java:54)
at com.atlassian.plugin.manager.DefaultPluginManager.init(DefaultPluginManager.java:509)
at com.atlassian.stash.internal.plugin.SpringPluginSystemLifecycle.start(SpringPluginSystemLifecycle.java:35)
at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:182)
at org.springframework.context.support.DefaultLifecycleProcessor.access$200(DefaultLifecycleProcessor.java:53)
at org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.start(DefaultLifecycleProcessor.java:360)
at org.springframework.context.support.DefaultLifecycleProcessor.startBeans(DefaultLifecycleProcessor.java:158)
at org.springframework.context.support.DefaultLifecycleProcessor.onRefresh(DefaultLifecycleProcessor.java:122)
at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:879)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:549)
at javax.servlet.GenericServlet.init(GenericServlet.java:158)
at java.lang.Thread.run(Thread.java:748)
... 12 frames trimmed
2019-03-15 11:12:33,544 WARN [spring-startup] o.s.w.c.s.XmlWebApplicationContext Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Failed to start bean 'pluginSystemLifecycle'; nested exception is java.lang.NullPointerException
2019-03-15 11:12:33,810 INFO [spring-startup] c.a.s.internal.home.HomeLockAcquirer Releasing lock on C:\Program Files\Atlassian\ApplicationData\Bitbucket\shared
2019-03-15 11:12:33,841 INFO [spring-startup] c.a.s.internal.home.HomeLockAcquirer Releasing lock on C:\Program Files\Atlassian\ApplicationData\Bitbucket
2019-03-15 11:12:33,857 ERROR [spring-startup] c.a.j.s.w.s.JohnsonDispatcherServlet SpringMVC dispatcher [springMvc] could not be started
org.springframework.context.ApplicationContextException: Failed to start bean 'pluginSystemLifecycle'; nested exception is java.lang.NullPointerException
at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:185)
at org.springframework.context.support.DefaultLifecycleProcessor.access$200(DefaultLifecycleProcessor.java:53)
at org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.start(DefaultLifecycleProcessor.java:360)
at org.springframework.context.support.DefaultLifecycleProcessor.startBeans(DefaultLifecycleProcessor.java:158)
at org.springframework.context.support.DefaultLifecycleProcessor.onRefresh(DefaultLifecycleProcessor.java:122)
at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:879)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:549)
at javax.servlet.GenericServlet.init(GenericServlet.java:158)
at java.lang.Thread.run(Thread.java:748)
... 8 frames trimmed
Caused by: java.lang.NullPointerException: null
at com.atlassian.plugin.osgi.container.felix.FelixOsgiContainerManager.addBundleListener(FelixOsgiContainerManager.java:456)
at com.atlassian.plugin.impl.AbstractPlugin.install(AbstractPlugin.java:369)
at com.atlassian.plugin.manager.DefaultPluginManager.addPlugins(DefaultPluginManager.java:1133)
at com.atlassian.stash.internal.plugin.StashPluginManager.addPlugins(StashPluginManager.java:79)
at com.atlassian.plugin.manager.DefaultPluginManager.earlyStartup(DefaultPluginManager.java:579)
at com.atlassian.stash.internal.plugin.StashPluginManager.lambda$earlyStartup$0(StashPluginManager.java:54)
at com.atlassian.stash.internal.plugin.PluginUpgradeHelper.withUpgrade(PluginUpgradeHelper.java:76)
at com.atlassian.stash.internal.plugin.StashPluginManager.earlyStartup(StashPluginManager.java:54)
at com.atlassian.plugin.manager.DefaultPluginManager.init(DefaultPluginManager.java:509)
at com.atlassian.stash.internal.plugin.SpringPluginSystemLifecycle.start(SpringPluginSystemLifecycle.java:35)
at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:182)
... 9 common frames omitted

 

2019-03-15 11:13:20,997 ERROR [Caesium-1-1] c.a.scheduler.core.JobLauncher Scheduled job with ID 'CaesiumSchedulerService.RefreshJob' failed
org.springframework.transaction.CannotCreateTransactionException: Could not open Hibernate Session for transaction; nested exception is java.lang.IllegalStateException: EntityManagerFactory is closed
at org.springframework.orm.hibernate5.HibernateTransactionManager.doBegin(HibernateTransactionManager.java:577)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:378)
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:137)
at com.atlassian.stash.internal.scheduling.HibernateClusteredJobDao.refresh(HibernateClusteredJobDao.java:125)
at com.atlassian.scheduler.caesium.impl.SchedulerQueueImpl.refreshClusteredJobsFromDao(SchedulerQueueImpl.java:139)
at com.atlassian.scheduler.caesium.impl.SchedulerQueueImpl.refreshClusteredJobsUnderLock(SchedulerQueueImpl.java:130)
at com.atlassian.scheduler.caesium.impl.SchedulerQueueImpl.refreshClusteredJobs(SchedulerQueueImpl.java:117)
at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService.refreshClusteredJobs(CaesiumSchedulerService.java:351)
at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService$RefreshJob.runJob(CaesiumSchedulerService.java:563)
at com.atlassian.scheduler.core.JobLauncher.runJob(JobLauncher.java:134)
at com.atlassian.scheduler.core.JobLauncher.launchAndBuildResponse(JobLauncher.java:106)
at com.atlassian.scheduler.core.JobLauncher.launch(JobLauncher.java:90)
at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService.launchJob(CaesiumSchedulerService.java:435)
at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService.executeLocalJob(CaesiumSchedulerService.java:402)
at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService.executeQueuedJob(CaesiumSchedulerService.java:380)
at com.atlassian.scheduler.caesium.impl.SchedulerQueueWorker.executeJob(SchedulerQueueWorker.java:66)
at com.atlassian.scheduler.caesium.impl.SchedulerQueueWorker.executeNextJob(SchedulerQueueWorker.java:60)
at com.atlassian.scheduler.caesium.impl.SchedulerQueueWorker.run(SchedulerQueueWorker.java:35)
at java.lang.Thread.run(Thread.java:748)
... 20 frames trimmed
Caused by: java.lang.IllegalStateException: EntityManagerFactory is closed
at org.hibernate.internal.SessionFactoryImpl.validateNotClosed(SessionFactoryImpl.java:530)
at org.hibernate.internal.SessionFactoryImpl.getCache(SessionFactoryImpl.java:828)
at org.hibernate.internal.AbstractSharedSessionContract.<init>(AbstractSharedSessionContract.java:143)
at org.hibernate.internal.AbstractSessionImpl.<init>(AbstractSessionImpl.java:29)
at org.hibernate.internal.SessionImpl.<init>(SessionImpl.java:258)
at org.hibernate.internal.SessionFactoryImpl$SessionBuilderImpl.openSession(SessionFactoryImpl.java:1288)
at org.hibernate.internal.SessionFactoryImpl.openSession(SessionFactoryImpl.java:481)
at com.atlassian.stash.internal.hibernate.DelegatingSwappableSessionFactory.openSession(DelegatingSwappableSessionFactory.java:470)
at org.springframework.orm.hibernate5.HibernateTransactionManager.doBegin(HibernateTransactionManager.java:463)
... 19 common frames omitted

 

What's wrong with my Bitbucket installation ?

 

Kindly Regards
Robert

2 answers

1 accepted

0 votes
Answer accepted
Robert007 March 22, 2019

Hello Stephen,

Thank you for your reply and sorry for my late answer!

The success message at first -> the Bitbucket Instance is running now ;-)

I have done so many things, that I don't know which of the changes I made is the correct one to solve the problem(s). But I think the last change was an important!

Bitbucket has Problems with "blanks" in the path-names (for example: "C:\Program Files"). So I have to change the pathname during the installation of a new Bitbucket version from "C:\Program Files" to "C:\Programme" (-> it's the german translation for this windows-path). When I look at the configuration of the windows service (-> tomcat8w //ES//<service-name>) I saw the pathname "C:\Programme\...." everywhere. So, after I changed in the windows-service configuraion the windows path back to "C:\Program Files\...." I could start the Bitbucket Instance successfully.
I don't know why I haven't the same problem after an installation for older Bitbucket versions!? 

Regards
Robert

0 votes
Stephen Sifers
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 18, 2019

Hello Robert,

Thank you for providing context into your issue along within including your output error results.

After reviewing the logs you sent, I found the following which is most likely suspect to your issue:

Caused by: java.lang.RuntimeException: Could not resolve current directory: C:\Programme\atlassian\Bitbucket\6.1.1\app

Caused by: java.nio.file.AccessDeniedException: C:\Programme\atlassian\Bitbucket\6.1.1\app

These error point to an issue with your application path either being the path itself or permissions. Please check the following for steps on how to resolve this: Moving Bitbucket Server to a different context path.

Once you’ve confirmed the path is valid, permissions are right and the service account has access to the path please attempt to start Bitbucket again. Let us know the results the same as before.

We look forward to your response to help find a solution to your issue.

Regards,
Stephen Sifers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events