Re: Enabling DIH breaks Solr4.4

2013-08-08 Thread Rafał Kuć
Hello!

Try changing the lib directives to absolute paths, by looking at the
exception:

Caused by: java.lang.ClassNotFoundException:
org.apache.solr.handler.dataimport.DataImportHandler

it seems that the DataImportHandler class is not seen by Solr
class loader.

-- 
Regards,
 Rafał Kuć
 Sematext :: http://sematext.com/ :: Solr - Lucene - ElasticSearch

 Hi,

 I'm a bit stuck here. I had Solr4.4 working without too many issues. I
 wanted to enable the DIH so I firstly added these lines to the
 solrconfig.xml:

 lib dir=../contrib/dataimporthandler/lib regex=.*\.jar /
 lib dir=../dist/ regex=apache-solr-dataimporthandler-.*\.jar /

 Restarted and everything was fine. Then I added these lines to the config as
 well which broke Solr:

 requestHandler name=/dataimport
 class=org.apache.solr.handler.dataimport.DataImportHandler
 lst name=defaults
   str
 name=config/opt/solr/collection1/conf/data-config.xml/str
 /lst
   /requestHandler

 This is the error it gives me:

 HTTP ERROR 500

 Problem accessing /solr/. Reason:

 {msg=SolrCore 'collection1' is not available due to init failure:
 RequestHandler init
 failure,trace=org.apache.solr.common.SolrException:
 SolrCore 'collection1' is not available due to init failure: RequestHandler
 init failure
 at
 org.apache.solr.core.CoreContainer.getCore(CoreContainer.java:860)
 at
 org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:251)
 at
 org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:158)
 at
 org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1486)
 at
 org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:503)
 at
 org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:138)
 at
 org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:540)
 at
 org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:213)
 at
 org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1094)
 at
 org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:432)
 at
 org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:175)
 at
 org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1028)
 at
 org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:136)
 at
 org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:258)
 at
 org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:109)
 at
 org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
 at
 org.eclipse.jetty.rewrite.handler.RewriteHandler.handle(RewriteHandler.java:317)
 at
 org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
 at org.eclipse.jetty.server.Server.handle(Server.java:445)
 at
 org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:267)
 at
 org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:224)
 at
 org.eclipse.jetty.io.AbstractConnection$ReadCallback.run(AbstractConnection.java:358)
 at
 org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:601)
 at
 org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:532)
 at java.lang.Thread.run(Thread.java:724)
 Caused by: org.apache.solr.common.SolrException: RequestHandler init failure
 at org.apache.solr.core.SolrCore.init(SolrCore.java:835)
 at org.apache.solr.core.SolrCore.init(SolrCore.java:629)
 at
 org.apache.solr.core.CoreContainer.createFromLocal(CoreContainer.java:622)
 at
 org.apache.solr.core.CoreContainer.create(CoreContainer.java:657)
 at
 org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:364)
 at
 org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:356)
 at
 java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
 at java.util.concurrent.FutureTask.run(FutureTask.java:166)
 at
 java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
 at
 java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
 at java.util.concurrent.FutureTask.run(FutureTask.java:166)
 at
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
 at
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
 ... 1 more
 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.init(SolrCore.java:772)
 ... 13 more
 Caused by: org.apache.solr.common.SolrException: Error loading class
 

Re: Enabling DIH breaks Solr4.4

2013-08-08 Thread Raymond Wiker
I think the problem is that you have the wrong name for the jar file: you
have apache-solr-dataimporthandler instead of  simply
solr-dataimporthandler.

In my solrconfig.xml, I have

  lib dir=../../../dist/ regex=solr-dataimporthandler-.*\.jar /

--- which may or may not work for you.


Re: Enabling DIH breaks Solr4.4

2013-08-08 Thread Spadez
Thank you both so much for your help. The regex was indeed outdated.
Everything works perfectly now! :) 



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Enabling-DIH-breaks-Solr4-4-tp4083282p4083286.html
Sent from the Solr - User mailing list archive at Nabble.com.