[ 
https://issues.apache.org/jira/browse/SOLR-4361?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13562947#comment-13562947
 ] 

James Dyer commented on SOLR-4361:
----------------------------------

Also, this workaround was mentioned.  This should be protected with a unit test 
so it doesn't get broken, also added to the wiki if not currently documented:

I do something similar, but without the placeholders in db-data-config.xml. You 
can define the entire datasource in solrconfig.xml, then leave out that element 
entirely in db-data-config.xml. It seems really odd, but that is how the code 
works.

This is working for me in 4.1, so it might be a workaround for you.

It looks like this:

  <requestHandler name="/dataimport" 
class="org.apache.solr.handler.dataimport.DataImportHandler">
    <lst name="defaults">
      <str name="config">db-data-config.xml</str>
      <lst name="datasource">
        <str name="defType">JdbcDataSource</str>
        <str name="driver">com.mysql.jdbc.Driver</str>
        <str name="url">jdbc:mysql://${textbooks.dbhost:nohost}/xxxx</str>
        <str name="user">${textbooks.dbuser:yyyyy}</str>
        <str name="password">${textbooks.dbpass:zzzzzz}</str>
        <str name="batchSize">-1</str>
        <str name="readOnly">true</str>
        <str name="onError">skip</str>
        <str name="netTimeoutForStreamingResults">600</str>
        <str name="zeroDateTimeBehavior">convertToNull</str>
      </lst>
    </lst>
  </requestHandler>

                
> DIH request parameters with dots throws UnsupportedOperationException
> ---------------------------------------------------------------------
>
>                 Key: SOLR-4361
>                 URL: https://issues.apache.org/jira/browse/SOLR-4361
>             Project: Solr
>          Issue Type: Bug
>          Components: contrib - DataImportHandler
>    Affects Versions: 4.1
>            Reporter: James Dyer
>            Assignee: James Dyer
>            Priority: Minor
>             Fix For: 4.2, 5.0
>
>
> If the user puts placeholders for request parameters and these contain dots, 
> DIH fails.  Current workaround is to either use no dots or use the 4.0 DIH 
> jar.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to