lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Muhannad <muh.a...@gmail.com>
Subject Re: Error :dataimport handler is not request Handler, help
Date Mon, 20 Jun 2011 12:21:05 GMT
*Hi All
Thank you every body , it now works , and I can work with solr 4.0
the solution was the following ,
as mentioned before by Jeffrey Chang , I tried a clean solr environment , so
I removed all data import jar files from solr class paths , and commented
the <lib> directives in solrconfig.xml but kept only on and this is the
<lib dir="./solr/lib" />
I run solr without any jar so an exception raised to tell that dataimport is
not exist
ClassNotFoundException
then I turn off the server and put the jar in the example/solr/lib directory
after this final step I fired Solr , and now It works fine now !!!!
Thanks guys ...I really Thank you

*
On Mon, Jun 20, 2011 at 2:56 PM, Muhannad <muh.acit@gmail.com> wrote:

> I tried this and removed all dataimport jars , but only kept one on lib
> sirectory in Solr instance but the same error exists , I never faced this
> problem before , could it because I have a non-stable version of Solr 4.0?
>
>
> 2011/6/20 Jeffrey Chang <jclalala@gmail.com>
>
>> Hi,
>>
>> I've encountered a similar issue before.
>>
>> The problem for me was the Classloader that loaded DataImportHandler class
>> is not the same as the one loading the SolrRequestHandler class.
>>
>> Trace...
>>
>> In SolrCore.java (3.1 source)
>> <--
>> line 459: createInstance(className, SolrRequestHandler.class, "Request
>> Handler")
>> <--
>> line: 423: clazz = getResourceLoader().findClass(className);
>> <--
>> line: 424: if (cast != null && !cast.isAssignableFrom(clazz))
>>
>> This evaluation will fail since clazz is not loaded by the same
>> classloader as cast.
>>
>> What I did was to make sure that the dataimport jars are NOT in the
>> classpath and not loaded by other classloaders but from the path specified
>> in solrconfig.xml. This will ensure that the dataimport classes are loaded
>> by the same classloader.
>>
>> Not sure if this is the same issue you're encountering, I hope this helps.
>>
>> Thanks,
>> Jeff
>>
>> On Mon, Jun 20, 2011 at 2:36 PM, Muhannad <muh.acit@gmail.com> wrote:
>>
>>> Yes , I just tried it , and this works for Solr 1.4 I am currently
>>> working on  , but when I tried 3.1 or 4.0
>>> the same error appears  ,I know that the war file no more contains jar
>>> files related to dataimport and logging functionality , I put all requested
>>> files in class path , and I am sure it loads them as the server starts , but
>>> I guess the problem is that it doesn't recognise dataimportHandler as a
>>> RequestHandler
>>> I really stuck , and confused!!!
>>>
>>>   On Mon, Jun 20, 2011 at 3:14 AM, Bill Bell <billnbell@gmail.com>wrote:
>>>
>>>>   Did you try adding something like this to solrconfig.xml ?
>>>>
>>>> <lib dir="../../../../dist/"
>>>> regex="apache-solr-dataimporthandler-.*\.jar" />
>>>>
>>>>     <requestHandler name="/dataimport"
>>>> class="org.apache.solr.handler.dataimport.DataImportHandler">
>>>>     <lst name="defaults">
>>>>         <str name="config">db-data-config.xml</str>
>>>>     </lst>
>>>>   </requestHandler>
>>>>
>>>>
>>>>
>>>>  From: Muhannad <muh.acit@gmail.com>
>>>> Reply-To: <dev@lucene.apache.org>
>>>> Date: Sun, 19 Jun 2011 23:42:45 +0300
>>>>
>>>> To: <dev@lucene.apache.org>
>>>> Subject: Re: Error :dataimport handler is not request Handler, help
>>>>
>>>> I have tried many things , same problem still , any  help?
>>>>
>>>> On Sun, Jun 19, 2011 at 9:00 PM, Muhannad <muh.acit@gmail.com> wrote:
>>>>
>>>>>  Hi All , I am really stuck in this problem ,  I am using solr to
>>>>> index some tables in database and I followed these steps to achieve my
goal
>>>>> 1- added the following section  to solrconfig.xml   <requestHandler
>>>>> name="/dataimport"
>>>>> class="org.apache.solr.handler.dataimport.DataImportHandler">
>>>>>                 <lst name="defaults">
>>>>>                         <str name="config">data-config.xml</str>
>>>>>                 </lst>
>>>>>         </requestHandler>
>>>>>
>>>>> *2- added apache-solr-dataimporthandler.jar to lib/ directory (include
>>>>> path)
>>>>> every thing goes nice !!! for now , till I fire the server
>>>>> the following error appears , Please I need You help urgently !!!
>>>>>
>>>>> =======================Error message==============================
>>>>> * HTTP ERROR 500
>>>>>
>>>>> Problem accessing /solr/. Reason:
>>>>>
>>>>>     Severe errors in solr configuration.
>>>>>
>>>>> Check your log files for more detailed information on what may be wrong.
>>>>>
>>>>> -------------------------------------------------------------
>>>>> org.apache.solr.common.SolrException: Error Instantiating Request Handler,
org.apache.solr.handler.dataimport.DataImportHandler is not a org.apache.solr.request.SolrRequestHandler
>>>>> 	at org.apache.solr.core.SolrCore.createInstance(SolrCore.java:396)
>>>>> 	at org.apache.solr.core.SolrCore.createRequestHandler(SolrCore.java:431)
>>>>> 	at org.apache.solr.core.RequestHandlers.initHandlersFromConfig(RequestHandlers.java:158)
>>>>> 	at org.apache.solr.core.SolrCore.<init>(SolrCore.java:513)
>>>>> 	at org.apache.solr.core.CoreContainer.create(CoreContainer.java:653)
>>>>> 	at org.apache.solr.core.CoreContainer.load(CoreContainer.java:406)
>>>>> 	at org.apache.solr.core.CoreContainer.load(CoreContainer.java:291)
>>>>> 	at org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:240)
>>>>> 	at org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:93)
>>>>> 	at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97)
>>>>> 	at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
>>>>> 	at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:713)
>>>>> 	at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
>>>>> 	at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1282)
>>>>> 	at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:518)
>>>>> 	at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:499)
>>>>> 	at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
>>>>> 	at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
>>>>> 	at org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:156)
>>>>> 	at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
>>>>> 	at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
>>>>> 	at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
>>>>> 	at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
>>>>> 	at org.mortbay.jetty.Server.doStart(Server.java:224)
>>>>> 	at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
>>>>> 	at org.mortbay.xml.XmlConfiguration.main(XmlConfiguration.java:985)
>>>>> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>>>>> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>>>> 	at java.lang.reflect.Method.invoke(Method.java:616)
>>>>> 	at org.mortbay.start.Main.invokeMain(Main.java:194)
>>>>> 	at org.mortbay.start.Main.start(Main.java:534)
>>>>> 	at org.mortbay.start.Main.start(Main.java:441)
>>>>> 	at org.mortbay.start.Main.main(Main.java:119)
>>>>> -------------------------------------------------------------
>>>>> org.apache.solr.common.SolrException: RequestHandler init failure
>>>>> 	at org.apache.solr.core.RequestHandlers.initHandlersFromConfig(RequestHandlers.java:173)
>>>>> 	at org.apache.solr.core.SolrCore.<init>(SolrCore.java:513)
>>>>> 	at org.apache.solr.core.CoreContainer.create(CoreContainer.java:653)
>>>>> 	at org.apache.solr.core.CoreContainer.load(CoreContainer.java:406)
>>>>> 	at org.apache.solr.core.CoreContainer.load(CoreContainer.java:291)
>>>>> 	at org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:240)
>>>>> 	at org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:93)
>>>>> 	at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97)
>>>>> 	at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
>>>>> 	at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:713)
>>>>> 	at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
>>>>> 	at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1282)
>>>>> 	at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:518)
>>>>> 	at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:499)
>>>>> 	at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
>>>>> 	at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
>>>>> 	at org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:156)
>>>>> 	at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
>>>>> 	at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
>>>>> 	at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
>>>>> 	at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
>>>>> 	at org.mortbay.jetty.Server.doStart(Server.java:224)
>>>>> 	at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
>>>>> 	at org.mortbay.xml.XmlConfiguration.main(XmlConfiguration.java:985)
>>>>> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>>>>> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>>>> 	at java.lang.reflect.Method.invoke(Method.java:616)
>>>>> 	at org.mortbay.start.Main.invokeMain(Main.java:194)
>>>>> 	at org.mortbay.start.Main.start(Main.java:534)
>>>>> 	at org.mortbay.start.Main.start(Main.java:441)
>>>>> 	at org.mortbay.start.Main.main(Main.java:119)
>>>>> Caused by: org.apache.solr.common.SolrException: Error Instantiating
Request Handler, org.apache.solr.handler.dataimport.DataImportHandler is not a org.apache.solr.request.SolrRequestHandler
>>>>> 	at org.apache.solr.core.SolrCore.createInstance(SolrCore.java:396)
>>>>> 	at org.apache.solr.core.SolrCore.createRequestHandler(SolrCore.java:431)
>>>>> 	at org.apache.solr.core.RequestHandlers.initHandlersFromConfig(RequestHandlers.java:158)
>>>>> 	... 31 more
>>>>>
>>>>> ------------------------------
>>>>> *Powered by Jetty://*
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>>  *Eng.Muhannad al Hariri *
>>>>> *
>>>>> *
>>>>> *Software Developer*
>>>>> *email : muh.acit@gmail.com*
>>>>> *twitter : @muh_acit <http://twitter.com/muh_acit>*
>>>>> *Skype : muh.hari*
>>>>> *phone : *
>>>>> *      Jordan +962 78 677 5125*
>>>>> *
>>>>> *
>>>>> *حاسبونا فدققوا ثمّ منّوا فأعتقوا ..هكذا
شيمة الملوك بالمماليك يرفقوا*
>>>>> *
>>>>> *
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>>  *Eng.Muhannad al Hariri *
>>>> *
>>>> *
>>>> *Software Developer*
>>>> *email : muh.acit@gmail.com*
>>>> *twitter : @muh_acit <http://twitter.com/muh_acit>*
>>>> *Skype : muh.hari*
>>>> *phone : *
>>>> *      Jordan +962 78 677 5125*
>>>> *
>>>> *
>>>> *حاسبونا فدققوا ثمّ منّوا فأعتقوا ..هكذا
شيمة الملوك بالمماليك يرفقوا*
>>>> *
>>>> *
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
>>>> For additional commands, e-mail: dev-help@lucene.apache.org
>>>>
>>>
>>>
>>>
>>> --
>>>  *Eng.Muhannad al Hariri *
>>> *
>>> *
>>> *Software Developer*
>>> *email : muh.acit@gmail.com*
>>> *twitter : @muh_acit <http://twitter.com/muh_acit>*
>>> *Skype : muh.hari*
>>> *phone : *
>>> *      Jordan +962 78 677 5125*
>>> *
>>> *
>>> *حاسبونا فدققوا ثمّ منّوا فأعتقوا ..هكذا شيمة
الملوك بالمماليك يرفقوا*
>>> *
>>> *
>>>
>>>
>>
>
>
> --
> *Eng.Muhannad al Hariri *
> *
> *
> *Software Developer*
> *email : muh.acit@gmail.com*
> *twitter : @muh_acit <http://twitter.com/muh_acit>*
> *Skype : muh.hari*
> *phone : *
> *      Jordan +962 78 677 5125*
> *
> *
> *حاسبونا فدققوا ثمّ منّوا فأعتقوا ..هكذا شيمة الملوك
بالمماليك يرفقوا*
> *
> *
>
>


-- 
*Eng.Muhannad al Hariri *
*
*
*Software Developer*
*email : muh.acit@gmail.com*
*twitter : @muh_acit <http://twitter.com/muh_acit>*
*Skype : muh.hari*
*phone : *
*      Jordan +962 78 677 5125*
*
*
*حاسبونا فدققوا ثمّ منّوا فأعتقوا ..هكذا شيمة الملوك
بالمماليك يرفقوا*
*
*

Mime
View raw message