hello, I use jira and confluence together. I write a confluence plugin with sdk, It's a servlet filter. I want to get relevant jira info (when i add a confluence link in jira issue, the confluence page will have a connected jira info) of current page. I find out com.atlassian.confluence.plugins.metadata.jira.service.JiraMetadataService may help, so i include a maven jar below and I can find this jar in Confluence installed path.
<dependency>
<groupId>com.atlassian.confluence.plugins</groupId>
<artifactId>confluence-jira-metadata</artifactId>
<version>4.1.9</version>
<scope>provided</scope>
</dependency>
The java code :
@ComponentImport
private JiraMetadataService jiraMetadataService ;
@Inject
public void setJiraMetadataService (JiraMetadataService jiraMetadataService){
this.jiraMetadataService =jiraMetadataService ;
}
but When I install the plugin, It take a long time to find this service. and then timeout. the log output:
2023-04-18 18:07:16,793 ERROR [Spring DM Context Creation Timer] [internal.dependencies.startup.DependencyWaiterApplicationContextExecutor] fail Unable to create application context for [com.zhongtai.confluence-jira-filter], unsatisfied dependencies: Dependency on [(&(objectClass=com.atlassian.confluence.plugins.metadata.jira.service.JiraMetadataService)(objectClass=com.atlassian.confluence.plugins.metadata.jira.service.JiraMetadataService))] (from bean [&jiraMetadataService])
org.springframework.context.ApplicationContextException: Application context initialization for 'com.zhongtai.confluence-jira-filter' has timed out waiting for (&(objectClass=com.atlassian.confluence.plugins.metadata.jira.service.JiraMetadataService)(objectClass=com.atlassian.confluence.plugins.metadata.jira.service.JiraMetadataService))
So Why Spring can not find this Service ? and How to get Jira issue info in confluence plugins?
I think maybe this class is a service of plugins, and it's not annotated with
@Lion, are you just trying to show Jira information on a Confluence page? If so, can you get the list of issues with a JQL Query?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
no, I just add confluence link in jira issue, so the confluence page has a connected jira info. I want to get this jira info by pageid in my confluence plugin.
I can get it by jira-metadata rest api just as the confluence page does, but it's not graceful.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.