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 msaunier <ms...@citya.com> on 2018/04/23 12:12:07 UTC

SolrCloud DIH (Data Import Handler) MySQL 404

Hello,

 

I have a problem with DIH in SolrCloud. I don't understand why, so I need
your help.

 

Solr 6.6 in Cloud.

 

##############################

COMMAND:

curl http://srv-formation-solr:8983/solr/test_dih?command=full-import

 

RESULT:

<html>

  <head>

    <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>

    <title>Error 404 Not Found</title>

  </head>

  <body><h2>HTTP ERROR 404</h2>

    <p>Problem accessing /solr/test_dih. Reason:

  <pre>    Not Found</pre></p>

  </body>

</html>

 

 

##############################

CONFIG:

1.      I have create with the command the .system collection

2.      I have post in the blob the DataImportHandler jar file and the MySQL
connector jar

3.      I have add data-import-handler and mysql-connector-java runtimeLib
on the configoverlay.json file with the API

4.      I have create the DIH folder on the cloud with zkcli.sh script

5.      I have push with zkcli the DIH .xml configuration file

 

CONFIGOVERLAY CONTENT :

{

  "runtimeLib":{

    "mysql-connector-java":{

      "name":"mysql-connector-java",

      "version":1},

    "data-import-handler":{

      "name":"data-import-handler",

      "version":1}},

  "requestHandler":{"/test_dih":{

      "name":"/test_dih",

      "class":"org.apache.solr.handler.dataimport.DataImportHandler",

      "runtimeLib":true,

      "version":1,

 
"defaults":{"config":"/configs/arguments_test/DIH/indexation_events.xml"}}}

}

 

 

Thanks for your help


RE: SolrCloud DIH (Data Import Handler) MySQL 404

Posted by msaunier <ms...@citya.com>.
I have modify DIH definition to simplify but sames errors:

########## indexation_events.xml
<dataConfig>

	<dataSource name="Gesloc"  type="JdbcDataSource" driver="com.mysql.jdbc.Driver" url="jdbc:mysql://srv-gesloc-sql/TRANSACTIONCITYANEWLOCATION" user="user" password="mypassword" />

	<document>
		<entity name="events_Gesloc" dataSource="Gesloc" query="SELECT id from view_indexation_events" >
			<field column="id" name="id"/>
		</entity>
	</document>

</dataConfig>
##########

Maxence,





-----Message d'origine-----
De : msaunier [mailto:msaunier@citya.com] 
Envoyé : mardi 24 avril 2018 10:04
À : solr-user@lucene.apache.org
Objet : RE: SolrCloud DIH (Data Import Handler) MySQL 404

If I access to the interface, I have a null pointer exception:

null:java.lang.NullPointerException
	at org.apache.solr.handler.RequestHandlerBase.getVersion(RequestHandlerBase.java:233)
	at org.apache.solr.handler.admin.SolrInfoMBeanHandler.addMBean(SolrInfoMBeanHandler.java:187)
	at org.apache.solr.handler.admin.SolrInfoMBeanHandler.getMBeanInfo(SolrInfoMBeanHandler.java:163)
	at org.apache.solr.handler.admin.SolrInfoMBeanHandler.handleRequestBody(SolrInfoMBeanHandler.java:80)
	at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:173)
	at org.apache.solr.core.SolrCore.execute(SolrCore.java:2477)
	at org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:723)
	at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:529)
	at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:361)
	at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:305)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1691)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:582)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:512)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213)
	at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:119)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
	at org.eclipse.jetty.rewrite.handler.RewriteHandler.handle(RewriteHandler.java:335)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
	at org.eclipse.jetty.server.Server.handle(Server.java:534)
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:320)
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273)
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
	at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)
	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)
	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)
	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
	at java.lang.Thread.run(Thread.java:748)





-----Message d'origine-----
De : msaunier [mailto:msaunier@citya.com] Envoyé : mardi 24 avril 2018 09:25 À : solr-user@lucene.apache.org Objet : RE: SolrCloud DIH (Data Import Handler) MySQL 404

Hello Shawn,
Thanks for your answers. 

#############################################################################
So, indexation_events.xml file is:

<dataConfig>

	<dataSource name="Gesloc"  type="JdbcDataSource" driver="com.mysql.jdbc.Driver" url="jdbc:mysql://srv-gesloc-sql/TRANSACTIONCITYANEWLOCATION" user="user" password="mypassword" />

	<document>
		<entity name="events_Gesloc" dataSource="Gesloc" transformer="TemplateTransformer" query="SELECT id,origine,base_name,document_date,document_type,writer,recipient,solver,solution_date,personality,building,management_mandate,lease,coowner,property,title,data from view_indexation_events" >

			<field column="id" name="id"/>

			<field column="origine" name="origine"/>

			<field column="base_name" name="base_name"/>

			<field column="document_date" name="document_date"/>

			<field column="document_type" name="document_type"/>

			<field column="writer" name="writer"/>

			<field column="recipient" name="recipient"/>

			<field column="solver" name="solver"/>

			<field column="solution_date" name="solution_date"/>

			<field column="personality" name="personality"/>

			<field column="building" name="building"/>

			<field column="management_mandate" names="management_mandate"/>

			<field column="lease" names="lease"/>

			<field column="coowner" names="coowner"/>

			<field column="property" name="properties"/>

			<field column="title" name="subject"/>

			<field column="data" name="data"/>
		</entity>
	</document>

</dataConfig>

#############################################################################
And the config file is the configoverlay.xml, it's in cloud:

{
  "updateProcessor":{},

  "runtimeLib":{
    "mysql-connector-java":{
      "name":"mysql-connector-java",
      "version":1},

    "data-import-handler":{
      "name":"data-import-handler",
      "version":1}},

  "requestHandler":{"/test_dih":{
      "name":"/test_dih",
      "class":"org.apache.solr.handler.dataimport.DataImportHandler",
      "runtimeLib":true,
      "version":1,
      "defaults":{"config":"DIH/indexation_events.xml"}}}
}

I go to regard the solr.log

Thanks,
Maxence





-----Message d'origine-----
De : Shawn Heisey [mailto:apache@elyograg.org] Envoyé : lundi 23 avril 2018 18:28 À : solr-user@lucene.apache.org Objet : Re: SolrCloud DIH (Data Import Handler) MySQL 404

On 4/23/2018 8:30 AM, msaunier wrote:
> I have add debug:
>
> curl
> "http://srv-formation-solr:8983/solr/arguments_test/test_dih?command=f
> ull-im
> port&commit=true&debug=true"
> <?xml version="1.0" encoding="UTF-8"?> <response> <lst 
> name="responseHeader"><int name="status">500</int><int 
> name="QTime">588</int></lst><lst name="initArgs"><bool 
> name="runtimeLib">true</bool><long name="version">1</long><lst 
> name="defaults"><str 
> name="config">DIH/indexation_events.xml</str></lst></lst><str

This is looking like a really nasty error that I cannot understand, possibly caused by an error in configuration.

Can you share your dataimport handler config (will likely be in
solrconfig.xml) and the contents of DIH/indexation_events.xml?  There is probably a database password in that file, you'll want to redact that.

You should look at solr.log and see if there are other errors happening that didn't make it into the response.

Thanks,
Shawn





RE: SolrCloud DIH (Data Import Handler) MySQL 404

Posted by msaunier <ms...@citya.com>.
I have add debug and I have this error:

null:java.lang.NullPointerException
	at org.apache.solr.handler.dataimport.DataImporter.doFullImport(DataImporter.java:429)
	at org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.java:483)
	at org.apache.solr.handler.dataimport.DataImportHandler.handleRequestBody(DataImportHandler.java:183)
	at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:195)
	at org.apache.solr.core.SolrCore.execute(SolrCore.java:2503)
	at org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:711)
	at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:517)
	at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:384)
	at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:330)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1629)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:219)
	at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:126)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
	at org.eclipse.jetty.rewrite.handler.RewriteHandler.handle(RewriteHandler.java:335)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
	at org.eclipse.jetty.server.Server.handle(Server.java:530)
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:347)
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:256)
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279)
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:102)
	at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:247)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:140)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131)
	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:382)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:708)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:626)
	at java.lang.Thread.run(Thread.java:748)

what mysql jdbc connector version I need ?





-----Message d'origine-----
De : msaunier [mailto:msaunier@citya.com] 
Envoyé : jeudi 26 avril 2018 13:13
À : solr-user@lucene.apache.org
Objet : RE: SolrCloud DIH (Data Import Handler) MySQL 404

Hello,

Where I add that? In the Solr start command?

I have add -verbose:class in the /etc/default/solr.in.sh file but they logs are they sames.

Thanks,

-----Message d'origine-----
De : Mikhail Khludnev [mailto:mkhl@apache.org] Envoyé : mercredi 25 avril 2018 15:40 À : solr-user <so...@lucene.apache.org> Objet : Re: SolrCloud DIH (Data Import Handler) MySQL 404

Can you share more log lines around this odd NPE?
It might be necessary to restart jvm with -verbose:class and look through its' output to find why it can't load this class.

On Wed, Apr 25, 2018 at 11:42 AM, msaunier <ms...@citya.com> wrote:

> Hello Shawn,
>
> I have install SolrCloud 7.3 on an other server and the problem not apear.
> I create a Jira Ticket ?
>
> But I have an other problem:
>
> Full Import failed:org.apache.solr.handler.dataimport.DataImportHandlerException:
> Unable to PropertyWriter implementation:ZKPropertiesWriter
>         at org.apache.solr.handler.dataimport.DataImporter.
> createPropertyWriter(DataImporter.java:330)
>         at org.apache.solr.handler.dataimport.DataImporter.
> doFullImport(DataImporter.java:411)
>         at org.apache.solr.handler.dataimport.DataImporter.
> runCmd(DataImporter.java:474)
>         at org.apache.solr.handler.dataimport.DataImporter.
> lambda$runAsync$0(DataImporter.java:457)
>         at java.lang.Thread.run(Thread.java:748)
> Caused by: java.lang.NullPointerException
>         at org.apache.solr.handler.dataimport.DocBuilder.
> loadClass(DocBuilder.java:935)
>         at org.apache.solr.handler.dataimport.DataImporter.
> createPropertyWriter(DataImporter.java:326)
>         ... 4 more
>
> I regard to solved the problem.
>
> Cordialement,
>
>
>
>
>
> -----Message d'origine-----
> De : Shawn Heisey [mailto:elyograg@elyograg.org] Envoyé : mardi 24 
> avril 2018 17:39 À : solr-user@lucene.apache.org Objet : Re: SolrCloud 
> DIH (Data Import Handler) MySQL 404
>
> On 4/24/2018 2:03 AM, msaunier wrote:
> > If I access to the interface, I have a null pointer exception:
> >
> > null:java.lang.NullPointerException
> >       at
> > org.apache.solr.handler.RequestHandlerBase.getVersion(RequestHandler
> > Ba
> > se.java:233)
>
> The line of code where this exception occurred uses fundamental Java 
> methods. Based on the error, either the getClass method common to all 
> java objects, or the getPackage method on the class, is returning 
> null. That shouldn't be possible.  This has me wondering whether there 
> is something broken in your particular Solr installation -- corrupt 
> jars, or something like that.  Or maybe something broken in your Java.
>
> Thanks,
> Shawn
>
>
>


--
Sincerely yours
Mikhail Khludnev



RE: SolrCloud DIH (Data Import Handler) MySQL 404

Posted by msaunier <ms...@citya.com>.
Hello,

Where I add that? In the Solr start command?

I have add -verbose:class in the /etc/default/solr.in.sh file but they logs are they sames.

Thanks,

-----Message d'origine-----
De : Mikhail Khludnev [mailto:mkhl@apache.org] 
Envoyé : mercredi 25 avril 2018 15:40
À : solr-user <so...@lucene.apache.org>
Objet : Re: SolrCloud DIH (Data Import Handler) MySQL 404

Can you share more log lines around this odd NPE?
It might be necessary to restart jvm with -verbose:class and look through its' output to find why it can't load this class.

On Wed, Apr 25, 2018 at 11:42 AM, msaunier <ms...@citya.com> wrote:

> Hello Shawn,
>
> I have install SolrCloud 7.3 on an other server and the problem not apear.
> I create a Jira Ticket ?
>
> But I have an other problem:
>
> Full Import failed:org.apache.solr.handler.dataimport.DataImportHandlerException:
> Unable to PropertyWriter implementation:ZKPropertiesWriter
>         at org.apache.solr.handler.dataimport.DataImporter.
> createPropertyWriter(DataImporter.java:330)
>         at org.apache.solr.handler.dataimport.DataImporter.
> doFullImport(DataImporter.java:411)
>         at org.apache.solr.handler.dataimport.DataImporter.
> runCmd(DataImporter.java:474)
>         at org.apache.solr.handler.dataimport.DataImporter.
> lambda$runAsync$0(DataImporter.java:457)
>         at java.lang.Thread.run(Thread.java:748)
> Caused by: java.lang.NullPointerException
>         at org.apache.solr.handler.dataimport.DocBuilder.
> loadClass(DocBuilder.java:935)
>         at org.apache.solr.handler.dataimport.DataImporter.
> createPropertyWriter(DataImporter.java:326)
>         ... 4 more
>
> I regard to solved the problem.
>
> Cordialement,
>
>
>
>
>
> -----Message d'origine-----
> De : Shawn Heisey [mailto:elyograg@elyograg.org] Envoyé : mardi 24 
> avril 2018 17:39 À : solr-user@lucene.apache.org Objet : Re: SolrCloud 
> DIH (Data Import Handler) MySQL 404
>
> On 4/24/2018 2:03 AM, msaunier wrote:
> > If I access to the interface, I have a null pointer exception:
> >
> > null:java.lang.NullPointerException
> >       at
> > org.apache.solr.handler.RequestHandlerBase.getVersion(RequestHandler
> > Ba
> > se.java:233)
>
> The line of code where this exception occurred uses fundamental Java 
> methods. Based on the error, either the getClass method common to all 
> java objects, or the getPackage method on the class, is returning 
> null. That shouldn't be possible.  This has me wondering whether there 
> is something broken in your particular Solr installation -- corrupt 
> jars, or something like that.  Or maybe something broken in your Java.
>
> Thanks,
> Shawn
>
>
>


--
Sincerely yours
Mikhail Khludnev


Re: SolrCloud DIH (Data Import Handler) MySQL 404

Posted by Mikhail Khludnev <mk...@apache.org>.
Can you share more log lines around this odd NPE?
It might be necessary to restart jvm with -verbose:class and look through
its' output to find why it can't load this class.

On Wed, Apr 25, 2018 at 11:42 AM, msaunier <ms...@citya.com> wrote:

> Hello Shawn,
>
> I have install SolrCloud 7.3 on an other server and the problem not apear.
> I create a Jira Ticket ?
>
> But I have an other problem:
>
> Full Import failed:org.apache.solr.handler.dataimport.DataImportHandlerException:
> Unable to PropertyWriter implementation:ZKPropertiesWriter
>         at org.apache.solr.handler.dataimport.DataImporter.
> createPropertyWriter(DataImporter.java:330)
>         at org.apache.solr.handler.dataimport.DataImporter.
> doFullImport(DataImporter.java:411)
>         at org.apache.solr.handler.dataimport.DataImporter.
> runCmd(DataImporter.java:474)
>         at org.apache.solr.handler.dataimport.DataImporter.
> lambda$runAsync$0(DataImporter.java:457)
>         at java.lang.Thread.run(Thread.java:748)
> Caused by: java.lang.NullPointerException
>         at org.apache.solr.handler.dataimport.DocBuilder.
> loadClass(DocBuilder.java:935)
>         at org.apache.solr.handler.dataimport.DataImporter.
> createPropertyWriter(DataImporter.java:326)
>         ... 4 more
>
> I regard to solved the problem.
>
> Cordialement,
>
>
>
>
>
> -----Message d'origine-----
> De : Shawn Heisey [mailto:elyograg@elyograg.org]
> Envoyé : mardi 24 avril 2018 17:39
> À : solr-user@lucene.apache.org
> Objet : Re: SolrCloud DIH (Data Import Handler) MySQL 404
>
> On 4/24/2018 2:03 AM, msaunier wrote:
> > If I access to the interface, I have a null pointer exception:
> >
> > null:java.lang.NullPointerException
> >       at
> > org.apache.solr.handler.RequestHandlerBase.getVersion(RequestHandlerBa
> > se.java:233)
>
> The line of code where this exception occurred uses fundamental Java
> methods. Based on the error, either the getClass method common to all java
> objects, or the getPackage method on the class, is returning null. That
> shouldn't be possible.  This has me wondering whether there is something
> broken in your particular Solr installation -- corrupt jars, or something
> like that.  Or maybe something broken in your Java.
>
> Thanks,
> Shawn
>
>
>


-- 
Sincerely yours
Mikhail Khludnev

RE: SolrCloud DIH (Data Import Handler) MySQL 404

Posted by msaunier <ms...@citya.com>.
Hello Shawn,

I have install SolrCloud 7.3 on an other server and the problem not apear. I create a Jira Ticket ?

But I have an other problem:

Full Import failed:org.apache.solr.handler.dataimport.DataImportHandlerException: Unable to PropertyWriter implementation:ZKPropertiesWriter
	at org.apache.solr.handler.dataimport.DataImporter.createPropertyWriter(DataImporter.java:330)
	at org.apache.solr.handler.dataimport.DataImporter.doFullImport(DataImporter.java:411)
	at org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.java:474)
	at org.apache.solr.handler.dataimport.DataImporter.lambda$runAsync$0(DataImporter.java:457)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NullPointerException
	at org.apache.solr.handler.dataimport.DocBuilder.loadClass(DocBuilder.java:935)
	at org.apache.solr.handler.dataimport.DataImporter.createPropertyWriter(DataImporter.java:326)
	... 4 more

I regard to solved the problem.

Cordialement,





-----Message d'origine-----
De : Shawn Heisey [mailto:elyograg@elyograg.org] 
Envoyé : mardi 24 avril 2018 17:39
À : solr-user@lucene.apache.org
Objet : Re: SolrCloud DIH (Data Import Handler) MySQL 404

On 4/24/2018 2:03 AM, msaunier wrote:
> If I access to the interface, I have a null pointer exception:
>
> null:java.lang.NullPointerException
> 	at 
> org.apache.solr.handler.RequestHandlerBase.getVersion(RequestHandlerBa
> se.java:233)

The line of code where this exception occurred uses fundamental Java methods. Based on the error, either the getClass method common to all java objects, or the getPackage method on the class, is returning null. That shouldn't be possible.  This has me wondering whether there is something broken in your particular Solr installation -- corrupt jars, or something like that.  Or maybe something broken in your Java.

Thanks,
Shawn



Re: SolrCloud DIH (Data Import Handler) MySQL 404

Posted by Shawn Heisey <el...@elyograg.org>.
On 4/24/2018 2:03 AM, msaunier wrote:
> If I access to the interface, I have a null pointer exception:
>
> null:java.lang.NullPointerException
> 	at org.apache.solr.handler.RequestHandlerBase.getVersion(RequestHandlerBase.java:233)

The line of code where this exception occurred uses fundamental Java 
methods. Based on the error, either the getClass method common to all 
java objects, or the getPackage method on the class, is returning null.  
That shouldn't be possible.  This has me wondering whether there is 
something broken in your particular Solr installation -- corrupt jars, 
or something like that.  Or maybe something broken in your Java.

Thanks,
Shawn


RE: SolrCloud DIH (Data Import Handler) MySQL 404

Posted by msaunier <ms...@citya.com>.
If I access to the interface, I have a null pointer exception:

null:java.lang.NullPointerException
	at org.apache.solr.handler.RequestHandlerBase.getVersion(RequestHandlerBase.java:233)
	at org.apache.solr.handler.admin.SolrInfoMBeanHandler.addMBean(SolrInfoMBeanHandler.java:187)
	at org.apache.solr.handler.admin.SolrInfoMBeanHandler.getMBeanInfo(SolrInfoMBeanHandler.java:163)
	at org.apache.solr.handler.admin.SolrInfoMBeanHandler.handleRequestBody(SolrInfoMBeanHandler.java:80)
	at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:173)
	at org.apache.solr.core.SolrCore.execute(SolrCore.java:2477)
	at org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:723)
	at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:529)
	at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:361)
	at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:305)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1691)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:582)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:512)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213)
	at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:119)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
	at org.eclipse.jetty.rewrite.handler.RewriteHandler.handle(RewriteHandler.java:335)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
	at org.eclipse.jetty.server.Server.handle(Server.java:534)
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:320)
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273)
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
	at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)
	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)
	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)
	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
	at java.lang.Thread.run(Thread.java:748)





-----Message d'origine-----
De : msaunier [mailto:msaunier@citya.com] 
Envoyé : mardi 24 avril 2018 09:25
À : solr-user@lucene.apache.org
Objet : RE: SolrCloud DIH (Data Import Handler) MySQL 404

Hello Shawn,
Thanks for your answers. 

#############################################################################
So, indexation_events.xml file is:

<dataConfig>

	<dataSource name="Gesloc"  type="JdbcDataSource" driver="com.mysql.jdbc.Driver" url="jdbc:mysql://srv-gesloc-sql/TRANSACTIONCITYANEWLOCATION" user="user" password="mypassword" />

	<document>
		<entity name="events_Gesloc" dataSource="Gesloc" transformer="TemplateTransformer" query="SELECT id,origine,base_name,document_date,document_type,writer,recipient,solver,solution_date,personality,building,management_mandate,lease,coowner,property,title,data from view_indexation_events" >

			<field column="id" name="id"/>

			<field column="origine" name="origine"/>

			<field column="base_name" name="base_name"/>

			<field column="document_date" name="document_date"/>

			<field column="document_type" name="document_type"/>

			<field column="writer" name="writer"/>

			<field column="recipient" name="recipient"/>

			<field column="solver" name="solver"/>

			<field column="solution_date" name="solution_date"/>

			<field column="personality" name="personality"/>

			<field column="building" name="building"/>

			<field column="management_mandate" names="management_mandate"/>

			<field column="lease" names="lease"/>

			<field column="coowner" names="coowner"/>

			<field column="property" name="properties"/>

			<field column="title" name="subject"/>

			<field column="data" name="data"/>
		</entity>
	</document>

</dataConfig>

#############################################################################
And the config file is the configoverlay.xml, it's in cloud:

{
  "updateProcessor":{},

  "runtimeLib":{
    "mysql-connector-java":{
      "name":"mysql-connector-java",
      "version":1},

    "data-import-handler":{
      "name":"data-import-handler",
      "version":1}},

  "requestHandler":{"/test_dih":{
      "name":"/test_dih",
      "class":"org.apache.solr.handler.dataimport.DataImportHandler",
      "runtimeLib":true,
      "version":1,
      "defaults":{"config":"DIH/indexation_events.xml"}}}
}

I go to regard the solr.log

Thanks,
Maxence





-----Message d'origine-----
De : Shawn Heisey [mailto:apache@elyograg.org] Envoyé : lundi 23 avril 2018 18:28 À : solr-user@lucene.apache.org Objet : Re: SolrCloud DIH (Data Import Handler) MySQL 404

On 4/23/2018 8:30 AM, msaunier wrote:
> I have add debug:
>
> curl
> "http://srv-formation-solr:8983/solr/arguments_test/test_dih?command=f
> ull-im
> port&commit=true&debug=true"
> <?xml version="1.0" encoding="UTF-8"?> <response> <lst 
> name="responseHeader"><int name="status">500</int><int 
> name="QTime">588</int></lst><lst name="initArgs"><bool 
> name="runtimeLib">true</bool><long name="version">1</long><lst 
> name="defaults"><str 
> name="config">DIH/indexation_events.xml</str></lst></lst><str

This is looking like a really nasty error that I cannot understand, possibly caused by an error in configuration.

Can you share your dataimport handler config (will likely be in
solrconfig.xml) and the contents of DIH/indexation_events.xml?  There is probably a database password in that file, you'll want to redact that.

You should look at solr.log and see if there are other errors happening that didn't make it into the response.

Thanks,
Shawn




RE: SolrCloud DIH (Data Import Handler) MySQL 404

Posted by msaunier <ms...@citya.com>.
Hello Shawn,
Thanks for your answers. 

#############################################################################
So, indexation_events.xml file is:

<dataConfig>

	<dataSource name="Gesloc"  type="JdbcDataSource" driver="com.mysql.jdbc.Driver" url="jdbc:mysql://srv-gesloc-sql/TRANSACTIONCITYANEWLOCATION" user="user" password="mypassword" />

	<document>
		<entity name="events_Gesloc" dataSource="Gesloc" transformer="TemplateTransformer" query="SELECT id,origine,base_name,document_date,document_type,writer,recipient,solver,solution_date,personality,building,management_mandate,lease,coowner,property,title,data from view_indexation_events" >

			<field column="id" name="id"/>

			<field column="origine" name="origine"/>

			<field column="base_name" name="base_name"/>

			<field column="document_date" name="document_date"/>

			<field column="document_type" name="document_type"/>

			<field column="writer" name="writer"/>

			<field column="recipient" name="recipient"/>

			<field column="solver" name="solver"/>

			<field column="solution_date" name="solution_date"/>

			<field column="personality" name="personality"/>

			<field column="building" name="building"/>

			<field column="management_mandate" names="management_mandate"/>

			<field column="lease" names="lease"/>

			<field column="coowner" names="coowner"/>

			<field column="property" name="properties"/>

			<field column="title" name="subject"/>

			<field column="data" name="data"/>
		</entity>
	</document>

</dataConfig>

#############################################################################
And the config file is the configoverlay.xml, it's in cloud:

{
  "updateProcessor":{},

  "runtimeLib":{
    "mysql-connector-java":{
      "name":"mysql-connector-java",
      "version":1},

    "data-import-handler":{
      "name":"data-import-handler",
      "version":1}},

  "requestHandler":{"/test_dih":{
      "name":"/test_dih",
      "class":"org.apache.solr.handler.dataimport.DataImportHandler",
      "runtimeLib":true,
      "version":1,
      "defaults":{"config":"DIH/indexation_events.xml"}}}
}

I go to regard the solr.log

Thanks,
Maxence





-----Message d'origine-----
De : Shawn Heisey [mailto:apache@elyograg.org] 
Envoyé : lundi 23 avril 2018 18:28
À : solr-user@lucene.apache.org
Objet : Re: SolrCloud DIH (Data Import Handler) MySQL 404

On 4/23/2018 8:30 AM, msaunier wrote:
> I have add debug:
>
> curl
> "http://srv-formation-solr:8983/solr/arguments_test/test_dih?command=f
> ull-im
> port&commit=true&debug=true"
> <?xml version="1.0" encoding="UTF-8"?> <response> <lst 
> name="responseHeader"><int name="status">500</int><int 
> name="QTime">588</int></lst><lst name="initArgs"><bool 
> name="runtimeLib">true</bool><long name="version">1</long><lst 
> name="defaults"><str 
> name="config">DIH/indexation_events.xml</str></lst></lst><str

This is looking like a really nasty error that I cannot understand, possibly caused by an error in configuration.

Can you share your dataimport handler config (will likely be in
solrconfig.xml) and the contents of DIH/indexation_events.xml?  There is probably a database password in that file, you'll want to redact that.

You should look at solr.log and see if there are other errors happening that didn't make it into the response.

Thanks,
Shawn



Re: SolrCloud DIH (Data Import Handler) MySQL 404

Posted by Shawn Heisey <ap...@elyograg.org>.
On 4/23/2018 8:30 AM, msaunier wrote:
> I have add debug:
>
> curl
> "http://srv-formation-solr:8983/solr/arguments_test/test_dih?command=full-im
> port&commit=true&debug=true"
> <?xml version="1.0" encoding="UTF-8"?>
> <response>
> <lst name="responseHeader"><int name="status">500</int><int
> name="QTime">588</int></lst><lst name="initArgs"><bool
> name="runtimeLib">true</bool><long name="version">1</long><lst
> name="defaults"><str
> name="config">DIH/indexation_events.xml</str></lst></lst><str

This is looking like a really nasty error that I cannot understand, 
possibly caused by an error in configuration.

Can you share your dataimport handler config (will likely be in 
solrconfig.xml) and the contents of DIH/indexation_events.xml?  There is 
probably a database password in that file, you'll want to redact that.

You should look at solr.log and see if there are other errors happening 
that didn't make it into the response.

Thanks,
Shawn


Re: SolrCloud DIH (Data Import Handler) MySQL 404

Posted by Mikhail Khludnev <mk...@apache.org>.
this one was caused by repeating command params

curl
"http://srv-formation-solr:8983/solr/arguments_test/test_dih?command=full-im
port&commit=true&debug=true&command=reload-config"
<?xml version="1.0" encoding="UTF-8"?>
<response>
<lst name="responseHeader"><int name="status">500</int><int
name="QTime">647</int></lst><lst name="error"><str
name="msg">java.util.Arrays$ArrayList cannot be cast to
java.lang.String</str><str name="trace">java.lang.ClassCastException:
java.util.Arrays$ArrayList cannot be cast to java.lang.String
        at
org.apache.solr.handler.dataimport.RequestInfo.&lt;init&gt;(RequestInfo.java
:52)


On Mon, Apr 23, 2018 at 5:30 PM, msaunier <ms...@citya.com> wrote:

> I have add debug:
>
> curl
> "http://srv-formation-solr:8983/solr/arguments_test/test_
> dih?command=full-im
> port&commit=true&debug=true"
> <?xml version="1.0" encoding="UTF-8"?>
> <response>
> <lst name="responseHeader"><int name="status">500</int><int
> name="QTime">588</int></lst><lst name="initArgs"><bool
> name="runtimeLib">true</bool><long name="version">1</long><lst
> name="defaults"><str
> name="config">DIH/indexation_events.xml</str></lst></lst><str
> name="command">full-import</str><lst name="error"><str
> name="trace">java.lang.NullPointerException
>         at
> org.apache.solr.handler.dataimport.DataImporter.
> doFullImport(DataImporter.ja
> va:420)
>         at
> org.apache.solr.handler.dataimport.DataImporter.
> runCmd(DataImporter.java:474
> )
>         at
> org.apache.solr.handler.dataimport.DataImportHandler.
> handleRequestBody(DataI
> mportHandler.java:180)
>         at
> org.apache.solr.handler.RequestHandlerBase.handleRequest(
> RequestHandlerBase.
> java:173)
>         at org.apache.solr.core.SolrCore.execute(SolrCore.java:2477)
>         at
> org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:723)
>         at org.apache.solr.servlet.HttpSolrCall.call(
> HttpSolrCall.java:529)
>         at
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(
> SolrDispatchFilter.java:
> 361)
>         at
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(
> SolrDispatchFilter.java:
> 305)
>         at
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.
> doFilter(ServletHandler
> .java:1691)
>         at
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:582)
>         at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(
> ScopedHandler.java:143
> )
>         at
> org.eclipse.jetty.security.SecurityHandler.handle(
> SecurityHandler.java:548)
>         at
> org.eclipse.jetty.server.session.SessionHandler.
> doHandle(SessionHandler.java
> :226)
>         at
> org.eclipse.jetty.server.handler.ContextHandler.
> doHandle(ContextHandler.java
> :1180)
>         at
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:512)
>         at
> org.eclipse.jetty.server.session.SessionHandler.
> doScope(SessionHandler.java:
> 185)
>         at
> org.eclipse.jetty.server.handler.ContextHandler.
> doScope(ContextHandler.java:
> 1112)
>         at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(
> ScopedHandler.java:141
> )
>         at
> org.eclipse.jetty.server.handler.ContextHandlerCollection.
> handle(ContextHand
> lerCollection.java:213)
>         at
> org.eclipse.jetty.server.handler.HandlerCollection.
> handle(HandlerCollection.
> java:119)
>         at
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(
> HandlerWrapper.java:1
> 34)
>         at
> org.eclipse.jetty.rewrite.handler.RewriteHandler.handle(
> RewriteHandler.java:
> 335)
>         at
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(
> HandlerWrapper.java:1
> 34)
>         at org.eclipse.jetty.server.Server.handle(Server.java:534)
>         at org.eclipse.jetty.server.HttpChannel.handle(
> HttpChannel.java:320)
>         at
> org.eclipse.jetty.server.HttpConnection.onFillable(
> HttpConnection.java:251)
>         at
> org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(
> AbstractConne
> ction.java:273)
>         at org.eclipse.jetty.io.FillInterest.fillable(
> FillInterest.java:95)
>         at
> org.eclipse.jetty.io.SelectChannelEndPoint$2.run(
> SelectChannelEndPoint.java:
> 93)
>         at
> org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.
> executeProduceC
> onsume(ExecuteProduceConsume.java:303)
>         at
> org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.
> produceConsume(
> ExecuteProduceConsume.java:148)
>         at
> org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(
> ExecuteProd
> uceConsume.java:136)
>         at
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(
> QueuedThreadPool.java:
> 671)
>         at
> org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(
> QueuedThreadPool.java:5
> 89)
>         at java.lang.Thread.run(Thread.java:748)
> </str><int name="code">500</int></lst>
> </response>
>
> #######################################
> And reload config:
>
> curl
> "http://srv-formation-solr:8983/solr/arguments_test/test_
> dih?command=full-im
> port&commit=true&debug=true&command=reload-config"
> <?xml version="1.0" encoding="UTF-8"?>
> <response>
> <lst name="responseHeader"><int name="status">500</int><int
> name="QTime">647</int></lst><lst name="error"><str
> name="msg">java.util.Arrays$ArrayList cannot be cast to
> java.lang.String</str><str name="trace">java.lang.ClassCastException:
> java.util.Arrays$ArrayList cannot be cast to java.lang.String
>         at
> org.apache.solr.handler.dataimport.RequestInfo.&lt;
> init&gt;(RequestInfo.java
> :52)
>         at
> org.apache.solr.handler.dataimport.DataImportHandler.
> handleRequestBody(DataI
> mportHandler.java:128)
>         at
> org.apache.solr.handler.RequestHandlerBase.handleRequest(
> RequestHandlerBase.
> java:173)
>         at org.apache.solr.core.SolrCore.execute(SolrCore.java:2477)
>         at
> org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:723)
>         at org.apache.solr.servlet.HttpSolrCall.call(
> HttpSolrCall.java:529)
>         at
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(
> SolrDispatchFilter.java:
> 361)
>         at
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(
> SolrDispatchFilter.java:
> 305)
>         at
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.
> doFilter(ServletHandler
> .java:1691)
>         at
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:582)
>         at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(
> ScopedHandler.java:143
> )
>         at
> org.eclipse.jetty.security.SecurityHandler.handle(
> SecurityHandler.java:548)
>         at
> org.eclipse.jetty.server.session.SessionHandler.
> doHandle(SessionHandler.java
> :226)
>         at
> org.eclipse.jetty.server.handler.ContextHandler.
> doHandle(ContextHandler.java
> :1180)
>         at
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:512)
>         at
> org.eclipse.jetty.server.session.SessionHandler.
> doScope(SessionHandler.java:
> 185)
>         at
> org.eclipse.jetty.server.handler.ContextHandler.
> doScope(ContextHandler.java:
> 1112)
>         at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(
> ScopedHandler.java:141
> )
>         at
> org.eclipse.jetty.server.handler.ContextHandlerCollection.
> handle(ContextHand
> lerCollection.java:213)
>         at
> org.eclipse.jetty.server.handler.HandlerCollection.
> handle(HandlerCollection.
> java:119)
>         at
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(
> HandlerWrapper.java:1
> 34)
>         at
> org.eclipse.jetty.rewrite.handler.RewriteHandler.handle(
> RewriteHandler.java:
> 335)
>         at
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(
> HandlerWrapper.java:1
> 34)
>         at org.eclipse.jetty.server.Server.handle(Server.java:534)
>         at org.eclipse.jetty.server.HttpChannel.handle(
> HttpChannel.java:320)
>         at
> org.eclipse.jetty.server.HttpConnection.onFillable(
> HttpConnection.java:251)
>         at
> org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(
> AbstractConne
> ction.java:273)
>         at org.eclipse.jetty.io.FillInterest.fillable(
> FillInterest.java:95)
>         at
> org.eclipse.jetty.io.SelectChannelEndPoint$2.run(
> SelectChannelEndPoint.java:
> 93)
>         at
> org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.
> executeProduceC
> onsume(ExecuteProduceConsume.java:303)
>         at
> org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.
> produceConsume(
> ExecuteProduceConsume.java:148)
>         at
> org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(
> ExecuteProd
> uceConsume.java:136)
>         at
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(
> QueuedThreadPool.java:
> 671)
>         at
> org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(
> QueuedThreadPool.java:5
> 89)
>         at java.lang.Thread.run(Thread.java:748)
> </str><int name="code">500</int></lst>
> </response>
>
>
> -----Message d'origine-----
> De : msaunier [mailto:msaunier@citya.com]
> Envoyé : lundi 23 avril 2018 14:47
> À : solr-user@lucene.apache.org
> Objet : RE: SolrCloud DIH (Data Import Handler) MySQL 404
>
> I have correct url to : curl
> http://srv-formation-solr:8983/solr/arguments_test/test_
> dih?command=full-imp
> ort
>
> And change overlay config
> "/configs/arguments_test/DIH/indexation_events.xml" to "
> DIH/indexation_events.xml"
>
> But I have a new error:
>
> Full Import
> failed:org.apache.solr.handler.dataimport.DataImportHandlerException:
> Unable
> to PropertyWriter implementation:ZKPropertiesWriter
>         at
> org.apache.solr.handler.dataimport.DataImporter.
> createPropertyWriter(DataImp
> orter.java:330)
>         at
> org.apache.solr.handler.dataimport.DataImporter.
> doFullImport(DataImporter.ja
> va:411)
>         at
> org.apache.solr.handler.dataimport.DataImporter.
> runCmd(DataImporter.java:474
> )
>         at
> org.apache.solr.handler.dataimport.DataImporter.
> lambda$runAsync$0(DataImport
> er.java:457)
>         at java.lang.Thread.run(Thread.java:748)
> Caused by: java.lang.NullPointerException
>         at
> org.apache.solr.handler.dataimport.DocBuilder.
> loadClass(DocBuilder.java:935)
>         at
> org.apache.solr.handler.dataimport.DataImporter.
> createPropertyWriter(DataImp
> orter.java:326)
>         ... 4 more
>
> Cordialement,
>
>
>
>
>
> -----Message d'origine-----
> De : msaunier [mailto:msaunier@citya.com] Envoyé : lundi 23 avril 2018
> 14:12
> À : solr-user@lucene.apache.org Objet : SolrCloud DIH (Data Import
> Handler)
> MySQL 404
>
> Hello,
>
>
>
> I have a problem with DIH in SolrCloud. I don't understand why, so I need
> your help.
>
>
>
> Solr 6.6 in Cloud.
>
>
>
> ##############################
>
> COMMAND:
>
> curl http://srv-formation-solr:8983/solr/test_dih?command=full-import
>
>
>
> RESULT:
>
> <html>
>
>   <head>
>
>     <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
>
>     <title>Error 404 Not Found</title>
>
>   </head>
>
>   <body><h2>HTTP ERROR 404</h2>
>
>     <p>Problem accessing /solr/test_dih. Reason:
>
>   <pre>    Not Found</pre></p>
>
>   </body>
>
> </html>
>
>
>
>
>
> ##############################
>
> CONFIG:
>
> 1.      I have create with the command the .system collection
>
> 2.      I have post in the blob the DataImportHandler jar file and the
> MySQL
> connector jar
>
> 3.      I have add data-import-handler and mysql-connector-java runtimeLib
> on the configoverlay.json file with the API
>
> 4.      I have create the DIH folder on the cloud with zkcli.sh script
>
> 5.      I have push with zkcli the DIH .xml configuration file
>
>
>
> CONFIGOVERLAY CONTENT :
>
> {
>
>   "runtimeLib":{
>
>     "mysql-connector-java":{
>
>       "name":"mysql-connector-java",
>
>       "version":1},
>
>     "data-import-handler":{
>
>       "name":"data-import-handler",
>
>       "version":1}},
>
>   "requestHandler":{"/test_dih":{
>
>       "name":"/test_dih",
>
>       "class":"org.apache.solr.handler.dataimport.DataImportHandler",
>
>       "runtimeLib":true,
>
>       "version":1,
>
>
> "defaults":{"config":"/configs/arguments_test/DIH/
> indexation_events.xml"}}}
>
> }
>
>
>
>
>
> Thanks for your help
>
>
>
>


-- 
Sincerely yours
Mikhail Khludnev

RE: SolrCloud DIH (Data Import Handler) MySQL 404

Posted by msaunier <ms...@citya.com>.
I have add debug:

curl
"http://srv-formation-solr:8983/solr/arguments_test/test_dih?command=full-im
port&commit=true&debug=true"
<?xml version="1.0" encoding="UTF-8"?>
<response>
<lst name="responseHeader"><int name="status">500</int><int
name="QTime">588</int></lst><lst name="initArgs"><bool
name="runtimeLib">true</bool><long name="version">1</long><lst
name="defaults"><str
name="config">DIH/indexation_events.xml</str></lst></lst><str
name="command">full-import</str><lst name="error"><str
name="trace">java.lang.NullPointerException
        at
org.apache.solr.handler.dataimport.DataImporter.doFullImport(DataImporter.ja
va:420)
        at
org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.java:474
)
        at
org.apache.solr.handler.dataimport.DataImportHandler.handleRequestBody(DataI
mportHandler.java:180)
        at
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.
java:173)
        at org.apache.solr.core.SolrCore.execute(SolrCore.java:2477)
        at
org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:723)
        at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:529)
        at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:
361)
        at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:
305)
        at
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler
.java:1691)
        at
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:582)
        at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143
)
        at
org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
        at
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java
:226)
        at
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java
:1180)
        at
org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:512)
        at
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:
185)
        at
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:
1112)
        at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141
)
        at
org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHand
lerCollection.java:213)
        at
org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.
java:119)
        at
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:1
34)
        at
org.eclipse.jetty.rewrite.handler.RewriteHandler.handle(RewriteHandler.java:
335)
        at
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:1
34)
        at org.eclipse.jetty.server.Server.handle(Server.java:534)
        at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:320)
        at
org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)
        at
org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConne
ction.java:273)
        at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
        at
org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:
93)
        at
org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceC
onsume(ExecuteProduceConsume.java:303)
        at
org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(
ExecuteProduceConsume.java:148)
        at
org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProd
uceConsume.java:136)
        at
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:
671)
        at
org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:5
89)
        at java.lang.Thread.run(Thread.java:748)
</str><int name="code">500</int></lst>
</response>

#######################################
And reload config:

curl
"http://srv-formation-solr:8983/solr/arguments_test/test_dih?command=full-im
port&commit=true&debug=true&command=reload-config"
<?xml version="1.0" encoding="UTF-8"?>
<response>
<lst name="responseHeader"><int name="status">500</int><int
name="QTime">647</int></lst><lst name="error"><str
name="msg">java.util.Arrays$ArrayList cannot be cast to
java.lang.String</str><str name="trace">java.lang.ClassCastException:
java.util.Arrays$ArrayList cannot be cast to java.lang.String
        at
org.apache.solr.handler.dataimport.RequestInfo.&lt;init&gt;(RequestInfo.java
:52)
        at
org.apache.solr.handler.dataimport.DataImportHandler.handleRequestBody(DataI
mportHandler.java:128)
        at
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.
java:173)
        at org.apache.solr.core.SolrCore.execute(SolrCore.java:2477)
        at
org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:723)
        at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:529)
        at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:
361)
        at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:
305)
        at
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler
.java:1691)
        at
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:582)
        at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143
)
        at
org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
        at
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java
:226)
        at
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java
:1180)
        at
org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:512)
        at
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:
185)
        at
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:
1112)
        at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141
)
        at
org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHand
lerCollection.java:213)
        at
org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.
java:119)
        at
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:1
34)
        at
org.eclipse.jetty.rewrite.handler.RewriteHandler.handle(RewriteHandler.java:
335)
        at
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:1
34)
        at org.eclipse.jetty.server.Server.handle(Server.java:534)
        at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:320)
        at
org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)
        at
org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConne
ction.java:273)
        at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
        at
org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:
93)
        at
org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceC
onsume(ExecuteProduceConsume.java:303)
        at
org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(
ExecuteProduceConsume.java:148)
        at
org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProd
uceConsume.java:136)
        at
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:
671)
        at
org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:5
89)
        at java.lang.Thread.run(Thread.java:748)
</str><int name="code">500</int></lst>
</response>


-----Message d'origine-----
De : msaunier [mailto:msaunier@citya.com] 
Envoyé : lundi 23 avril 2018 14:47
À : solr-user@lucene.apache.org
Objet : RE: SolrCloud DIH (Data Import Handler) MySQL 404

I have correct url to : curl
http://srv-formation-solr:8983/solr/arguments_test/test_dih?command=full-imp
ort

And change overlay config
"/configs/arguments_test/DIH/indexation_events.xml" to "
DIH/indexation_events.xml"

But I have a new error:

Full Import
failed:org.apache.solr.handler.dataimport.DataImportHandlerException: Unable
to PropertyWriter implementation:ZKPropertiesWriter
	at
org.apache.solr.handler.dataimport.DataImporter.createPropertyWriter(DataImp
orter.java:330)
	at
org.apache.solr.handler.dataimport.DataImporter.doFullImport(DataImporter.ja
va:411)
	at
org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.java:474
)
	at
org.apache.solr.handler.dataimport.DataImporter.lambda$runAsync$0(DataImport
er.java:457)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NullPointerException
	at
org.apache.solr.handler.dataimport.DocBuilder.loadClass(DocBuilder.java:935)
	at
org.apache.solr.handler.dataimport.DataImporter.createPropertyWriter(DataImp
orter.java:326)
	... 4 more

Cordialement,





-----Message d'origine-----
De : msaunier [mailto:msaunier@citya.com] Envoyé : lundi 23 avril 2018 14:12
À : solr-user@lucene.apache.org Objet : SolrCloud DIH (Data Import Handler)
MySQL 404

Hello,

 

I have a problem with DIH in SolrCloud. I don't understand why, so I need
your help.

 

Solr 6.6 in Cloud.

 

##############################

COMMAND:

curl http://srv-formation-solr:8983/solr/test_dih?command=full-import

 

RESULT:

<html>

  <head>

    <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>

    <title>Error 404 Not Found</title>

  </head>

  <body><h2>HTTP ERROR 404</h2>

    <p>Problem accessing /solr/test_dih. Reason:

  <pre>    Not Found</pre></p>

  </body>

</html>

 

 

##############################

CONFIG:

1.      I have create with the command the .system collection

2.      I have post in the blob the DataImportHandler jar file and the MySQL
connector jar

3.      I have add data-import-handler and mysql-connector-java runtimeLib
on the configoverlay.json file with the API

4.      I have create the DIH folder on the cloud with zkcli.sh script

5.      I have push with zkcli the DIH .xml configuration file

 

CONFIGOVERLAY CONTENT :

{

  "runtimeLib":{

    "mysql-connector-java":{

      "name":"mysql-connector-java",

      "version":1},

    "data-import-handler":{

      "name":"data-import-handler",

      "version":1}},

  "requestHandler":{"/test_dih":{

      "name":"/test_dih",

      "class":"org.apache.solr.handler.dataimport.DataImportHandler",

      "runtimeLib":true,

      "version":1,

 
"defaults":{"config":"/configs/arguments_test/DIH/indexation_events.xml"}}}

}

 

 

Thanks for your help




RE: SolrCloud DIH (Data Import Handler) MySQL 404

Posted by msaunier <ms...@citya.com>.
I have correct url to : curl
http://srv-formation-solr:8983/solr/arguments_test/test_dih?command=full-imp
ort

And change overlay config
"/configs/arguments_test/DIH/indexation_events.xml" to "
DIH/indexation_events.xml"

But I have a new error:

Full Import
failed:org.apache.solr.handler.dataimport.DataImportHandlerException: Unable
to PropertyWriter implementation:ZKPropertiesWriter
	at
org.apache.solr.handler.dataimport.DataImporter.createPropertyWriter(DataImp
orter.java:330)
	at
org.apache.solr.handler.dataimport.DataImporter.doFullImport(DataImporter.ja
va:411)
	at
org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.java:474
)
	at
org.apache.solr.handler.dataimport.DataImporter.lambda$runAsync$0(DataImport
er.java:457)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NullPointerException
	at
org.apache.solr.handler.dataimport.DocBuilder.loadClass(DocBuilder.java:935)
	at
org.apache.solr.handler.dataimport.DataImporter.createPropertyWriter(DataImp
orter.java:326)
	... 4 more

Cordialement,





-----Message d'origine-----
De : msaunier [mailto:msaunier@citya.com] 
Envoyé : lundi 23 avril 2018 14:12
À : solr-user@lucene.apache.org
Objet : SolrCloud DIH (Data Import Handler) MySQL 404

Hello,

 

I have a problem with DIH in SolrCloud. I don't understand why, so I need
your help.

 

Solr 6.6 in Cloud.

 

##############################

COMMAND:

curl http://srv-formation-solr:8983/solr/test_dih?command=full-import

 

RESULT:

<html>

  <head>

    <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>

    <title>Error 404 Not Found</title>

  </head>

  <body><h2>HTTP ERROR 404</h2>

    <p>Problem accessing /solr/test_dih. Reason:

  <pre>    Not Found</pre></p>

  </body>

</html>

 

 

##############################

CONFIG:

1.      I have create with the command the .system collection

2.      I have post in the blob the DataImportHandler jar file and the MySQL
connector jar

3.      I have add data-import-handler and mysql-connector-java runtimeLib
on the configoverlay.json file with the API

4.      I have create the DIH folder on the cloud with zkcli.sh script

5.      I have push with zkcli the DIH .xml configuration file

 

CONFIGOVERLAY CONTENT :

{

  "runtimeLib":{

    "mysql-connector-java":{

      "name":"mysql-connector-java",

      "version":1},

    "data-import-handler":{

      "name":"data-import-handler",

      "version":1}},

  "requestHandler":{"/test_dih":{

      "name":"/test_dih",

      "class":"org.apache.solr.handler.dataimport.DataImportHandler",

      "runtimeLib":true,

      "version":1,

 
"defaults":{"config":"/configs/arguments_test/DIH/indexation_events.xml"}}}

}

 

 

Thanks for your help



Re: SolrCloud DIH (Data Import Handler) MySQL 404

Posted by Shawn Heisey <el...@elyograg.org>.
On 4/23/2018 6:12 AM, msaunier wrote:
> I have a problem with DIH in SolrCloud. I don't understand why, so I need
> your help.
>
> Solr 6.6 in Cloud.
>
> ##############################
>
> COMMAND:
>
> curl http://srv-formation-solr:8983/solr/test_dih?command=full-import
>
> RESULT:
>
> <html>
>    <head>
>      <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
>      <title>Error 404 Not Found</title>
>    </head>
>    <body><h2>HTTP ERROR 404</h2>
>      <p>Problem accessing /solr/test_dih. Reason:
>    <pre>    Not Found</pre></p>
>    </body>
> </html>

This looks like an incomplete URL.

What exactly is test-dih?  If it is the name of your collection, then 
you are missing the handler, which is usually "/dataimport". If 
"/test-dih" is the name if your handler, then you are missing the name 
of the core or the collection.

With SolrCloud, it's actually better to direct your request to a 
specific core for DIH, something like collection_shard1_replica1.  If 
you direct it to the collection you never know which core will actually 
end up with the request, and will have a hard time getting the status of 
the import if the status request ends up on a different core than the 
full-import command.

A correct full URL should look something like this:

http://host:port/solr/test_shard1_replica2/dataimport?command=full-import

Looking at later messages, you may have figured this out at least 
partially.  The exception in your second message looks really odd.  (and 
I really have no idea what you are talking about with an overlay)

Thanks,
Shawn