Note that there are some explanatory texts on larger screens.

plurals
  1. POException with EmbeddedSolrServer : java.lang.NoClassDefFoundError
    text
    copied!<p>I'm trying to use the EmbeddedSolrServer with Solrj, but when I run my program, I get an exception :</p> <pre><code>Exception in thread "main" java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoa der.java:58) Caused by: java.lang.NoClassDefFoundError: org/apache/lucene/analysis/util/Resou rceLoader at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:791) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:14 2) at java.net.URLClassLoader.defineClass(URLClassLoader.java:449) at java.net.URLClassLoader.access$100(URLClassLoader.java:71) at java.net.URLClassLoader$1.run(URLClassLoader.java:361) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at java.lang.ClassLoader.loadClass(ClassLoader.java:423) at java.lang.ClassLoader.loadClass(ClassLoader.java:356) at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:791) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:14 2) at java.net.URLClassLoader.defineClass(URLClassLoader.java:449) at java.net.URLClassLoader.access$100(URLClassLoader.java:71) at java.net.URLClassLoader$1.run(URLClassLoader.java:361) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at java.lang.ClassLoader.loadClass(ClassLoader.java:423) at java.lang.ClassLoader.loadClass(ClassLoader.java:356) at Main.Main.main(Main.java:35) ... 5 more Caused by: java.lang.ClassNotFoundException: org.apache.lucene.analysis.util.Res ourceLoader at java.net.URLClassLoader$1.run(URLClassLoader.java:366) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at java.lang.ClassLoader.loadClass(ClassLoader.java:423) at java.lang.ClassLoader.loadClass(ClassLoader.java:356) ... 28 more </code></pre> <p>I've seen another post that shows the same problem but I didn't understand how to set the classpath they've talked about. </p> <p>I've got the solr-core-4.2.1.jar. I checked that this JAR file contains ResourceLoader Class and it does. So I'm a bit lost... Why this class is missing when I run my program ?</p> <p>Posts related to my problem : </p> <p><a href="https://stackoverflow.com/questions/16018765/solr-java-lang-noclassdeffounderror-org-apache-solr-common-resourceloader">solr java.lang.NoClassDefFoundError: org/apache/solr/common/ResourceLoader</a></p> <p><b>Edit :</b> <a href="https://stackoverflow.com/questions/13245202/im-trying-to-index-files-in-a-document-through-solr-and-lucene">I&#39;m trying to index files in a document through SOLR and lucene..</a></p> <p>Could someone explain ? </p> <p>Thanks</p> <p>Corentin</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload