lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shawn Heisey (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (SOLR-11529) Properties from configoverlay.json are not working in dataimporter config
Date Mon, 23 Oct 2017 16:10:00 GMT

     [ https://issues.apache.org/jira/browse/SOLR-11529?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Shawn Heisey updated SOLR-11529:
--------------------------------
    Description: 
Properties set in the config overlay (configoverlay.json) are not working in the dataimport
config, but they DO work in solrconfig.xml.

A user in IRC reported the issue, and I duplicated it.  I set up a cloud example, then adjusted
the config and jars so that it would allow setting up a DIH handler.  I did *not* add any
JDBC driver jars.

One of the properties added with the config API was "solr.db.driver" with a value of "com.mysql.jdbc.Driver".
 I modified the LTR transformer already in the config to use $\{solr.db.driver\} for the class.
 That resulted in an error message, and the error said that it couldn't load com.mysql.jdbc.Driver
... so I knew that the property substitution had worked.

Then I tried to use the same property inside the dih-config.xml file referenced by the DIH
handler.  This also failed, but didn't mention the mysql driver class.  So I modified the
class to $\{solr.db.driver\}.foo, which resulted in the following error:

{code}
Full Import failed:java.lang.RuntimeException: java.lang.RuntimeException: org.apache.solr.handler.dataimport.DataImportHandlerException:
Could not load driver: .foo Processing Document # 1
{code}

This tells me that the properties were not loaded when DIH parsed its config.


  was:
Properties set in the config overlay (configoverlay.json) are not working in the dataimport
config, but they DO work in solrconfig.xml.

A user in IRC reported the issue, and I duplicated it.  I set up a cloud example, then adjusted
the config and jars so that it would allow setting up a DIH handler.  I did *not* add any
JDBC driver jars.

One of the properties added with the config API was "solr.db.driver" with a value of "com.mysql.jdbc.Driver".
 I modified the LTR transformer already in the config to use ${solr.db.driver} for the class.
 That resulted in an error message, and the error said that it couldn't load com.mysql.jdbc.Driver
... so I knew that the property substitution had worked.

Then I tried to use the same property inside the dih-config.xml file referenced by the DIH
handler.  This also failed, but didn't mention the mysql driver class.  So I modified the
class to ${solr.db.driver}.foo, which resulted in the following error:

{code}
Full Import failed:java.lang.RuntimeException: java.lang.RuntimeException: org.apache.solr.handler.dataimport.DataImportHandlerException:
Could not load driver: .foo Processing Document # 1
{code}

This tells me that the properties were not loaded when DIH parsed its config.



> Properties from configoverlay.json are not working in dataimporter config
> -------------------------------------------------------------------------
>
>                 Key: SOLR-11529
>                 URL: https://issues.apache.org/jira/browse/SOLR-11529
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: contrib - DataImportHandler
>    Affects Versions: 7.1.0
>            Reporter: Shawn Heisey
>
> Properties set in the config overlay (configoverlay.json) are not working in the dataimport
config, but they DO work in solrconfig.xml.
> A user in IRC reported the issue, and I duplicated it.  I set up a cloud example, then
adjusted the config and jars so that it would allow setting up a DIH handler.  I did *not*
add any JDBC driver jars.
> One of the properties added with the config API was "solr.db.driver" with a value of
"com.mysql.jdbc.Driver".  I modified the LTR transformer already in the config to use $\{solr.db.driver\}
for the class.  That resulted in an error message, and the error said that it couldn't load
com.mysql.jdbc.Driver ... so I knew that the property substitution had worked.
> Then I tried to use the same property inside the dih-config.xml file referenced by the
DIH handler.  This also failed, but didn't mention the mysql driver class.  So I modified
the class to $\{solr.db.driver\}.foo, which resulted in the following error:
> {code}
> Full Import failed:java.lang.RuntimeException: java.lang.RuntimeException: org.apache.solr.handler.dataimport.DataImportHandlerException:
Could not load driver: .foo Processing Document # 1
> {code}
> This tells me that the properties were not loaded when DIH parsed its config.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message