Problem in custom incoming mail handler plugin

AleksejsC July 13, 2017

Hello. I'm trying to complete Jira official tutorial to create custom mail handler. I already tried to finish it several times but without success. When i'm trying to add my mail handler instead of parameter form window I'm getting an error: 

The JIRA server was contacted but has returned an error response. We are unsure of the result of this operation.

Close this dialog and press refresh in your browser

Restarts and browser refreshes didn't help.

Also, I have problem with component IssueKeyValidator.java. I can't add it in pom.xml because of changes (now developers must use Spring Scanner annotation what will perform same actions). If i'm using spring annotation i'm getting error: 

[ERROR] PATH/IssueKeyValidator.java:[8,2] cannot find symbol
symbol: class Component

Annotation is added right befor class:

@Component
public class IssueKeyValidator
{ ... }

I'm using Atlassian SDK to create plugin. Jira version: 7.2.2. 
Spring Scanner is 1.2.13 v.. Already converted it to 2.0.0 but without result. Also tried to use Jira v. 6.4.13 for old version of Spring Scanner but still without success. Java_home is ok: poiting on jdk 1.8.*

In this case i have two problems but main question is how to fix mail handler. 

I tried alot to find information about this.. in Jira systems - no result.

I will significantly appreciate any help to finish this. Patiently wating for response or addition questions.

With respect,

Alex.


P.S. My final task is to create incoming mail handler to change issue status (resolve, close issue) with help of special syntax (advance level).


 

1 answer

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 14, 2017

What does the log file say when you're trying to add the handler?

AleksejsC July 14, 2017

Uploaded part of log here.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 14, 2017
AleksejsC July 14, 2017

I already tried to add <component> or <component-import> in plugin descriptor but without result. I'm getting error: 

[ERROR] atlassian-plugin.xml contains a definition of component. This is not allowed when Atlassian-Plugin-Key is set.

For test, deleted line with atlassian-plugin-key from descriptor. Plugin started successfully but i received error on web page:

JIRA Startup Failed

Error occurred while starting Plugin Manager. The plugin key 'com.example.plugins.tutorial.jira.mail-handler-demo' must either match the OSGi bundle symbolic name (Bundle-SymbolicName) or be specified in the Atlassian-Plugin-Key manifest header caused by: The plugin key 'com.example.plugins.tutorial.jira.mail-handler-demo' must either match the OSGi bundle symbolic name (Bundle-SymbolicName) or be specified in the Atlassian-Plugin-Key manifest header
 
That why I was writing about Spring Scanner problem.. how I understand, it's needed to provide reference on components with annotation. I suppose this can fix my problem.
 
Anyway, thank you for your help. Any ideas how to fix Spring Scanner annotation or I'm thinking in different way? Just in case full log file is here.

Suggest an answer

Log in or Sign up to answer