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 Raivo Rebane <ra...@r-systems.ee> on 2020/10/20 10:37:38 UTC

SolrJ doesn't find symbol

Hello

I want to use solrj in Maven project, but I got errors:

[ERROR] 
/home/hydra/workspace1/kaks/src/main/java/solr/SolrJExample.java:[9,36] 
cannot find symbol
[ERROR]   symbol:   class SolrClient
[ERROR]   location: package org.apache.solr.client.solrj
[ERROR] 
/home/hydra/workspace1/kaks/src/main/java/solr/SolrJExample.java:[14,41] 
cannot find symbol
[ERROR]   symbol:   class HttpSolrClient
[ERROR]   location: package org.apache.solr.client.solrj.impl
[ERROR] 
/home/hydra/workspace1/kaks/src/main/java/solr/SolrJExample.java:[32,26] 
cannot find symbol
[ERROR]   symbol:   class SolrClient
[ERROR]   location: class solr.SolrJExample
[ERROR] 
/home/hydra/workspace1/kaks/src/main/java/solr/SolrJExample.java:[32,68] 
package HttpSolrClient does not exist
[ERROR] 
/home/hydra/workspace1/kaks/src/main/java/solr/SolrJExample.java:[133,18] 
cannot find symbol
[ERROR]   symbol:   method 
setSort(java.lang.String,org.apache.solr.client.solrj.SolrQuery.ORDER)
[ERROR]   location: variable solrQuery of type 
org.apache.solr.client.solrj.SolrQuery
[ERROR] 
/home/hydra/workspace1/kaks/src/main/java/solr/SolrJExample.java:[161,18] 
cannot find symbol
[ERROR]   symbol:   method 
setSort(java.lang.String,org.apache.solr.client.solrj.SolrQuery.ORDER)
[ERROR]   location: variable solrQuery of type 
org.apache.solr.client.solrj.SolrQuery

My .classpath looks like:

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
     <classpathentry kind="var" 
path="TOMCAT_HOME/solr/httpclient5-5.0.3.jar"/>
     <classpathentry kind="var" 
path="TOMCAT_HOME/solr/solr-solrj-8.6.3.jar"/>
     <classpathentry kind="var" 
path="TOMCAT_HOME/solr/commons-codec-1.15.jar"/>
     <classpathentry kind="var" 
path="TOMCAT_HOME/solr/commons-httpclient-3.1.jar"/>
     <classpathentry kind="var" path="TOMCAT_HOME/solr/commons-io-1.4.jar"/>
     <classpathentry kind="var" 
path="TOMCAT_HOME/solr/jcl-over-slf4j-1.5.5.jar"/>
     <classpathentry kind="src" output="target/classes" 
path="src/main/java">
         <attributes>
             <attribute name="optional" value="true"/>
             <attribute name="maven.pomderived" value="true"/>
         </attributes>
     </classpathentry>
     <classpathentry excluding="**" kind="src" output="target/classes" 
path="src/main/resources">
         <attributes>
             <attribute name="maven.pomderived" value="true"/>
         </attributes>
     </classpathentry>
     <classpathentry kind="src" output="target/test-classes" 
path="src/test/java">
         <attributes>
             <attribute name="optional" value="true"/>
             <attribute name="maven.pomderived" value="true"/>
             <attribute name="test" value="true"/>
         </attributes>
     </classpathentry>
     <classpathentry excluding="**" kind="src" 
output="target/test-classes" path="src/test/resources">
         <attributes>
             <attribute name="maven.pomderived" value="true"/>
             <attribute name="test" value="true"/>
         </attributes>
     </classpathentry>
     <classpathentry kind="con" 
path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5">
         <attributes>
             <attribute name="maven.pomderived" value="true"/>
         </attributes>
     </classpathentry>
     <classpathentry kind="con" 
path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
         <attributes>
             <attribute name="maven.pomderived" value="true"/>
         </attributes>
     </classpathentry>
     <classpathentry kind="output" path="target/classes"/>
</classpath>

Hope that anybody helps me

I Can't udrestand where is mistake ?

Looking forward

Raivo Rebane

I add my pomxml