Forums

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

Plugin: ClassNotFoundException: org.tukaani.xz.FilterOptions

Frank Heinze
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!
July 28, 2025

Hello,

We have a plugin we wrote ourselves to check the attachments uploaded to a Jira ticket. It can currently handle ZIP files, and now I wanted to extend it to include 7zip.
To do this, I am using the dependency “org.apache.commons/commons-compress,” which in turn requires “org.tukaani/xz”.

<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-compress</artifactId>
<version>1.27.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.tukaani</groupId>
<artifactId>xz</artifactId>
<version>1.10</version>
<scope>compile</scope>
</dependency>

Setting the scope of the dependency “org.tukaani/xz” to “provided” did not help either. However, the packages were definitely included in the actual jar, regardless of which scope I used.
grafik.png


I have also integrated this, but I am getting the following error message from Jira

java.lang.ClassNotFoundException: org.tukaani.xz.FilterOptions
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1353)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1162)
at org.apache.commons.compress.archivers.sevenz.Coders.<clinit>(Coders.java:204)
at org.apache.commons.compress.archivers.sevenz.SevenZFile.buildDecoderStack(SevenZFile.java:589)
at org.apache.commons.compress.archivers.sevenz.SevenZFile.reopenFolderInputStream(SevenZFile.java:1588)
at org.apache.commons.compress.archivers.sevenz.SevenZFile.buildDecodingStream(SevenZFile.java:649)
at org.apache.commons.compress.archivers.sevenz.SevenZFile.getNextEntry(SevenZFile.java:866)

 

I also tried adding the packages from “tukaani” to the export and import settings. I tried several different spellings. But that didn't help at all.

<!-- Add package to export here -->
<Export-Package>
org.tukaani.xz*
</Export-Package>

<!-- Add package import here -->
<Import-Package>
org.tukaani.xz*,
*;resolution:=optional
</Import-Package>

 

And when I look at the OSGI control, the packages are also pulled during import and export.
grafik.png

 

Does anyone have any idea what else I can do?
I have some experience with Spring, but not in depth.

0 answers

Suggest an answer

Log in or Sign up to answer