Solved

Getting error when attempting to create a workbook using Java POI API

Posted on 2014-07-30
5
150 Views
Last Modified: 2014-08-29
I am getting an error when trying to create a workbook. I have attached the error stack from the debug screen. This is the first time I have run into this issue and I think it may have something to do with the recent upgrade to Microsoft Office 2010 and I'm now trying to read .xlsx files where before I was reading .xls files. As such, it might mean I need some different jars. If so, how do I go about adding them to the application. As always, any help is greatly appreciated.
error-stack.txt
0
Comment
Question by:awking00
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 2

Expert Comment

by:Jack Frost
ID: 40230653
I've not used POI and someone who has may be able to give more specific help.  Also you didn't really describe your environment very much.  Windows/Mac/Linux.   How the app is launched,  cmdline/script/somethingElse.  Sorry if this is all obvious to someone who knows POI.

I think you looking for the POI-HSSF and or POI-XSSF related jar files.  You may need to verify that they are somewhere in your system.  

Once you have loaded/located the jar files there are generally two ways to specify where to find the .JAR files to the JVM.

The CLASSPATH environment variable.
The -cp/-classpath command line parameter of the java jvm.   Try java -h for parameters.

To make adjustments you may need to track down a launch script.  Or the parameters of a desktop launch widget.  The CLASSPATH could also be set by login scripts.

This article talks a bit about the CLASSPATH environment variable: http://docs.oracle.com/javase/tutorial/essential/environment/paths.html
0
 
LVL 32

Author Comment

by:awking00
ID: 40231492
Added information - The environment is Windows and the application is being launched via Eclipse.
0
 
LVL 2

Accepted Solution

by:
Jack Frost earned 500 total points
ID: 40231991
So your using run/debug?  I've only used Eclipse as a development environment. Usually Eclipse is pretty good about including Jars that are part of a project.   You can check the settings under:

Run -> Run Configurations.  Choose the application in the list then click the Classpath tab.

Pretty much the same for debug configurations.

If your jars are not in the list you can add them manually in the User Entries.  But you may also want to check your project dependencies if you think the jars are in location that is known to the project.
0
 
LVL 32

Author Comment

by:awking00
ID: 40261369
Please bear with me as I am awaiting the installation of a new version of Java that I belileve contains the jar file(s) that I need. I work in a place that makes one go through hoops to install any new software. I will close the question when I find that the upgrade solves my problem.
0
 
LVL 32

Author Closing Comment

by:awking00
ID: 40292850
The jar files I needed were just recently made available and adding them to my class path took care of the issue.
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question