This week's book giveaway is in the Performance forum.
We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line!
See this thread for details.
Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

org.apache.poi.hssf

 
renu richard
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!!
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's not an error; it's a warning that you can ignore. A class file should have been generated.
 
renu richard
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What does the XML file look like?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic