Details
-
Bug
-
Resolution: Unresolved
-
Low
-
None
-
4.4.3, 5.0 - EAP, 6.1.7, 6.3
-
4.04
-
3
-
Severity 3 - Minor
-
0
-
Description
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:
<webwork1 key="DeleteWorklogWebWork" name="Tempo Delete Worklog Action"> <actions> <action name="com.tempoplugin.worklog.action.DeleteWorklog" alias="TempoDeleteWorklog"> ... </action> </actions> </webwork1>
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:
[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)
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
Attachments
Issue Links
- is duplicated by
-
JRASERVER-27865 Plugin actions can't share the same simple class name
- Closed