incubator-odf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Svante Schubert <>
Subject Re: Gettingjava.lang.NoClassDefFoundError: org/apache/clerezza/utils/UriException with Apache ODF Toolkit
Date Wed, 11 Sep 2013 16:08:43 GMT
Hi Ravi,

the list of all the dependent libs required is provided in the pom.xml
that can be found:
You will as well find all the dependent jars in your maven lib directory
".m2" after the first build.

The easiest thing to use the ODF Toolkit project, is to build the
project. The how to can be found and you will find a
JAR with all dependencies in the "target" subfolder, which is called
or for ODFDOM

Hope that helps,

Am 09.08.2013 18:44, schrieb Ravi Joshi:
> Hi,
> I am trying to read an ods file using Apache ODF Toolkit. I am getting java.lang.NoClassDefFoundError
error while while trying execute the code provided here
> I done debugging the code and found that below line is causing the error-
> SpreadsheetDocumentdata =SpreadsheetDocument.loadDocument(file);
> Below is the error trace-
> Exceptionin thread "main"java.lang.NoClassDefFoundError:org/apache/xerces/dom/ElementNSImplat
java.lang.ClassLoader.defineClass1(NativeMethod)at java.lang.ClassLoader.defineClassCond(UnknownSource)at
java.lang.ClassLoader.defineClass(UnknownSource)at$000(UnknownSource)at$ java.lang.ClassLoader.loadClass(UnknownSource)at
sun.misc.Launcher$AppClassLoader.loadClass(UnknownSource)at java.lang.ClassLoader.loadClass(UnknownSource)at
java.lang.ClassLoader.defineClass1(NativeMethod)at java.lang.ClassLoader.defineClassCond(UnknownSource)at
>$000(UnknownSource)at$ java.lang.ClassLoader.loadClass(UnknownSource)at
sun.misc.Launcher$AppClassLoader.loadClass(UnknownSource)at java.lang.ClassLoader.loadClass(UnknownSource)at$ java.lang.ClassLoader.loadClass(UnknownSource)at
sun.misc.Launcher$AppClassLoader.loadClass(UnknownSource)at java.lang.ClassLoader.loadClass(UnknownSource)...25more
> odfdom-java-0.8.9-incubating.jar and simple-odf-0.8-incubating.jar are in classpath.
Later on from here I
added Apache Xerces 2.11 to the classpath also. Still facing the problem. Below is the error
> Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/clerezza/utils/UriException
at org.odftoolkit.odfdom.pkg.OdfPackage.getBaseURLFromFile( at org.odftoolkit.odfdom.pkg.OdfPackage.loadPackage(
at org.odftoolkit.simple.Document.loadDocument( at org.odftoolkit.simple.SpreadsheetDocument.loadDocument(
> Caused by: java.lang.ClassNotFoundException: org.apache.clerezza.utils.UriException at$ Source) at$ Source)
at Method) at
Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown
Source) at java.lang.ClassLoader.loadClass(Unknown Source) ... 5 more
> I am now ended up with adding dependencies. My objective is just to read some cells from
an ods file. Can anybody please provide the list of all the jars needed just to read ods file?
> -Ravi

View raw message