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: 35223
7
posted
0
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.)
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: 35223
7
posted
0
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
posted
0
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: 35223
7
posted
0
What does the XML file look like?
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.