Hi guys,

I'm trying to write an EnhancementEngine for abbreviations. These should be 
used to convert abbreviations in a text automatically in a WCAG-conformant way.

So I want to build a new index to find abbreviation-informations.
The datasets I want to use are from dbPedia.org and I decided to run the 
entityhub.indexing.dbpedia.cli.CommandLineRunner for building the index.

Here's my problem:
- I built the entityhub by using mvn install (SUCCESS)
- Executed the mvn assembly:assembly command (SUCCESS)
- Starting the jar-file using "java -jar -Xmx1024 
org.apache...-jar-with-dependencies -h" results in Exception:
Exception in thread "main" java.lang.NoClassDefFoundError: 
org/apache/commons/cli/CommandLineParser
Caused by: java.lang.ClassNotFoundException: 
org.apache.commons.cli.CommandLineParser
    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)

- so I changed the scope of all dependencies to "import" and did a new mvn 
assembly:assembly (without clean).  Now java -jar ... -h works!
But if I want to clean up the entityhub, I have to set the scope of the 
dependencies back to compile for a new mvn install.
Is there a way to get dependencies at both times? (compile and run)?

Then I tried to index data using the following command:
java -jar -Xmx1024m 
target/org.apache.stanbol.entityhub.indexing.dbpedia-0.9-SNAPSHOT-jar-with-dependencies.jar
 http://localhost:8983/solr/entityhub /.../dbPedia/en/

This results in Exception:
Exception in thread "main" java.lang.NoClassDefFoundError: 
org/osgi/service/cm/ConfigurationException
    at 
org.apache.stanbol.entityhub.indexing.dbpedia.cli.CommandLineRunner.main(CommandLineRunner.java:183)
Caused by: java.lang.ClassNotFoundException: 
org.osgi.service.cm.ConfigurationException
    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)
    ... 1 more

Is this my mistake? (And how can I get rid of it?)

Regards
Wilhelm Koop







Reply via email to