Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,551,871
Community Members
 
Community Events
184
Community Groups

I want get jira issue info in confluence plugins.

Edited

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? 

1 answer

I think maybe this class is a service of plugins, and it's not annotated with 

@ExportAsService, so I can not use it in other plugins ?
Dan Breyen
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Apr 18, 2023

@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?

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.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
8.2.1
TAGS
AUG Leaders

Atlassian Community Events