• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Bear Bibeault
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh

org.apache.poi.hssf

 
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!!
 
Rancher
Posts: 43024
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 43024
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 43024
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What does the XML file look like?
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic