Need help regarding custom importer based on JIM

Hi,

I have written a custom importer plugin where I have my own GUI and want to call doImport method of

public interface JiraDataImporter {

void doImport(ImporterExecutionContext importerExecutionContext);

}

where this is exposed by JIM to write our own importers.

I have injected JiraDataImporter in my service constructor and tried to call the iiraDataImporter.doImport(importerExecutionContext);

I am getting the below error when I called the above method.

java.lang.NoClassDefFoundError: com/atlassian/jira/plugins/importer/imports/importer/impl/ImporterExecutionContext

As they haven't exported the Impl package I am getting this error. Is there any way to call doImport(...) from my own class or any way to get the ImporterExecutionContext in to my class to avoid the above error.

Please help.

1 answer

Hi,

You are right, JIM is not exporting its *.impl packages so you cannot create ImporterExecutionContext in your plugin. JIM was design in a way that only ImporterLogsPage is able to start the import - we also recommend you to do the same. The last two pages of the importer (Logs page and Finished page) are always invoked in as the last steps of the import - they make sure that import is invoked correctly (JIRA is prepared, importer started in background thread) and closed/aborted correctly.

Although I think it's a good idea to export ImporterExecutionContext (or refactor it to already exported package), so plugin developers can use it freely. I will add that to JIM backlog, I can't make any promises, but we will try to add this to JIM which will come with JIRA 6.3.

Cheers,

Przemek

Hi Przemek,

Need one more help.

As I said earlier I have written custom csv importer and it works fine for all system admins from admin pages.

Now I am trying to have a link for this functionality where this can be accessed to

users like project-lead(non-sysadmins) as well. As you know that our importer is accessed by admins only.

I could able to go to till the last page i.e. BeginImport page, but when I click on it I am getting below permission violation error.

Could you please help me in resolving this issue?

http://sdevuke:2990/jira/login.jsp?permissionViolation=true&os_destination=/secure/admin/ImporterLogsPage!import.jspa?externalSystem=com.test.eets.jira-custom-csv-importer:jiraCustomCsvImporter&atl_token=BHMU-N952-WZWY-MSR2|303894606b77537a6ef72a25b0ef9f00e846ab9c|lin

Thanks,

Srinivas

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 29, 2018 in Marketplace Apps

How to set up an incident workflow from the VP of Engineering at Sentry

Hey Atlassian community, I help lead engineering at Sentry, an open-source error-tracking and monitoring tool that integrates with Jira. We started using Jira Software Cloud internally last year, a...

1,324 views 0 8
Read article

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