0
votes

I am trying to get solr running with tomcat. i had it working with jetty on the same server and now i am moving it to tomcat.

i created a new dir structure for the tomcat version to separate from the working jetty version

I have followed the tutorial I actually have a similar config working on a different server.

I have read the other articles that mention copy all the libs especially solr-dataimporthandler*jar and solr-dataimporthandler-extras*jar to the dir /web/solr/collection2/conf/lib

ls -ls /web/solr/collection2/conf/lib/
 total 6648
   4 drwxr-xr-x. 2 root root    4096 Sep  6 13:34 logs
2652 -rwxr-xr-x. 1 root root 2714189 Sep  6 13:29 ojdbc6.jar
  20 -rwxrwxrwx. 1 root root   17207 Sep  6 12:37 solr-analysis-extras-4.4.0.jar
  32 -rwxrwxrwx. 1 root root   30399 Sep  6 12:37 solr-cell-4.4.0.jar
  52 -rwxrwxrwx. 1 root root   50974 Sep  6 12:37 solr-clustering-4.4.0.jar
2300 -rwxrwxrwx. 1 root root 2354779 Sep  6 12:37 solr-core-4.4.0.jar
 216 -rwxrwxrwx. 1 root root  217247 Sep  6 12:30 solr-dataimporthandler-4.4.0.jar
  32 -rwxrwxrwx. 1 root root   31893 Sep  6 12:30 solr-dataimporthandler-extras-4.4.0.jar
 752 -rwxrwxrwx. 1 root root  767253 Sep  6 12:37 solr-langid-4.4.0.jar
 368 -rwxrwxrwx. 1 root root  375474 Sep  6 12:37 solr-solrj-4.4.0.jar
 156 -rwxrwxrwx. 1 root root  156896 Sep  6 12:37 solr-test-framework-4.4.0.jar
  40 -rwxrwxrwx. 1 root root   39350 Sep  6 12:37 solr-uima-4.4.0.jar
  24 -rwxrwxrwx. 1 root root   20912 Sep  6 12:37 solr-velocity-4.4.0.jar

i have edited /web/solr/collection2/conf/solrconfig.xml and added

<lib dir="/web/solr/collection2/conf/lib" />

BUT... when i try to start tomcat i get::

*10776 [coreLoadExecutor-3-thread-1] ERROR org.apache.solr.core.CoreContainer รข Unable to create core: collection2 org.apache.solr.common.SolrException: RequestHandler init failure at org.apache.solr.core.SolrCore.(SolrCore.java:835)

Caused by: org.apache.solr.common.SolrException: RequestHandler init failure at org.apache.solr.core.RequestHandlers.initHandlersFromConfig(RequestHandlers.java:167) at org.apache.solr.core.SolrCore.(SolrCore.java:772)*

I have got to be missing something simple. Is there anything to make the exception more meaningful or any other suggestions on how to debug this?

Thanks Randy

1
Have you added JDBC jar and solr-dataimporthandler-*.jar in the lib directories? โ€“ Amith Koujalgi
hi thanks as mentioned above i added the import jars as well as ojdbc6.jar in /web/solr/collection2/conf/lib. Thats what fixed it for me last time. Thats what is confusing. โ€“ randy

1 Answers

0
votes

In your solrconfig file, add the following line for dataimport

<lib dir="../dist/" regex="solr-dataimporthandler-\d.*\.jar" />

which will add all the jars whose names begin with 'solr-dataimporthandler-'

If you still have trouble, check for the lib and conf directories and provide the appropriate path in your solrconfig.xml

And if you have configured the DIH with a database, make sure that Solr has the necessary libraries (connectors) to connect to the database.