Hi Alex,

> I thought the "<span style="font-family: Trebuchet MS, sans-serif;">"
> and the ending span were broken email thing but they seem to be in the
> solrconfig.xml file as well. I would start from removing those and
> leaving just the actual definition.


Thanks for your response!

OK so I tried your suggestion of removing those span tags like so:

In /opt/solr/collection1/conf/solrconfig.xml I now have:

  <requestHandler name="/dataimport"
class="org.apache.solr.handler.dataimport.DataImportHandler">

      <lst name="defaults">
        <str name="config">data-config.xml</str>
      </lst>

   </requestHandler>

In /opt/solr/collection1/conf/data-config.xml I now have:

[root@solr1:/opt/solr/collection1/conf] #cat data-config.xml
<dataConfig>

     <dataSource type="JdbcDataSource" driver="com.mysql.jdbc.Driver"
url="jdbc:mysql://web1.mydomain.com:3306/jokefire" user="admin"
password="secret" batchSize="1" />
       <document name="jokefire_users">

        <entity name="jokefire_users" query="SELECT * FROM players_data">
            <field column="ID" name="ID" />
            <field column="user_login" name="user_login" />
            <field column="user_nicename" name="user_nicename" />
           <field column="user_email" name="user_email" />
           <field column="user_url" name="user_url" />
           <field column="user_registered" name="user_registered" />
           <field column="user_activation_key" name="user_activation_key" />
           <field column="user_status" name="user_status" />
           <field column="display_name" name="display_name" />
       </entity>

       </document>
</dataConfig>

I made just those changes, and did a restart of tomcat. And now in the
admin panel I get this error:


   - *collection1:*
org.apache.solr.common.SolrException:org.apache.solr.common.SolrException:
   RequestHandler init failure

And beneath that I see a lot of error output in the form of a stack trace:

*type* Status report

*message* *{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:745) at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:307)
at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:207)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1024)
at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
at
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745) Caused by:
org.apache.solr.common.SolrException: RequestHandler init failure at
org.apache.solr.core.SolrCore.<init>(SolrCore.java:873) at
org.apache.solr.core.SolrCore.<init>(SolrCore.java:646) at
org.apache.solr.core.CoreContainer.create(CoreContainer.java:491) at
org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:255) at
org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:249) at
java.util.concurrent.FutureTask.run(FutureTask.java:262) ... 3 more Caused
by: org.apache.solr.common.SolrException: RequestHandler init failure at
org.apache.solr.core.RequestHandlers.initHandlersFromConfig(RequestHandlers.java:172)
at org.apache.solr.core.SolrCore.<init>(SolrCore.java:792) ... 8 more
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:490)
at
org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:421)
at org.apache.solr.core.SolrCore.createInstance(SolrCore.java:543) at
org.apache.solr.core.SolrCore.createRequestHandler(SolrCore.java:616) at
org.apache.solr.core.RequestHandlers.initHandlersFromConfig(RequestHandlers.java:158)
... 9 more Caused by: java.lang.ClassNotFoundException:
org.apache.solr.handler.dataimport.DataImportHandler at
java.net.URLClassLoader$1.run(URLClassLoader.java:366) at
java.net.URLClassLoader$1.run(URLClassLoader.java:355) at
java.security.AccessController.doPrivileged(Native Method) at
java.net.URLClassLoader.findClass(URLClassLoader.java:354) at
java.lang.ClassLoader.loadClass(ClassLoader.java:425) at
java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:789) at
java.lang.ClassLoader.loadClass(ClassLoader.java:358) at
java.lang.Class.forName0(Native Method) at
java.lang.Class.forName(Class.java:274) at
org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:474)
... 13 more ,code=500}*

*description* *The server encountered an internal error that prevented it
from fulfilling this request.*

The only way for me to recover from this is to restore the solrconfig.xml
from the backup file I created before altering the original.

But of course when I do that, I still don't have the ability to import data
from mysql. :(

Any other ideas?

Thanks,

Tim




On Sun, Nov 2, 2014 at 8:56 PM, Alexandre Rafalovitch <arafa...@gmail.com>
wrote:

> Well,
>
> I thought the "<span style="font-family: Trebuchet MS, sans-serif;">"
> and the ending span were broken email thing but they seem to be in the
> solrconfig.xml file as well. I would start from removing those and
> leaving just the actual definition.
>
> Regards,
>    Alex.
> Personal: http://www.outerthoughts.com/ and @arafalov
> Solr resources and newsletter: http://www.solr-start.com/ and @solrstart
> Solr popularizers community: https://www.linkedin.com/groups?gid=6713853
>
>
> On 2 November 2014 20:50, Tim Dunphy <bluethu...@gmail.com> wrote:
> >
> > Hey guys,
> >
> >  I'm real new at working with Solr. But I need to get up to speed and I
> > appreciate your bearing with me.
> >
> >  I've installed solr 4 and am running it under tomcat 7. The install went
> > perfectly fine and everything seems to work, up to a point. I've even
> > automated the installation with puppet which gets everything up and
> running
> > perfectly as well.
> >
> >  However my problem is that I need to be able to import some data from a
> > mysql database.
> >
> >  I've followed this tutorial to try and do this:
> >
> >
> >
> http://www.beingjavaguys.com/2013/01/how-to-use-solr-data-import-handler-to.html
> >
> >
> > I've added a file called data-config.xml to the following location under
> my
> > solr root:
> >
> > [root@solr1:/opt/solr/collection1/conf] #cat data-config.xml
> >
> >  <span style="font-family: Trebuchet MS, sans-serif;"><dataConfig>
> >
> >      <dataSource type="JdbcDataSource" driver="com.mysql.jdbc.Driver"
> > url="jdbc:mysql://web1.mydomain.com:3306/mydomain" user="admin"
> > password=“secret” batchSize="1" />
> >
> >        <document name="mydomain_users">
> >
> >         <entity name="mydomain_users" query="SELECT * FROM players_data">
> >
> >             <field column="ID" name="ID" />
> >
> >             <field column="user_login" name="user_login" />
> >
> >             <field column="user_nicename" name="user_nicename" />
> >
> >            <field column="user_email" name="user_email" />
> >
> >            <field column="user_url" name="user_url" />
> >
> >            <field column="user_registered" name="user_registered" />
> >
> >            <field column="user_activation_key"
> name="user_activation_key" />
> >
> >            <field column="user_status" name="user_status" />
> >
> >            <field column="display_name" name="display_name" />
> >
> >        </entity>
> >
> >        </document>
> >
> >    </dataConfig>
> >
> > </span>
> >
> > And added the following section to my
> > /opt/solr/collection1/conf/solrconfig.xml
> >
> >   <span style="font-family: Trebuchet MS, sans-serif;"><requestHandler
> > name="/dataimport"
> > class="org.apache.solr.handler.dataimport.DataImportHandler">
> >
> >          <lst name="defaults">
> >
> >            <str name="config">data-config.xml</str>
> >
> >        </lst>
> >
> >     </requestHandler>
> >
> >    </span>
> >
> > Then restart tomcat. I then navigate to collection1 -> data import in the
> > solr admin interface and see the following response:
> >
> > sorry, no dataimport-handler defined!
> >
> > I am ok with parsing XML with my eyes. I've worked in some big
> environments,
> > where I've had to read it until my eyes bled! hah.. but I am not sure if
> I
> > am placing the section in solrconfig.xml that it needs to be. I'm
> probably
> > missing something obvious since I'm so new at using solr. I'm hoping
> someone
> > with more experience can point me in the right direction.
> >
> > I'm enclosing my solrconfig.xml files and data-config.xml in case someone
> > wants to get a sense of the context that I'm working with.
> >
> > Thanks!
> >
> > --
> > GPG me!!
> >
> > gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B
> >
>



-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B

Reply via email to