You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by bijeet singh <bi...@gmail.com> on 2010/08/11 09:13:10 UTC
Problem instantiating CommonsHttpSolrServer using solrj
Hi all,
I'm trying to use solrj for indexing in solr, but when I try to instantiate
the server, using :
SolrServer server = new CommonsHttpSolrServer("http://localhost:8080/solr");
I get the following runtime error:
Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/solr/client/solrj/SolrServerException
Caused by: java.lang.ClassNotFoundException:
org.apache.solr.client.solrj.SolrServerException
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
I am following the this link : http://wiki.apache.org/solr/Solrj ,and
have included all the jar files specified there, in the classpath.
Do help me out with this, thanks in advance
Bijeet
Re: Problem instantiating CommonsHttpSolrServer using solrj
Posted by Patrick Archibald <pa...@gmail.com>.
I went through jar hell yesterday. I finally got Solrj working.
http://jarfinder.com was a big help.
Rock on, PLA
Patrick L Archibald
http://patrickarchibald.com
On Fri, Aug 13, 2010 at 7:25 PM, Chris Hostetter
<ho...@fucit.org>wrote:
>
> : I get the following runtime error:
> :
> : Exception in thread "main" java.lang.NoClassDefFoundError:
> : org/apache/solr/client/solrj/SolrServerException
> : Caused by: java.lang.ClassNotFoundException:
> : org.apache.solr.client.solrj.SolrServerException
> ...
> : I am following the this link : http://wiki.apache.org/solr/Solrj ,and
> : have included all the jar files specified there, in the classpath.
>
> Are you certain?
>
> the class it can't find is
> org.apache.solr.client.solrj.SolrServerException which is definitely in
> the apache-solr-solrj-*.jar
>
> did you perchance copy the list of jars verbatim from that wiki? because
> someone seems to have made a typo and called it "solr-solrj-1.4.0.jar"
> instead of "apache-solr-solrj-1.4.0.jar" but if you actually *look* at the
> jars available, it's pretty obvious.
>
>
> -Hoss
>
>
Re: Problem instantiating CommonsHttpSolrServer using solrj
Posted by Chris Hostetter <ho...@fucit.org>.
: I get the following runtime error:
:
: Exception in thread "main" java.lang.NoClassDefFoundError:
: org/apache/solr/client/solrj/SolrServerException
: Caused by: java.lang.ClassNotFoundException:
: org.apache.solr.client.solrj.SolrServerException
...
: I am following the this link : http://wiki.apache.org/solr/Solrj ,and
: have included all the jar files specified there, in the classpath.
Are you certain?
the class it can't find is
org.apache.solr.client.solrj.SolrServerException which is definitely in
the apache-solr-solrj-*.jar
did you perchance copy the list of jars verbatim from that wiki? because
someone seems to have made a typo and called it "solr-solrj-1.4.0.jar"
instead of "apache-solr-solrj-1.4.0.jar" but if you actually *look* at the
jars available, it's pretty obvious.
-Hoss