Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Plugin migration from Jira v7 to Jira v8 causes problems with Lucene classes

Chingiskhan K
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 19, 2019

Hi, all!

I'm trying to migrate the plugin which uses Lucene included in Jira 7, and the migration to Jira 8 was successful but how do I solve the problem with Lucene backward compatibility?

I'm trying to create a plugin that will support both versions of Jira 7 & 8.

I changed

public void addDocumentFieldsSearchable(Document doc, Issue issue) {
    this.addDocumentFields(doc, issue, Field.Index.NOT_ANALYZED_NO_NORMS);
}

to

public void addDocumentFieldsSearchable(Document doc, Issue issue) {
    FieldType ft = new FieldType(TextField.TYPE_STORED);
    this.addDocumentFields(doc, issue, ft);
}

But when I install the plugin on Jira 7 i get exception:

Caused by: java.lang.NoClassDefFoundError: org/apache/lucene/index/IndexableFieldType

Best regards!

1 answer

0 votes
Gonchik Tsymzhitov
Community Champion
January 3, 2021

Hi! 

did you updated the pom.xml?

Suggest an answer

Log in or Sign up to answer