You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stanbol.apache.org by st...@urmel.fh-swf.de on 2011/04/11 11:35:24 UTC

indexing dbPedia

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








Re: indexing dbPedia

Posted by Rupert Westenthaler <ru...@gmail.com>.
Hi

Back when I created the pom I had also troubles like that. The only
way I found to solve this problem was to remove the link to the parent
POM. I just noticed, that during the refactoring of the Stanbol build
structure the parent POM was activated again.
As a temporary fix I again removed the link to the parent POM, but I
would really like to understand why that happens.
I hope this will resolve your problems

Some other notes/questions:
 - what property of dbPedia do you use? The normal labels or is there
an own one for abbreviations? In case it is an own property please
make sure that it is covered by the cache configuration
 - If abbreviations are stored in an own property you might also want
to use a special Solr Field (e.g. without tokenizers) for indexing.

best
Rupert Westenthaler

On Mon, Apr 11, 2011 at 11:35 AM,  <st...@urmel.fh-swf.de> wrote:
> 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
>
>
>
>
>
>
>
>



-- 
| Rupert Westenthaler             rupert.westenthaler@gmail.com
| Bodenlehenstraße 11                             ++43-699-11108907
| A-5500 Bischofshofen