Fisheye will not start: ERROR [main ] org.springframework.web.context.ContextLoader ContextLoader-initWebApplicationContext - Context initialization failed
Problem
Stash couldn't start up and symptoms on the logs are like the following:
2015-03-30 12:13:58,254 ERROR [main ] org.springframework.web.context.ContextLoader ContextLoader-initWebApplicationContext - Context initialization failed
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'disableAnalyticsInDevTask' defined in URL [jar:file:/C:/CommunityApps/FeCru/fisheye.jar!/com/atlassian/fecru/analytics/DisableAnalyticsInDevTask.class]: Unsatisfied dependency expressed through constructor argument with index 0 of type [com.atlassian.sal.api.pluginsettings.PluginSettingsFactory]: : Error creating bean with name 'salPluginSettingsFactory' defined in URL [jar:file:/C:/CommunityApps/FeCru/fisheye.jar!/com/atlassian/fecru/sal/pluginsettings/FisheyePluginSettingsFactory.class]: Unsatisfied dependency expressed through constructor argument with index 1 of type [com.cenqua.fisheye.config.RepositoryManager]: : Error creating bean with name 'repositoryManager': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userManager': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Username may not be null; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'repositoryManager': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userManager': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Username may not be null; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'salPluginSettingsFactory' defined in URL [jar:file:/C:/CommunityApps/FeCru/fisheye.jar!/com/atlassian/fecru/sal/pluginsettings/FisheyePluginSettingsFactory.class]: Unsatisfied dependency expressed through constructor argument with index 1 of type [com.cenqua.fisheye.config.RepositoryManager]: : Error creating bean with name 'repositoryManager': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userManager': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Username may not be null; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'repositoryManager': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userManager': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Username may not be null
..
..
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userManager': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Username may not be null
at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:135)
..
..
Caused by: java.lang.IllegalArgumentException: Username may not be null
at org.apache.commons.httpclient.UsernamePasswordCredentials.<init>(UsernamePasswordCredentials.java:90)
at com.atlassian.crowd.integration.rest.service.RestExecutor.<init>(RestExecutor.java:72)
at com.atlassian.crowd.integration.rest.service.RestCrowdClient.<init>(RestCrowdClient.java:79)
at com.atlassian.crowd.integration.rest.service.factory.RestCrowdClientFactory.newInstance(RestCrowdClientFactory.java:26)
at com.cenqua.fisheye.user.crowd.CrowdAuth.<init>(CrowdAuth.java:122)
at com.cenqua.fisheye.user.crowd.CrowdAuth.<init>(CrowdAuth.java:107)
at com.cenqua.fisheye.user.crowd.CrowdAuth.<init>(CrowdAuth.java:103)
at com.cenqua.fisheye.user.AuthenticationFactory.getAuth(AuthenticationFactory.java:32)
at com.cenqua.fisheye.user.DefaultUserManager.reload(DefaultUserManager.java:299)
at com.cenqua.fisheye.user.DefaultUserManager.loadAuthAndStartUserSync(DefaultUserManager.java:197)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:346)
at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:299)
at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:132)
... 81 more
Related cause:
org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'backup': Requested bean is currently in creation: Is there an unresolvable circular reference?
Cause
This usually happens when there are syntax error on the config.xml
file. As for this case, the Crowd property were all in a line when it should have a line break in between each attributes
<crowd-properties>#Thu Mar 05 16:35:45 CET 2015 application.password=password application.name=FishEye crowd.server.url=http\://localhost\:8095/crowd/services/ </crowd-properties>
Resolution
Ensure that the config.xml syntax
is in the correct form.
In the case of the above example, the correct syntax should be:
<crowd-properties>
#Thu Mar 05 16:35:45 CET 2015
application.password=password
application.name=FishEye
crowd.server.url=http\://localhost\:8095/crowd/services/
</crowd-properties>
Last modified on Apr 6, 2016
Powered by Confluence and Scroll Viewport.