Problem in custom incoming mail handler plugin Edited

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 vote

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

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 Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,313 views 14 20
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot