Hi Annalisa

You missing other dependencies ( org/slf4j ) another jars
Are you building your project with maven ?? as this would be the
easiest way to manage the dependencies
Just add

<dependency>
        <groupId>org.apache.any23</groupId>
        <artifactId>apache-any23</artifactId>
        <version>0.7.0-incubating</version>
</dependency>


If you are not building your project with maven
but just want to include all jars and add them to classpath
look here:
http://mvnrepository.com/artifact/org.apache.any23/apache-any23/0.7.0-incubating

There is a list of dependencies there

Cheers
Szymon




On 24 October 2012 18:09, Anna Lisa Gentile <[email protected]> wrote:
> Hi,
> I tried to run the example for data extraction but I get a runtime error at
> the first line
>                 /*1*/ Any23 runner = new Any23();
>
> Exception in thread "main" java.lang.NoClassDefFoundError:
> org/slf4j/LoggerFactory
>     at
> org.apache.any23.configuration.DefaultConfiguration.<clinit>(DefaultConfiguration.java:45)
>     at org.apache.any23.Any23.<clinit>(Any23.java:70)
>     at uk.ac.shef.oak.xpath.TestTools.main(TestTools.java:84)
> Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory
>     at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
>     at java.security.AccessController.doPrivileged(Native Method)
>     at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
>     at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
>     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
>     at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
>     ... 3 more
>
> It could be that the issue is multiple version of slf4j library.
>
> What I did is:
> 1) checked out the trunk from the svn
> 2) mvn clean install
> 3) added all the snapshot jar from all the projects in trunk to a new empty
> project, containing only one class, the example from
> http://any23.apache.org/dev-data-extraction.html
>
> Anything I am doing wrong?
> Thanks
>
> Annalisa

Reply via email to