Solr
  1. Solr
  2. SOLR-1235

disallow period (.) in entity names

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.3
    • Fix Version/s: 1.4
    • Labels:
      None

      Description

      periods do not work because it is a special char for resolving namespaces

        Activity

        Hide
        Noble Paul added a comment -

        committed r787139

        Show
        Noble Paul added a comment - committed r787139
        Hide
        Tricia Jenkins added a comment -

        This commit causes the example-DIH to fail with DataImportHandlerException: Entity must have name '. The reason is that the "entity" on line 3 of trunk/example/example-DIH/solr/mail/conf/data-config.xml is missing the name attribute which causes the condition on line 177 of org.apache.solr.handler.dataimport.DataConfig to fail.

        The simple solution is to add a name attribute to the offending entity. The complex solution would be to change the DataConfig test so that null is accepted as a name, but the period is not. What do you think?

        Other info:

        I start the example-DIH webapp as described:

        java -Dsolr.solr.home="./example-DIH/solr/" -jar start.jar
        

        And the error appears:

        HTTP ERROR: 500

        Severe errors in solr configuration.

        Check your log files for more detailed information on what may be wrong.

        If you want solr to continue after configuration errors, change:

        <abortOnConfigurationError>false</abortOnConfigurationError>

        in solr.xml

        -------------------------------------------------------------
        org.apache.solr.common.SolrException: FATAL: Could not create importer. DataImporter config invalid
        at org.apache.solr.handler.dataimport.DataImportHandler.inform(DataImportHandler.java:121)
        at org.apache.solr.core.SolrResourceLoader.inform(SolrResourceLoader.java:415)
        at org.apache.solr.core.SolrCore.<init>(SolrCore.java:574)
        at org.apache.solr.core.CoreContainer.create(CoreContainer.java:381)
        at org.apache.solr.core.CoreContainer.load(CoreContainer.java:241)
        at org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:115)
        at org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:83)
        at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:99)
        at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
        at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:594)
        at org.mortbay.jetty.servlet.Context.startContext(Context.java:139)
        at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1218)
        at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:500)
        at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448)
        at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
        at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:147)
        at org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:161)
        at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
        at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:147)
        at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
        at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:117)
        at org.mortbay.jetty.Server.doStart(Server.java:210)
        at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
        at org.mortbay.xml.XmlConfiguration.main(XmlConfiguration.java:929)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.mortbay.start.Main.invokeMain(Main.java:183)
        at org.mortbay.start.Main.start(Main.java:497)
        at org.mortbay.start.Main.main(Main.java:115)
        Caused by: org.apache.solr.handler.dataimport.DataImportHandlerException: Exception occurred while initializing context
        at org.apache.solr.handler.dataimport.DataImporter.loadDataConfig(DataImporter.java:182)
        at org.apache.solr.handler.dataimport.DataImporter.<init>(DataImporter.java:99)
        at org.apache.solr.handler.dataimport.DataImportHandler.inform(DataImportHandler.java:113)
        ... 30 more
        Caused by: org.apache.solr.handler.dataimport.DataImportHandlerException: Entity must have name '
        at org.apache.solr.handler.dataimport.DataConfig$Entity.<init>(DataConfig.java:118)
        at org.apache.solr.handler.dataimport.DataConfig$Document.<init>(DataConfig.java:72)
        at org.apache.solr.handler.dataimport.DataConfig.readFromXml(DataConfig.java:240)
        at org.apache.solr.handler.dataimport.DataImporter.loadDataConfig(DataImporter.java:178)
        ... 32 more
        -------------------------------------------------------------
        org.apache.solr.handler.dataimport.DataImportHandlerException: Exception occurred while initializing context
        at org.apache.solr.handler.dataimport.DataImporter.loadDataConfig(DataImporter.java:182)
        at org.apache.solr.handler.dataimport.DataImporter.<init>(DataImporter.java:99)
        at org.apache.solr.handler.dataimport.DataImportHandler.inform(DataImportHandler.java:113)
        at org.apache.solr.core.SolrResourceLoader.inform(SolrResourceLoader.java:415)
        at org.apache.solr.core.SolrCore.<init>(SolrCore.java:574)
        at org.apache.solr.core.CoreContainer.create(CoreContainer.java:381)
        at org.apache.solr.core.CoreContainer.load(CoreContainer.java:241)
        at org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:115)
        at org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:83)
        at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:99)
        at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
        at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:594)
        at org.mortbay.jetty.servlet.Context.startContext(Context.java:139)
        at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1218)
        at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:500)
        at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448)
        at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
        at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:147)
        at org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:161)
        at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
        at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:147)
        at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
        at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:117)
        at org.mortbay.jetty.Server.doStart(Server.java:210)
        at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
        at org.mortbay.xml.XmlConfiguration.main(XmlConfiguration.java:929)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.mortbay.start.Main.invokeMain(Main.java:183)
        at org.mortbay.start.Main.start(Main.java:497)
        at org.mortbay.start.Main.main(Main.java:115)
        Caused by: org.apache.solr.handler.dataimport.DataImportHandlerException: Entity must have name '
        at org.apache.solr.handler.dataimport.DataConfig$Entity.<init>(DataConfig.java:118)
        at org.apache.solr.handler.dataimport.DataConfig$Document.<init>(DataConfig.java:72)
        at org.apache.solr.handler.dataimport.DataConfig.readFromXml(DataConfig.java:240)
        at org.apache.solr.handler.dataimport.DataImporter.loadDataConfig(DataImporter.java:178)
        ... 32 more
        -------------------------------------------------------------
        org.apache.solr.handler.dataimport.DataImportHandlerException: Entity must have name '
        at org.apache.solr.handler.dataimport.DataConfig$Entity.<init>(DataConfig.java:118)
        at org.apache.solr.handler.dataimport.DataConfig$Document.<init>(DataConfig.java:72)
        at org.apache.solr.handler.dataimport.DataConfig.readFromXml(DataConfig.java:240)
        at org.apache.solr.handler.dataimport.DataImporter.loadDataConfig(DataImporter.java:178)
        at org.apache.solr.handler.dataimport.DataImporter.<init>(DataImporter.java:99)
        at org.apache.solr.handler.dataimport.DataImportHandler.inform(DataImportHandler.java:113)
        at org.apache.solr.core.SolrResourceLoader.inform(SolrResourceLoader.java:415)
        at org.apache.solr.core.SolrCore.<init>(SolrCore.java:574)
        at org.apache.solr.core.CoreContainer.create(CoreContainer.java:381)
        at org.apache.solr.core.CoreContainer.load(CoreContainer.java:241)
        at org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:115)
        at org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:83)
        at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:99)
        at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
        at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:594)
        at org.mortbay.jetty.servlet.Context.startContext(Context.java:139)
        at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1218)
        at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:500)
        at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448)
        at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
        at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:147)
        at org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:161)
        at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
        at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:147)
        at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
        at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:117)
        at org.mortbay.jetty.Server.doStart(Server.java:210)
        at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
        at org.mortbay.xml.XmlConfiguration.main(XmlConfiguration.java:929)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.mortbay.start.Main.invokeMain(Main.java:183)
        at org.mortbay.start.Main.start(Main.java:497)
        at org.mortbay.start.Main.main(Main.java:115)

        Show
        Tricia Jenkins added a comment - This commit causes the example-DIH to fail with DataImportHandlerException: Entity must have name '. The reason is that the "entity" on line 3 of trunk/example/example-DIH/solr/mail/conf/data-config.xml is missing the name attribute which causes the condition on line 177 of org.apache.solr.handler.dataimport.DataConfig to fail. The simple solution is to add a name attribute to the offending entity. The complex solution would be to change the DataConfig test so that null is accepted as a name, but the period is not. What do you think? Other info: I start the example-DIH webapp as described: java -Dsolr.solr.home= "./example-DIH/solr/" -jar start.jar And the error appears: HTTP ERROR: 500 Severe errors in solr configuration. Check your log files for more detailed information on what may be wrong. If you want solr to continue after configuration errors, change: <abortOnConfigurationError>false</abortOnConfigurationError> in solr.xml ------------------------------------------------------------- org.apache.solr.common.SolrException: FATAL: Could not create importer. DataImporter config invalid at org.apache.solr.handler.dataimport.DataImportHandler.inform(DataImportHandler.java:121) at org.apache.solr.core.SolrResourceLoader.inform(SolrResourceLoader.java:415) at org.apache.solr.core.SolrCore.<init>(SolrCore.java:574) at org.apache.solr.core.CoreContainer.create(CoreContainer.java:381) at org.apache.solr.core.CoreContainer.load(CoreContainer.java:241) at org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:115) at org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:83) at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:99) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:594) at org.mortbay.jetty.servlet.Context.startContext(Context.java:139) at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1218) at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:500) at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:147) at org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:161) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:147) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:117) at org.mortbay.jetty.Server.doStart(Server.java:210) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) at org.mortbay.xml.XmlConfiguration.main(XmlConfiguration.java:929) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.mortbay.start.Main.invokeMain(Main.java:183) at org.mortbay.start.Main.start(Main.java:497) at org.mortbay.start.Main.main(Main.java:115) Caused by: org.apache.solr.handler.dataimport.DataImportHandlerException: Exception occurred while initializing context at org.apache.solr.handler.dataimport.DataImporter.loadDataConfig(DataImporter.java:182) at org.apache.solr.handler.dataimport.DataImporter.<init>(DataImporter.java:99) at org.apache.solr.handler.dataimport.DataImportHandler.inform(DataImportHandler.java:113) ... 30 more Caused by: org.apache.solr.handler.dataimport.DataImportHandlerException: Entity must have name ' at org.apache.solr.handler.dataimport.DataConfig$Entity.<init>(DataConfig.java:118) at org.apache.solr.handler.dataimport.DataConfig$Document.<init>(DataConfig.java:72) at org.apache.solr.handler.dataimport.DataConfig.readFromXml(DataConfig.java:240) at org.apache.solr.handler.dataimport.DataImporter.loadDataConfig(DataImporter.java:178) ... 32 more ------------------------------------------------------------- org.apache.solr.handler.dataimport.DataImportHandlerException: Exception occurred while initializing context at org.apache.solr.handler.dataimport.DataImporter.loadDataConfig(DataImporter.java:182) at org.apache.solr.handler.dataimport.DataImporter.<init>(DataImporter.java:99) at org.apache.solr.handler.dataimport.DataImportHandler.inform(DataImportHandler.java:113) at org.apache.solr.core.SolrResourceLoader.inform(SolrResourceLoader.java:415) at org.apache.solr.core.SolrCore.<init>(SolrCore.java:574) at org.apache.solr.core.CoreContainer.create(CoreContainer.java:381) at org.apache.solr.core.CoreContainer.load(CoreContainer.java:241) at org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:115) at org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:83) at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:99) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:594) at org.mortbay.jetty.servlet.Context.startContext(Context.java:139) at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1218) at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:500) at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:147) at org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:161) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:147) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:117) at org.mortbay.jetty.Server.doStart(Server.java:210) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) at org.mortbay.xml.XmlConfiguration.main(XmlConfiguration.java:929) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.mortbay.start.Main.invokeMain(Main.java:183) at org.mortbay.start.Main.start(Main.java:497) at org.mortbay.start.Main.main(Main.java:115) Caused by: org.apache.solr.handler.dataimport.DataImportHandlerException: Entity must have name ' at org.apache.solr.handler.dataimport.DataConfig$Entity.<init>(DataConfig.java:118) at org.apache.solr.handler.dataimport.DataConfig$Document.<init>(DataConfig.java:72) at org.apache.solr.handler.dataimport.DataConfig.readFromXml(DataConfig.java:240) at org.apache.solr.handler.dataimport.DataImporter.loadDataConfig(DataImporter.java:178) ... 32 more ------------------------------------------------------------- org.apache.solr.handler.dataimport.DataImportHandlerException: Entity must have name ' at org.apache.solr.handler.dataimport.DataConfig$Entity.<init>(DataConfig.java:118) at org.apache.solr.handler.dataimport.DataConfig$Document.<init>(DataConfig.java:72) at org.apache.solr.handler.dataimport.DataConfig.readFromXml(DataConfig.java:240) at org.apache.solr.handler.dataimport.DataImporter.loadDataConfig(DataImporter.java:178) at org.apache.solr.handler.dataimport.DataImporter.<init>(DataImporter.java:99) at org.apache.solr.handler.dataimport.DataImportHandler.inform(DataImportHandler.java:113) at org.apache.solr.core.SolrResourceLoader.inform(SolrResourceLoader.java:415) at org.apache.solr.core.SolrCore.<init>(SolrCore.java:574) at org.apache.solr.core.CoreContainer.create(CoreContainer.java:381) at org.apache.solr.core.CoreContainer.load(CoreContainer.java:241) at org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:115) at org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:83) at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:99) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:594) at org.mortbay.jetty.servlet.Context.startContext(Context.java:139) at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1218) at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:500) at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:147) at org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:161) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:147) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:117) at org.mortbay.jetty.Server.doStart(Server.java:210) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) at org.mortbay.xml.XmlConfiguration.main(XmlConfiguration.java:929) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.mortbay.start.Main.invokeMain(Main.java:183) at org.mortbay.start.Main.start(Main.java:497) at org.mortbay.start.Main.main(Main.java:115)
        Hide
        Noble Paul added a comment -

        thanks Tricia for catching this

        I have made the name not mandatory. DIH assigns a random name if not specified.

        Show
        Noble Paul added a comment - thanks Tricia for catching this I have made the name not mandatory. DIH assigns a random name if not specified.
        Hide
        Grant Ingersoll added a comment -

        Bulk close for Solr 1.4

        Show
        Grant Ingersoll added a comment - Bulk close for Solr 1.4

          People

          • Assignee:
            Noble Paul
            Reporter:
            Noble Paul
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development