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

Chingiskhan K 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 Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 3, 2021

Hi! 

did you updated the pom.xml?

Suggest an answer

Log in or Sign up to answer