[
https://issues.apache.org/jira/browse/CLOUDSTACK-739?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13630668#comment-13630668
]
Venkata Siva Vijayendra Bhamidipati commented on CLOUDSTACK-739:
----------------------------------------------------------------
Prachi, this line in ManagementServerImpl.java is causing issues with the
nonoss startup of the mgmt server:
@Inject
protected List<AffinityGroupProcessor> _affinityProcessors;
The client/tomcatconf/applicationContext.xml.in file doesn't have a bean for a
class that implements the AffinityGroupProcessor interface. I guess you will
need to define an AffinityGroupProcessorImpl class for this or use one of the
classes that implement AffinityGroupProcessor and change the above line in
ManagementServerImpl.java accordingly, and define routines to retrieve the
_affinityProcessors list if required.
Here is the error seen when I do a mvn -pl :cloud-client-ui jetty:run -Dnonoss
-
Exception in thread "Timer-2"
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'managementServerImpl': Injection of autowired dependencies failed;
nested exception is org.springframework.beans.factory.BeanCreationException:
Could not autowire field: protected java.util.List
com.cloud.server.ManagementServerImpl._affinityProcessors; nested exception is
org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching
bean of type [org.apache.cloudstack.affinity.AffinityGroupProcessor] found for
dependency [collection of
org.apache.cloudstack.affinity.AffinityGroupProcessor]: expected at least 1
bean which qualifies as autowire candidate for this dependency. Dependency
annotations: {@javax.inject.Inject()}
at
org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:287)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1106)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.configureBean(AbstractAutowireCapableBeanFactory.java:314)
at
com.cloud.utils.component.ComponentContext.initComponentsLifeCycle(ComponentContext.java:71)
at
com.cloud.servlet.CloudStartupServlet$1.run(CloudStartupServlet.java:50)
at java.util.TimerThread.mainLoop(Timer.java:534)
at java.util.TimerThread.run(Timer.java:484)
Caused by: org.springframework.beans.factory.BeanCreationException: Could not
autowire field: protected java.util.List
com.cloud.server.ManagementServerImpl._affinityProcessors; nested exception is
org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching
bean of type [org.apache.cloudstack.affinity.AffinityGroupProcessor] found for
dependency [collection of
org.apache.cloudstack.affinity.AffinityGroupProcessor]: expected at least 1
bean which qualifies as autowire candidate for this dependency. Dependency
annotations: {@javax.inject.Inject()}
at
org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:506)
at
org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:87)
at
org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:284)
... 6 more
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No
matching bean of type [org.apache.cloudstack.affinity.AffinityGroupProcessor]
found for dependency [collection of
org.apache.cloudstack.affinity.AffinityGroupProcessor]: expected at least 1
bean which qualifies as autowire candidate for this dependency. Dependency
annotations: {@javax.inject.Inject()}
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoSuchBeanDefinitionException(DefaultListableBeanFactory.java:952)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:779)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:735)
at
org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:478)
... 8 more
^C2013-04-12 07:18:33.841:INFO::Shutdown hook executing
Can you please fix this and let us know?
Regards,
Vijay
> Affinity / Anti-affinity Rules
> ------------------------------
>
> Key: CLOUDSTACK-739
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-739
> Project: CloudStack
> Issue Type: New Feature
> Security Level: Public(Anyone can view this level - this is the
> default.)
> Reporter: Manan Shah
> Assignee: Prachi Damle
> Fix For: 4.2.0
>
>
> Requirements described at:
> https://cwiki.apache.org/confluence/display/CLOUDSTACK/Affinity+-+Anti-affinity+rules
> Requirements discussion email thread link:
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira