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 Val <va...@gmail.com> on 2012/08/18 16:20:32 UTC

Solr 4 dataimport problem.

Hi all,

I'm having trouble using dataimport, so maybe you can help me. I've
downloaded beta version of Solr 4.
I already posted a question
here<http://stackoverflow.com/questions/12018422/classnotfoundexception-dataimport-dataimporthandler>,
so I don't want to repeat it. But in short:
I want to import from MySQL, and I configured everything as needed. I'm
getting  a DataImportHandler exception, with no more output about the
nature of the error.

Full error goes like this:

SEVERE: null:org.apache.solr.common.SolrException: RequestHandler init
failure
at
org.apache.solr.core.RequestHandlers.initHandlersFromConfig(RequestHandlers.java:168)
at org.apache.solr.core.SolrCore.<init>(SolrCore.java:624)
at org.apache.solr.core.SolrCore.<init>(SolrCore.java:551)
at org.apache.solr.core.CoreContainer.create(CoreContainer.java:854)
at org.apache.solr.core.CoreContainer.load(CoreContainer.java:539)
at org.apache.solr.core.CoreContainer.load(CoreContainer.java:360)
at
org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:309)
at
org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:106)
at org.eclipse.jetty.servlet.FilterHolder.doStart(FilterHolder.java:114)
at
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
at
org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:754)
at
org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:258)
at
org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1221)
at
org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:699)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:454)
at
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
at
org.eclipse.jetty.deploy.bindings.StandardStarter.processBinding(StandardStarter.java:36)
at org.eclipse.jetty.deploy.AppLifeCycle.runBindings(AppLifeCycle.java:183)
at
org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(DeploymentManager.java:491)
at
org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:138)
at
org.eclipse.jetty.deploy.providers.ScanningAppProvider.fileAdded(ScanningAppProvider.java:142)
at
org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileAdded(ScanningAppProvider.java:53)
at org.eclipse.jetty.util.Scanner.reportAddition(Scanner.java:604)
at org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:535)
at org.eclipse.jetty.util.Scanner.scan(Scanner.java:398)
at org.eclipse.jetty.util.Scanner.doStart(Scanner.java:332)
at
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
at
org.eclipse.jetty.deploy.providers.ScanningAppProvider.doStart(ScanningAppProvider.java:118)
at
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
at
org.eclipse.jetty.deploy.DeploymentManager.startAppProvider(DeploymentManager.java:552)
at
org.eclipse.jetty.deploy.DeploymentManager.doStart(DeploymentManager.java:227)
at
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
at
org.eclipse.jetty.util.component.AggregateLifeCycle.doStart(AggregateLifeCycle.java:63)
at
org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:53)
at
org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:91)
at org.eclipse.jetty.server.Server.doStart(Server.java:263)
at
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
at org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1215)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1138)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.jetty.start.Main.invokeMain(Main.java:457)
at org.eclipse.jetty.start.Main.start(Main.java:602)
at org.eclipse.jetty.start.Main.main(Main.java:82)
Caused by: org.apache.solr.common.SolrException: Error loading class
'org.apache.solr.handler.dataimport.DataImportHandler'
at
org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:438)
at org.apache.solr.core.SolrCore.createInstance(SolrCore.java:467)
at org.apache.solr.core.SolrCore.createRequestHandler(SolrCore.java:524)
at
org.apache.solr.core.RequestHandlers.initHandlersFromConfig(RequestHandlers.java:154)
... 46 more
Caused by: java.lang.ClassNotFoundException:
org.apache.solr.handler.dataimport.DataImportHandler
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:627)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at
org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:422)
... 49 more



Thanks,

-- 

Regards,

Val

*
*
*     *
*
*
*
webdesignpatterns.org
*
*
                 | twitter <http://twitter.com/wdesignpatterns>
*

Re: Solr 4 dataimport problem.

Posted by Erick Erickson <er...@gmail.com>.
SolrJ is completely irrelevant for using DIH,
the only time you need it would be
if you're going to write a Java program to push
data into your index. Which can be done using
a JDBC driver to connect to your SQL server
and then pushing docs to Solr, see:

http://searchhub.org/dev/2012/02/14/indexing-with-solrj/

Best
Erick



On Sat, Aug 18, 2012 at 10:22 AM, Val <va...@gmail.com> wrote:
> Hi Gora,
>
> First of all thank you, and I will try to look closely at example-DIH (so I
> guess the rest of my email can be ignored), thanks!
>
> I'm using DataImportHandler as it's described here:
> http://wiki.apache.org/solr/DataImportHandler. And I have the binary
> distribution, not the compiled one.
>
> I meant that I'm using the example/ folder which is included with the
> binary Solr archive to create a DataImportHandler which imports from MySQL
> database.
>
> I'm running  "java -jar start.jar" from
> /home/my/projects/apache-solr-4.0.0-BETA/example.
>
> And, the example-DIH is really working for me. I just wanted to use the
> above folder in order to experience and try to configure the dataimport by
> myself.
>
> On the thread I mentioned, someone wrote:
> [[You need to find "apache-solr-solrj-4.0.jar" from your distribution and
> put it in the classpath somewhere. Perhaps the easiest thing is to include
> it in your core's "lib" directory.]]
> So I tried that too, and therefore I mentioned SolrJ.
>
> Thanks.
>
>
> On Sat, Aug 18, 2012 at 6:23 PM, Gora Mohanty <go...@mimirtech.com> wrote:
>
>> On 18 August 2012 19:50, Val <va...@gmail.com> wrote:
>> > Hi all,
>> >
>> > I'm having trouble using dataimport, so maybe you can help me. I've
>> > downloaded beta version of Solr 4.
>> > I already posted a question
>> > here<
>> http://stackoverflow.com/questions/12018422/classnotfoundexception-dataimport-dataimporthandler
>> >,
>> > so I don't want to repeat it. But in short:
>> > I want to import from MySQL, and I configured everything as needed. I'm
>> > getting  a DataImportHandler exception, with no more output about the
>> > nature of the error.
>> [...]
>>
>> Are you indexing data using the DataImportHandler or SolrJ?
>> The error, and your post seem to refer to DIH but the
>> StackOverflow thread mentions SolrJ libraries.
>>
>> Are you building Solr 4.0.0-BETA from source, or are you using
>> the binary distribution? Could you clarify what you mean by
>> "example folder for my MySQL DB" in your StackOverflow question,
>> i.e., please provide the filesystem path from where you are doing
>> a "java -jar start.jar". If you are in
>> apache-solr-4.0.0-BETA/example/example-DIH please read the
>> README.txt there on how to start Solr for the
>> DataImportHandler example configuration: You need to specify
>> solr.solr.home. Everything should be ready to run from the binary
>> distribution without needing to change any configuration files.
>>
>> Regards,
>> Gora
>>
>
>
>
> --
>
> Regards,
>
> Val
>
> *
> *
> *     *
> *
> *
> *
> webdesignpatterns.org
> *
> *
>                  | twitter <http://twitter.com/wdesignpatterns>
> *

Re: Solr 4 dataimport problem.

Posted by Val <va...@gmail.com>.
Hi Gora,

First of all thank you, and I will try to look closely at example-DIH (so I
guess the rest of my email can be ignored), thanks!

I'm using DataImportHandler as it's described here:
http://wiki.apache.org/solr/DataImportHandler. And I have the binary
distribution, not the compiled one.

I meant that I'm using the example/ folder which is included with the
binary Solr archive to create a DataImportHandler which imports from MySQL
database.

I'm running  "java -jar start.jar" from
/home/my/projects/apache-solr-4.0.0-BETA/example.

And, the example-DIH is really working for me. I just wanted to use the
above folder in order to experience and try to configure the dataimport by
myself.

On the thread I mentioned, someone wrote:
[[You need to find "apache-solr-solrj-4.0.jar" from your distribution and
put it in the classpath somewhere. Perhaps the easiest thing is to include
it in your core's "lib" directory.]]
So I tried that too, and therefore I mentioned SolrJ.

Thanks.


On Sat, Aug 18, 2012 at 6:23 PM, Gora Mohanty <go...@mimirtech.com> wrote:

> On 18 August 2012 19:50, Val <va...@gmail.com> wrote:
> > Hi all,
> >
> > I'm having trouble using dataimport, so maybe you can help me. I've
> > downloaded beta version of Solr 4.
> > I already posted a question
> > here<
> http://stackoverflow.com/questions/12018422/classnotfoundexception-dataimport-dataimporthandler
> >,
> > so I don't want to repeat it. But in short:
> > I want to import from MySQL, and I configured everything as needed. I'm
> > getting  a DataImportHandler exception, with no more output about the
> > nature of the error.
> [...]
>
> Are you indexing data using the DataImportHandler or SolrJ?
> The error, and your post seem to refer to DIH but the
> StackOverflow thread mentions SolrJ libraries.
>
> Are you building Solr 4.0.0-BETA from source, or are you using
> the binary distribution? Could you clarify what you mean by
> "example folder for my MySQL DB" in your StackOverflow question,
> i.e., please provide the filesystem path from where you are doing
> a "java -jar start.jar". If you are in
> apache-solr-4.0.0-BETA/example/example-DIH please read the
> README.txt there on how to start Solr for the
> DataImportHandler example configuration: You need to specify
> solr.solr.home. Everything should be ready to run from the binary
> distribution without needing to change any configuration files.
>
> Regards,
> Gora
>



-- 

Regards,

Val

*
*
*     *
*
*
*
webdesignpatterns.org
*
*
                 | twitter <http://twitter.com/wdesignpatterns>
*

Re: Solr 4 dataimport problem.

Posted by Gora Mohanty <go...@mimirtech.com>.
On 18 August 2012 19:50, Val <va...@gmail.com> wrote:
> Hi all,
>
> I'm having trouble using dataimport, so maybe you can help me. I've
> downloaded beta version of Solr 4.
> I already posted a question
> here<http://stackoverflow.com/questions/12018422/classnotfoundexception-dataimport-dataimporthandler>,
> so I don't want to repeat it. But in short:
> I want to import from MySQL, and I configured everything as needed. I'm
> getting  a DataImportHandler exception, with no more output about the
> nature of the error.
[...]

Are you indexing data using the DataImportHandler or SolrJ?
The error, and your post seem to refer to DIH but the
StackOverflow thread mentions SolrJ libraries.

Are you building Solr 4.0.0-BETA from source, or are you using
the binary distribution? Could you clarify what you mean by
"example folder for my MySQL DB" in your StackOverflow question,
i.e., please provide the filesystem path from where you are doing
a "java -jar start.jar". If you are in
apache-solr-4.0.0-BETA/example/example-DIH please read the
README.txt there on how to start Solr for the
DataImportHandler example configuration: You need to specify
solr.solr.home. Everything should be ready to run from the binary
distribution without needing to change any configuration files.

Regards,
Gora