Hello,
I tried to follow this tutorial here:
https://developer.atlassian.com/server/jira/platform/creating-a-jira-issue-crud-servlet-and-issue-search/
I have following service class:
@Scanned
@Service
public class JiraService {
private static final Logger log = LoggerFactory.getLogger(JiraService.class);
@JiraImport
private IssueService issueService;
@JiraImport
private ProjectService projectService;
@JiraImport
private UserManager userManager;
@JiraImport
private ConstantsManager constantsManager;
@JiraImport
private JiraAuthenticationContext authenticationContext;
public JiraService(IssueService issueService, ProjectService projectService, UserManager userManager, ConstantsManager constantsManager, JiraAuthenticationContext authenticationContext) {
this.issueService = issueService;
this.projectService = projectService;
this.userManager = userManager;
this.constantsManager = constantsManager;
this.authenticationContext = authenticationContext;
}
Wiring it in another service:
@Autowired
@Inject
private JiraService jiraService;
But jira locally does not start at all as it enters some magical cycle while trying to run locally by atlas-run cmd:
[INFO] [talledLocalContainer] "Reference Handler" Id=2 RUNNABLE
[INFO] [talledLocalContainer] at java.base@14.0.2/java.lang.ref.Reference.waitForReferencePendingList(Native Method)
[INFO] [talledLocalContainer] at java.base@14.0.2/java.lang.ref.Reference.processPendingReferences(Reference.java:241)
[INFO] [talledLocalContainer] at java.base@14.0.2/java.lang.ref.Reference$ReferenceHandler.run(Reference.java:213)
[INFO] [talledLocalContainer]
[INFO] [talledLocalContainer] "Finalizer" Id=3 WAITING on java.lang.ref.ReferenceQueue$Lock@8b885ce
[INFO] [talledLocalContainer] at java.base@14.0.2/java.lang.Object.wait(Native Method)
[INFO] [talledLocalContainer] - waiting on java.lang.ref.ReferenceQueue$Lock@8b885ce
[INFO] [talledLocalContainer] at java.base@14.0.2/java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:155)
[INFO] [talledLocalContainer] at java.base@14.0.2/java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:176)
[INFO] [talledLocalContainer] at java.base@14.0.2/java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:170)
[INFO] [talledLocalContainer]
[INFO] [talledLocalContainer] "Signal Dispatcher" Id=4 RUNNABLE
In my humble opinion there is an issue combining constructor and JiraImport annotations..