Solved

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

Posted on 2014-07-30
5
149 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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Problem to Alipay 10 72
Java: anonymous class 4 38
Selenium docs api java index 3 69
web project error add remove 1 55
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…
In this post we will learn different types of Android Layout and some basics of an Android App.
The viewer will learn how to implement Singleton Design Pattern in Java.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

726 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