org.springframework.beans.factory.NoSuchBeanDefinitionException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • When a plugin developer creates a webwork action with the same name as a JIRA webwork the autowiring fails. Here is a "DeleteWorklog" webwork that we have defined in our plugin: {code} <webwork1 key="DeleteWorklogWebWork" name="Tempo Delete Worklog Action"> <actions> <action name="com.tempoplugin.worklog.action.DeleteWorklog" alias="TempoDeleteWorklog"> ... </action> </actions> </webwork1> {code} This works fine in our plugin and our alias works fine but when the user tries to use the standard "DeleteWorklog" action on the "Work Log" tab she gets this error: {code} [INFO] [talledLocalContainer] 2011-11-16 10:20:12,003 http-2990-13 ERROR bjarnit 620x2957x1 blsvr7 10.41.105.159 /secure/DeleteWorklog!default.jspa [jira.config.webwork.JiraActionFactory] Error autowiring Action 'com.atlassian.jira.web.action.issue.DeleteWorklog'. [INFO] [talledLocalContainer] org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'com.atlassian.jira.web.action.issue.DeleteWorklog': Unsatisfied dependency expressed through constructor argument with index 1 of type [com.atlassian.jira.bc.issue.comment.CommentService]: : No unique bean of type [com.atlassian.jira.bc.issue.comment.CommentService] is defined: Unsatisfied dependency of type [interface com.atlassian.jira.bc.issue.comment.CommentService]: expected at least 1 matching bean; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [com.atlassian.jira.bc.issue.comment.CommentService] is defined: Unsatisfied dependency of type [interface com.atlassian.jira.bc.issue.comment.CommentService]: expected at least 1 matching bean [INFO] [talledLocalContainer] at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:591) [INFO] [talledLocalContainer] at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:193) [INFO] [talledLocalContainer] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:925) [INFO] [talledLocalContainer] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:835) {code} Also note that we have seen similar behavior with resources. When two plugins installed at the same instance both define *i18n.properties* as the resource one resource seems to be overwritten by the other meaning that one plugin is not localized! The workaround that we are practicing is to simply prefix all webworks classes (like "TempoDeleteWorklog.java") but you can't expect every plugin vendor to do that! Best regards, -Bjarni, Tempo team
    via by Bjarni Thorbjornsson,
  • When a plugin developer creates a webwork action with the same name as a JIRA webwork the autowiring fails. Here is a "DeleteWorklog" webwork that we have defined in our plugin: {code} <webwork1 key="DeleteWorklogWebWork" name="Tempo Delete Worklog Action"> <actions> <action name="com.tempoplugin.worklog.action.DeleteWorklog" alias="TempoDeleteWorklog"> ... </action> </actions> </webwork1> {code} This works fine in our plugin and our alias works fine but when the user tries to use the standard "DeleteWorklog" action on the "Work Log" tab she gets this error: {code} [INFO] [talledLocalContainer] 2011-11-16 10:20:12,003 http-2990-13 ERROR bjarnit 620x2957x1 blsvr7 10.41.105.159 /secure/DeleteWorklog!default.jspa [jira.config.webwork.JiraActionFactory] Error autowiring Action 'com.atlassian.jira.web.action.issue.DeleteWorklog'. [INFO] [talledLocalContainer] org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'com.atlassian.jira.web.action.issue.DeleteWorklog': Unsatisfied dependency expressed through constructor argument with index 1 of type [com.atlassian.jira.bc.issue.comment.CommentService]: : No unique bean of type [com.atlassian.jira.bc.issue.comment.CommentService] is defined: Unsatisfied dependency of type [interface com.atlassian.jira.bc.issue.comment.CommentService]: expected at least 1 matching bean; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [com.atlassian.jira.bc.issue.comment.CommentService] is defined: Unsatisfied dependency of type [interface com.atlassian.jira.bc.issue.comment.CommentService]: expected at least 1 matching bean [INFO] [talledLocalContainer] at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:591) [INFO] [talledLocalContainer] at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:193) [INFO] [talledLocalContainer] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:925) [INFO] [talledLocalContainer] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:835) {code} Also note that we have seen similar behavior with resources. When two plugins installed at the same instance both define *i18n.properties* as the resource one resource seems to be overwritten by the other meaning that one plugin is not localized! The workaround that we are practicing is to simply prefix all webworks classes (like "TempoDeleteWorklog.java") but you can't expect every plugin vendor to do that! Best regards, -Bjarni, Tempo team
    via by Bjarni Thorbjornsson,
  • [javasf] Problema Spring JSF 2.0 Primefaces
    via by Marcelo p&f,
  • Erro dependência SACI
    via by Cleber Angelo,
  • Vraptor 3 + JPA
    via by Unknown author,
    • org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [com.atlassian.jira.bc.issue.comment.CommentService] is defined: Unsatisfied dependency of type [interface com.atlassian.jira.bc.issue.comment.CommentService]: expected at least 1 matching bean at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:591) at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:193) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:925) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:835)
    No Bugmate found.