Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-11529

Properties from configoverlay.json are not working in dataimporter config

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 7.1
    • Fix Version/s: None
    • Labels:
      None

      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:

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

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

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                elyograg Shawn Heisey
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: