This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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 Murach's Java Servlets and JSP this week in the Servlets 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: 41088
    
  43
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.)


Ping & DNS - my free Android networking tools app
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: 41088
    
  43
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: 41088
    
  43
What does the XML file look like?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: org.apache.poi.hssf
 
Similar Threads
Export data from Excel to database using JAVA
ClassNotFoundException: org.apache.commons.lang.StringUtils
Java lang error
Running Bouncy Castle
Class Cast Exception