Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to use Apache POI in JIRA?

Matti Kiviharju
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 10, 2012

How to use Apache POI in JIRA?

6 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Answer accepted
Matti Kiviharju
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 23, 2016

Problem is now solved!

Ömer Faruk AK August 16, 2016

Hi Matti,

How can you solve this problem? Could you please explain?

Matti Kiviharju
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 16, 2016

Add this to pom.xml.

<dependency>
            <groupId>org.apache.poi</groupId>
            <artifactId>poi</artifactId>
            <version>3.9</version>
            <scope>compile</scope>
        </dependency>
       
        <dependency>
           <groupId>org.apache.poi</groupId>
           <artifactId>poi-ooxml</artifactId>
           <version>3.9</version>
           <scope>compile</scope>
        </dependency>
        
        <dependency>
           <groupId>org.apache.poi</groupId>
           <artifactId>poi-ooxml-schemas</artifactId>
           <version>3.9</version>
           <scope>compile</scope>
        </dependency>
        
        <dependency>
           <groupId>org.apache.xmlbeans</groupId>
           <artifactId>xmlbeans</artifactId>
           <version>2.6.0</version>
           <scope>compile</scope>
        </dependency>

However, only Apache POI 3.9 works.

Ömer Faruk AK August 16, 2016

Nope. It didn't work sad

Unresolved constraint in bundle com.tezExtensions [165]: Unable to resolve 165.0: missing requirement [165.0] osgi.wiring.package; (osgi.wiring.package=com.sun.javadoc)

Matti Kiviharju
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 25, 2016

I am sorry I forget these lines from pom.xml

<dependency>
          <groupId>xml-apis</groupId>
          <artifactId>xml-apis</artifactId>
          <version>2.0.2</version>
          <scope>compile</scope>
        </dependency>
        
        <dependency>
           <groupId>xerces</groupId>
           <artifactId>xercesImpl</artifactId>
           <version>2.11.0</version>
           <scope>compile</scope>
        </dependency>
        
        <dependency>
           <groupId>stax</groupId>
           <artifactId>stax-api</artifactId>
           <version>1.0.1</version>
           <scope>compile</scope>
        </dependency>
White Software August 25, 2016

I have fixed my problem in another way and now I can use any version of POI. You can find the solution in stackoverflow.com/questions/39013590/apache-poi-usage-with-apache-felix

Matti Kiviharju
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 25, 2016

Thanks.

3 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 10, 2012

When writing questions, it really helps if you

Give us context - broadly, what is the end goal? What will the user be able to do that they can't do now?

When using acronyms or software names, please do not assume that everyone knows every library, piece of software and random acronym out there. You can assume that people here know Atlassian software, as that's what we're here for. We're mostly techies, so mentioning the big important names is fine - Linux, Microsoft, Mac, Java, PostGreSQL, CSS, Javascript, etc. But anything else - explain, and give us the relevant links. If you don't, then a lot of people will simply read it, shrug, go "no idea, I've got no contribution here" and ignore you.

0 votes
parthiban subramaniam
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 10, 2012

All Excel reporting you see in JIRA is not really Excel but HTML, JIRA does not use POI, if you want to add this in your plugin you should add it as a dependency on the pom file and the default is complile which will include POI lib's in your plugin jar file.

=== personal experience

I wrote a plugin with POI and my client was experimenting with Structure plugin as well, for some reason it was killing of JIRA because i was using 3.8 and Structure plugin was using 3.7 and had to revert back mine which had control over.

could not pin point as to why it messd up apart from hiding behind the usual bloody class loaders allways messes up my stuff :(

parthiban subramaniam
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 13, 2012

Thanks Igor, as said in my comment syncing up the versions seems to have resolved it and if it helps this is on JIRA version 4.4 unless some one comes accross the same issue you can ignore it.

Igor Sereda [ALM Works]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 13, 2012

@parthis Let me know if you still have collisions with Structure. The library should be isolated, we don't export POI classes in Structure. You can send me more information and probably your plugin JAR to support@almworks.com, we'll try to figure out what happens.

Matti Kiviharju
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 31, 2012

Okay, I am developing Timesheet for JIRA plugin and one of the my customers wants reports from work logs as MS Excel file. I have a few questions about this.

1. What is artifactId of POI?

2. Is it possible to place poi jar to plugins META-INF/lib folder?

Juan Jose September 2, 2012

If you are using Jira 5 just add this to the plugin POM:

<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>3.8</version>
<scope>compile</scope>
</dependency>

The "compile" scope is the key.

The jar will be placed where needed (META-INF/lib).

Pablo Beltran
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 6, 2016

@Igor Sereda [ALM Works], it looks like Structure is exporting the full POI 3.9 library... Please watch the JIRA OSGI console > Structure > Export Package.

I installed Structure on my dev environment to explore the exported packages after read this question as some of my plugins are POI consumers...

 

Igor Sereda [ALM Works]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 6, 2016

@Kinto Soft Thanks for the pointers! That is strange indeed... We'll check that and see how to get rid of this. Some of the Structure API deals with Excel export, but POI should not be exported.

In any case, simply exporting POI must not be a problem. You should be able to limit which POI versions you import in other bundles, or mark POI packages as private if you ship your own library.

0 votes
Mizan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 10, 2012

You did not find POI jar in Jira because Jira does not use it .

You can add the JAR in WEB-INF/lib but how will you use it ?

If you are creating a plugin you can add dependency of the POI jar in your plugins POM

0 votes
Matti Kiviharju
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 10, 2012

I do not find Apache POI Framework .jar-package from any lib-folder on JIRA installation. So Do I need a manaually add POI .jar-package to JIRA's lib-folder?

0 votes
Mizan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 10, 2012

Do you want to access documents from your plugin ?

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events