File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other Open Source Projects and the fly likes org.apache.poi.hssf Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "org.apache.poi.hssf " Watch "org.apache.poi.hssf " New topic
Author

org.apache.poi.hssf

renu richard
Ranch Hand

Joined: Oct 06, 2008
Posts: 116
Hi,
I am trying to run a java program which takes the data from the XML and out it in the spreadsheet. So i am using poi-bin-3.2-FINAL-20081019.zip jar file. JDK version is JDK1.5.0_02. But even after placing the jar file in the classpath i am getting the below error.

Run in Eclipse :
Error occurred during initialization of VM
java/lang/NoClassDefFoundError: java/lang/Object

Compile through commmand prompt :
Note: XMLToExcel.java uses or overrides a deprecated API.
Note: Recompile with -Xlint eprecation for details.

Many Thanks!!


Cheers,
Richard
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42911
    
  68
Could this be an Eclipse problem? Does it work if you run it from the command line (remember to add the POI jar file using the "-classpath" switch.)
renu richard
Ranch Hand

Joined: Oct 06, 2008
Posts: 116
Hi,

When i run through command prompt, I am getting the below error.

C:\Documents and Settings\198669\Desktop>javac XMLToExcel.java
Note: XMLToExcel.java uses or overrides a deprecated API.
Note: Recompile with -Xlint eprecation for details.

Also, please see that i have added the JAR file in the classpath
[code]

C:\Documents and Settings\198669\Desktop>echo %classpath%
;C:\Program Files\Java\jdk1.5.0_02\bin;C:\Program Files\Java\jre1.6.0_07\bin;C:\
Program Files\Java\jdk1.5.0_02\bin;;C:\Program Files\Apache Software Foundation\
Tomcat 6.0\webapps\srilanka\WEB-INF\classes;C:\oracle\ora92\jdbc\lib\classes12.j
ar;;C:\oracle\ora92\jdbc\lib\ojdbc14.jar;C:\Documents and Settings\198669\Deskto
p\poi-3.2-FINAL\poi-3.2-FINAL-20081019.jar

[code]
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42911
    
  68
That's not an error; it's a warning that you can ignore. A class file should have been generated.
renu richard
Ranch Hand

Joined: Oct 06, 2008
Posts: 116
Hi,

Actually, i am trying to run the code which is available in this URL.

After compiling, i am trying to run this file as below
C:\Documents and Settings\198669\Desktop>java XMLToExcel incomestatements.xml

When i do so,,,,,i am getting the below error,
[Fatal Error] :-1:-1: Premature end of file.
SAXException Premature end of file.

Can you please tell me what could be the reason. Many Thanks!!
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42911
    
  68
What does the XML file look like?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: org.apache.poi.hssf