Solr
  1. Solr
  2. SOLR-166

trunk requires solr.solr.home set even if JNDI is set

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.2
    • Fix Version/s: 1.2
    • Component/s: None
    • Labels:
      None

      Description

      The current trunk requires the solr.solr.home property to be set - even if JNDI is configured properly.

      I think this is because SolrServlet loads before SolrDispatchFilter and calls SolrCore.getSolrCore();

      is there a way to make sure SolrDispatchFilter gets initalized first?

        Activity

        Hide
        Ryan McKinley added a comment -

        running resin on winXP from cwd: c:/tmp

        resin.conf:

        <web-app id="/solr" character-encoding="utf-8"
        document-directory="C:/workspace/solr-clean/example/webapps/solr"
        archive-path="C:/workspace/solr-clean/example/webapps/solr.war">
        <env-entry>
        <env-entry-name>solr/home</env-entry-name>
        <env-entry-type>java.lang.String</env-entry-type>
        <env-entry-value>C:/workspace/solr-clean/example/solr</env-entry-value>
        </env-entry>
        </web-app>

        when i run, i get:

        Starting Resin on Mon, 19 Feb 2007 14:05:42 -0800 (PST)

        [14:05:43.343] Server[] starting
        [14:05:43.343]
        [14:05:43.343] Windows XP 5.1 x86
        [14:05:43.343] Java 1.5.0_07-b03, 32, mixed mode, Cp1252, en, Sun Microsystems Inc.
        [14:05:43.343] resin.home = null
        [14:05:43.343] server.root = null
        [14:05:43.343]
        [14:05:43.390] http listening to *:8080
        [14:05:43.421] Host[] starting
        [14:05:43.906] WebApphttp://localhost:8080/solr starting
        [14:05:43.937] SolrServer: init
        [14:05:43.937] SolrServlet.init()
        [14:05:44.000] Solr home defaulted to 'solr/' (system property solr.solr.home not set)
        [14:05:44.015] java.lang.ExceptionInInitializerError
        [14:05:44.015] at org.apache.solr.update.SolrIndexConfig.<clinit>(SolrIndexConfig.java:36)
        [14:05:44.015] at org.apache.solr.core.SolrCore.<clinit>(SolrCore.java:73)
        [14:05:44.015] at org.apache.solr.servlet.SolrServlet.init(SolrServlet.java:48)
        [14:05:44.015] at javax.servlet.GenericServlet.init(GenericServlet.java:69)
        [14:05:44.015] at com.caucho.server.dispatch.ServletConfigImpl.createServletImpl(ServletConfigImpl.java:646)
        [14:05:44.015] at com.caucho.server.dispatch.ServletConfigImpl.createServlet(ServletConfigImpl.java:587)
        [14:05:44.015] at com.caucho.server.dispatch.ServletManager.init(ServletManager.java:154)
        [14:05:44.015] at com.caucho.server.webapp.Application.start(Application.java:1654)
        [14:05:44.015] at com.caucho.server.deploy.DeployController.startImpl(DeployController.java:621)
        [14:05:44.015] at com.caucho.server.deploy.StartAutoRedeployAutoStrategy.startOnInit(StartAutoRedeployAutoStrategy.java:72)
        [14:05:44.015] at com.caucho.server.deploy.DeployController.startOnInit(DeployController.java:509)
        [14:05:44.015] at com.caucho.server.deploy.DeployContainer.start(DeployContainer.java:153)
        [14:05:44.015] at com.caucho.server.webapp.ApplicationContainer.start(ApplicationContainer.java:670)
        [14:05:44.015] at com.caucho.server.host.Host.start(Host.java:420)
        [14:05:44.015] at com.caucho.server.deploy.DeployController.startImpl(DeployController.java:621)
        [14:05:44.015] at com.caucho.server.deploy.StartAutoRedeployAutoStrategy.startOnInit(StartAutoRedeployAutoStrategy.java:72)
        [14:05:44.015] at com.caucho.server.deploy.DeployController.startOnInit(DeployController.java:509)
        [14:05:44.015] at com.caucho.server.deploy.DeployContainer.start(DeployContainer.java:153)
        [14:05:44.015] at com.caucho.server.host.HostContainer.start(HostContainer.java:504)
        [14:05:44.015] at com.caucho.server.resin.ServletServer.start(ServletServer.java:971)
        [14:05:44.015] at com.caucho.server.deploy.DeployController.startImpl(DeployController.java:621)
        [14:05:44.015] at com.caucho.server.deploy.AbstractDeployControllerStrategy.start(AbstractDeployControllerStrategy.java:56)
        [14:05:44.015] at com.caucho.server.deploy.DeployController.start(DeployController.java:517)
        [14:05:44.015] at com.caucho.server.resin.ResinServer.start(ResinServer.java:546)
        [14:05:44.015] at com.caucho.server.resin.Resin.init(Resin.java)
        [14:05:44.015] at com.caucho.server.resin.Resin.main(Resin.java:625)
        [14:05:44.015] at com.caucho.server.http.ResinServer.main(ResinServer.java:61)
        [14:05:44.015] Caused by: java.lang.RuntimeException: Error in solrconfig.xml
        [14:05:44.015] at org.apache.solr.core.SolrConfig.<clinit>(SolrConfig.java:82)
        [14:05:44.015] ... 27 more
        [14:05:44.015] Caused by: java.lang.RuntimeException: Can't find resource 'solrconfig.xml' in classpath or 'solr/conf/', cwd=C:\tmp
        [14:05:44.015] at org.apache.solr.core.Config.openResource(Config.java:324)
        [14:05:44.015] at org.apache.solr.core.SolrConfig.initConfig(SolrConfig.java:72)
        [14:05:44.015] at org.apache.solr.core.SolrConfig.<clinit>(SolrConfig.java:80)
        [14:05:44.015] ... 27 more
        [14:05:44.015] javax.servlet.ServletException: java.lang.ExceptionInInitializerError
        [14:05:44.015] at com.caucho.server.dispatch.ServletConfigImpl.createServlet(ServletConfigImpl.java:618)
        [14:05:44.015] at com.caucho.server.dispatch.ServletManager.init(ServletManager.java:154)
        [14:05:44.015] at com.caucho.server.webapp.Application.start(Application.java:1654)
        [14:05:44.015] at com.caucho.server.deploy.DeployController.startImpl(DeployController.java:621)
        [14:05:44.015] at com.caucho.server.deploy.StartAutoRedeployAutoStrategy.startOnInit(StartAutoRedeployAutoStrategy.java:72)
        [14:05:44.015] at com.caucho.server.deploy.DeployController.startOnInit(DeployController.java:509)
        [14:05:44.015] at com.caucho.server.deploy.DeployContainer.start(DeployContainer.java:153)
        [14:05:44.015] at com.caucho.server.webapp.ApplicationContainer.start(ApplicationContainer.java:670)
        [14:05:44.015] at com.caucho.server.host.Host.start(Host.java:420)
        [14:05:44.015] at com.caucho.server.deploy.DeployController.startImpl(DeployController.java:621)
        [14:05:44.015] at com.caucho.server.deploy.StartAutoRedeployAutoStrategy.startOnInit(StartAutoRedeployAutoStrategy.java:72)
        [14:05:44.015] at com.caucho.server.deploy.DeployController.startOnInit(DeployController.java:509)
        [14:05:44.015] at com.caucho.server.deploy.DeployContainer.start(DeployContainer.java:153)
        [14:05:44.015] at com.caucho.server.host.HostContainer.start(HostContainer.java:504)
        [14:05:44.015] at com.caucho.server.resin.ServletServer.start(ServletServer.java:971)
        [14:05:44.015] at com.caucho.server.deploy.DeployController.startImpl(DeployController.java:621)
        [14:05:44.015] at com.caucho.server.deploy.AbstractDeployControllerStrategy.start(AbstractDeployControllerStrategy.java:56)
        [14:05:44.015] at com.caucho.server.deploy.DeployController.start(DeployController.java:517)
        [14:05:44.015] at com.caucho.server.resin.ResinServer.start(ResinServer.java:546)
        [14:05:44.015] at com.caucho.server.resin.Resin.init(Resin.java)
        [14:05:44.015] at com.caucho.server.resin.Resin.main(Resin.java:625)
        [14:05:44.015] at com.caucho.server.http.ResinServer.main(ResinServer.java:61)
        [14:05:44.015] Caused by: java.lang.ExceptionInInitializerError
        [14:05:44.015] at org.apache.solr.update.SolrIndexConfig.<clinit>(SolrIndexConfig.java:36)
        [14:05:44.015] at org.apache.solr.core.SolrCore.<clinit>(SolrCore.java:73)
        [14:05:44.015] at org.apache.solr.servlet.SolrServlet.init(SolrServlet.java:48)
        [14:05:44.015] at javax.servlet.GenericServlet.init(GenericServlet.java:69)
        [14:05:44.015] at com.caucho.server.dispatch.ServletConfigImpl.createServletImpl(ServletConfigImpl.java:646)
        [14:05:44.015] at com.caucho.server.dispatch.ServletConfigImpl.createServlet(ServletConfigImpl.java:587)
        [14:05:44.015] ... 21 more
        [14:05:44.015] Caused by: java.lang.RuntimeException: Error in solrconfig.xml
        [14:05:44.015] at org.apache.solr.core.SolrConfig.<clinit>(SolrConfig.java:82)
        [14:05:44.015] ... 27 more
        [14:05:44.015] Caused by: java.lang.RuntimeException: Can't find resource 'solrconfig.xml' in classpath or 'solr/conf/', cwd=C:\tmp
        [14:05:44.015] at org.apache.solr.core.Config.openResource(Config.java:324)
        [14:05:44.015] at org.apache.solr.core.SolrConfig.initConfig(SolrConfig.java:72)
        [14:05:44.015] at org.apache.solr.core.SolrConfig.<clinit>(SolrConfig.java:80)
        [14:05:44.015] ... 27 more
        [14:05:44.015] javax.servlet.ServletException: java.lang.ExceptionInInitializerError
        [14:05:44.015] at com.caucho.server.dispatch.ServletConfigImpl.createServlet(ServletConfigImpl.java:618)
        [14:05:44.015] at com.caucho.server.dispatch.ServletManager.init(ServletManager.java:154)
        [14:05:44.015] at com.caucho.server.webapp.Application.start(Application.java:1654)
        [14:05:44.015] at com.caucho.server.deploy.DeployController.startImpl(DeployController.java:621)
        [14:05:44.015] at com.caucho.server.deploy.StartAutoRedeployAutoStrategy.startOnInit(StartAutoRedeployAutoStrategy.java:72)
        [14:05:44.015] at com.caucho.server.deploy.DeployController.startOnInit(DeployController.java:509)
        [14:05:44.015] at com.caucho.server.deploy.DeployContainer.start(DeployContainer.java:153)
        [14:05:44.015] at com.caucho.server.webapp.ApplicationContainer.start(ApplicationContainer.java:670)
        [14:05:44.015] at com.caucho.server.host.Host.start(Host.java:420)
        [14:05:44.015] at com.caucho.server.deploy.DeployController.startImpl(DeployController.java:621)
        [14:05:44.015] at com.caucho.server.deploy.StartAutoRedeployAutoStrategy.startOnInit(StartAutoRedeployAutoStrategy.java:72)
        [14:05:44.015] at com.caucho.server.deploy.DeployController.startOnInit(DeployController.java:509)
        [14:05:44.015] at com.caucho.server.deploy.DeployContainer.start(DeployContainer.java:153)
        [14:05:44.015] at com.caucho.server.host.HostContainer.start(HostContainer.java:504)
        [14:05:44.015] at com.caucho.server.resin.ServletServer.start(ServletServer.java:971)
        [14:05:44.015] at com.caucho.server.deploy.DeployController.startImpl(DeployController.java:621)
        [14:05:44.015] at com.caucho.server.deploy.AbstractDeployControllerStrategy.start(AbstractDeployControllerStrategy.java:56)
        [14:05:44.015] at com.caucho.server.deploy.DeployController.start(DeployController.java:517)
        [14:05:44.015] at com.caucho.server.resin.ResinServer.start(ResinServer.java:546)
        [14:05:44.015] at com.caucho.server.resin.Resin.init(Resin.java)
        [14:05:44.015] at com.caucho.server.resin.Resin.main(Resin.java:625)
        [14:05:44.015] at com.caucho.server.http.ResinServer.main(ResinServer.java:61)
        [14:05:44.015] Caused by: java.lang.ExceptionInInitializerError
        [14:05:44.015] at org.apache.solr.update.SolrIndexConfig.<clinit>(SolrIndexConfig.java:36)
        [14:05:44.015] at org.apache.solr.core.SolrCore.<clinit>(SolrCore.java:73)
        [14:05:44.015] at org.apache.solr.servlet.SolrServlet.init(SolrServlet.java:48)
        [14:05:44.015] at javax.servlet.GenericServlet.init(GenericServlet.java:69)
        [14:05:44.015] at com.caucho.server.dispatch.ServletConfigImpl.createServletImpl(ServletConfigImpl.java:646)
        [14:05:44.015] at com.caucho.server.dispatch.ServletConfigImpl.createServlet(ServletConfigImpl.java:587)
        [14:05:44.015] ... 21 more
        [14:05:44.015] Caused by: java.lang.RuntimeException: Error in solrconfig.xml
        [14:05:44.015] at org.apache.solr.core.SolrConfig.<clinit>(SolrConfig.java:82)
        [14:05:44.015] ... 27 more
        [14:05:44.015] Caused by: java.lang.RuntimeException: Can't find resource 'solrconfig.xml' in classpath or 'solr/conf/', cwd=C:\tmp
        [14:05:44.015] at org.apache.solr.core.Config.openResource(Config.java:324)
        [14:05:44.015] at org.apache.solr.core.SolrConfig.initConfig(SolrConfig.java:72)
        [14:05:44.015] at org.apache.solr.core.SolrConfig.<clinit>(SolrConfig.java:80)
        [14:05:44.015] ... 27 more

        Show
        Ryan McKinley added a comment - running resin on winXP from cwd: c:/tmp resin.conf: <web-app id="/solr" character-encoding="utf-8" document-directory="C:/workspace/solr-clean/example/webapps/solr" archive-path="C:/workspace/solr-clean/example/webapps/solr.war"> <env-entry> <env-entry-name>solr/home</env-entry-name> <env-entry-type>java.lang.String</env-entry-type> <env-entry-value>C:/workspace/solr-clean/example/solr</env-entry-value> </env-entry> </web-app> when i run, i get: Starting Resin on Mon, 19 Feb 2007 14:05:42 -0800 (PST) [14:05:43.343] Server[] starting [14:05:43.343] [14:05:43.343] Windows XP 5.1 x86 [14:05:43.343] Java 1.5.0_07-b03, 32, mixed mode, Cp1252, en, Sun Microsystems Inc. [14:05:43.343] resin.home = null [14:05:43.343] server.root = null [14:05:43.343] [14:05:43.390] http listening to *:8080 [14:05:43.421] Host[] starting [14:05:43.906] WebApp http://localhost:8080/solr starting [14:05:43.937] SolrServer: init [14:05:43.937] SolrServlet.init() [14:05:44.000] Solr home defaulted to 'solr/' (system property solr.solr.home not set) [14:05:44.015] java.lang.ExceptionInInitializerError [14:05:44.015] at org.apache.solr.update.SolrIndexConfig.<clinit>(SolrIndexConfig.java:36) [14:05:44.015] at org.apache.solr.core.SolrCore.<clinit>(SolrCore.java:73) [14:05:44.015] at org.apache.solr.servlet.SolrServlet.init(SolrServlet.java:48) [14:05:44.015] at javax.servlet.GenericServlet.init(GenericServlet.java:69) [14:05:44.015] at com.caucho.server.dispatch.ServletConfigImpl.createServletImpl(ServletConfigImpl.java:646) [14:05:44.015] at com.caucho.server.dispatch.ServletConfigImpl.createServlet(ServletConfigImpl.java:587) [14:05:44.015] at com.caucho.server.dispatch.ServletManager.init(ServletManager.java:154) [14:05:44.015] at com.caucho.server.webapp.Application.start(Application.java:1654) [14:05:44.015] at com.caucho.server.deploy.DeployController.startImpl(DeployController.java:621) [14:05:44.015] at com.caucho.server.deploy.StartAutoRedeployAutoStrategy.startOnInit(StartAutoRedeployAutoStrategy.java:72) [14:05:44.015] at com.caucho.server.deploy.DeployController.startOnInit(DeployController.java:509) [14:05:44.015] at com.caucho.server.deploy.DeployContainer.start(DeployContainer.java:153) [14:05:44.015] at com.caucho.server.webapp.ApplicationContainer.start(ApplicationContainer.java:670) [14:05:44.015] at com.caucho.server.host.Host.start(Host.java:420) [14:05:44.015] at com.caucho.server.deploy.DeployController.startImpl(DeployController.java:621) [14:05:44.015] at com.caucho.server.deploy.StartAutoRedeployAutoStrategy.startOnInit(StartAutoRedeployAutoStrategy.java:72) [14:05:44.015] at com.caucho.server.deploy.DeployController.startOnInit(DeployController.java:509) [14:05:44.015] at com.caucho.server.deploy.DeployContainer.start(DeployContainer.java:153) [14:05:44.015] at com.caucho.server.host.HostContainer.start(HostContainer.java:504) [14:05:44.015] at com.caucho.server.resin.ServletServer.start(ServletServer.java:971) [14:05:44.015] at com.caucho.server.deploy.DeployController.startImpl(DeployController.java:621) [14:05:44.015] at com.caucho.server.deploy.AbstractDeployControllerStrategy.start(AbstractDeployControllerStrategy.java:56) [14:05:44.015] at com.caucho.server.deploy.DeployController.start(DeployController.java:517) [14:05:44.015] at com.caucho.server.resin.ResinServer.start(ResinServer.java:546) [14:05:44.015] at com.caucho.server.resin.Resin.init(Resin.java) [14:05:44.015] at com.caucho.server.resin.Resin.main(Resin.java:625) [14:05:44.015] at com.caucho.server.http.ResinServer.main(ResinServer.java:61) [14:05:44.015] Caused by: java.lang.RuntimeException: Error in solrconfig.xml [14:05:44.015] at org.apache.solr.core.SolrConfig.<clinit>(SolrConfig.java:82) [14:05:44.015] ... 27 more [14:05:44.015] Caused by: java.lang.RuntimeException: Can't find resource 'solrconfig.xml' in classpath or 'solr/conf/', cwd=C:\tmp [14:05:44.015] at org.apache.solr.core.Config.openResource(Config.java:324) [14:05:44.015] at org.apache.solr.core.SolrConfig.initConfig(SolrConfig.java:72) [14:05:44.015] at org.apache.solr.core.SolrConfig.<clinit>(SolrConfig.java:80) [14:05:44.015] ... 27 more [14:05:44.015] javax.servlet.ServletException: java.lang.ExceptionInInitializerError [14:05:44.015] at com.caucho.server.dispatch.ServletConfigImpl.createServlet(ServletConfigImpl.java:618) [14:05:44.015] at com.caucho.server.dispatch.ServletManager.init(ServletManager.java:154) [14:05:44.015] at com.caucho.server.webapp.Application.start(Application.java:1654) [14:05:44.015] at com.caucho.server.deploy.DeployController.startImpl(DeployController.java:621) [14:05:44.015] at com.caucho.server.deploy.StartAutoRedeployAutoStrategy.startOnInit(StartAutoRedeployAutoStrategy.java:72) [14:05:44.015] at com.caucho.server.deploy.DeployController.startOnInit(DeployController.java:509) [14:05:44.015] at com.caucho.server.deploy.DeployContainer.start(DeployContainer.java:153) [14:05:44.015] at com.caucho.server.webapp.ApplicationContainer.start(ApplicationContainer.java:670) [14:05:44.015] at com.caucho.server.host.Host.start(Host.java:420) [14:05:44.015] at com.caucho.server.deploy.DeployController.startImpl(DeployController.java:621) [14:05:44.015] at com.caucho.server.deploy.StartAutoRedeployAutoStrategy.startOnInit(StartAutoRedeployAutoStrategy.java:72) [14:05:44.015] at com.caucho.server.deploy.DeployController.startOnInit(DeployController.java:509) [14:05:44.015] at com.caucho.server.deploy.DeployContainer.start(DeployContainer.java:153) [14:05:44.015] at com.caucho.server.host.HostContainer.start(HostContainer.java:504) [14:05:44.015] at com.caucho.server.resin.ServletServer.start(ServletServer.java:971) [14:05:44.015] at com.caucho.server.deploy.DeployController.startImpl(DeployController.java:621) [14:05:44.015] at com.caucho.server.deploy.AbstractDeployControllerStrategy.start(AbstractDeployControllerStrategy.java:56) [14:05:44.015] at com.caucho.server.deploy.DeployController.start(DeployController.java:517) [14:05:44.015] at com.caucho.server.resin.ResinServer.start(ResinServer.java:546) [14:05:44.015] at com.caucho.server.resin.Resin.init(Resin.java) [14:05:44.015] at com.caucho.server.resin.Resin.main(Resin.java:625) [14:05:44.015] at com.caucho.server.http.ResinServer.main(ResinServer.java:61) [14:05:44.015] Caused by: java.lang.ExceptionInInitializerError [14:05:44.015] at org.apache.solr.update.SolrIndexConfig.<clinit>(SolrIndexConfig.java:36) [14:05:44.015] at org.apache.solr.core.SolrCore.<clinit>(SolrCore.java:73) [14:05:44.015] at org.apache.solr.servlet.SolrServlet.init(SolrServlet.java:48) [14:05:44.015] at javax.servlet.GenericServlet.init(GenericServlet.java:69) [14:05:44.015] at com.caucho.server.dispatch.ServletConfigImpl.createServletImpl(ServletConfigImpl.java:646) [14:05:44.015] at com.caucho.server.dispatch.ServletConfigImpl.createServlet(ServletConfigImpl.java:587) [14:05:44.015] ... 21 more [14:05:44.015] Caused by: java.lang.RuntimeException: Error in solrconfig.xml [14:05:44.015] at org.apache.solr.core.SolrConfig.<clinit>(SolrConfig.java:82) [14:05:44.015] ... 27 more [14:05:44.015] Caused by: java.lang.RuntimeException: Can't find resource 'solrconfig.xml' in classpath or 'solr/conf/', cwd=C:\tmp [14:05:44.015] at org.apache.solr.core.Config.openResource(Config.java:324) [14:05:44.015] at org.apache.solr.core.SolrConfig.initConfig(SolrConfig.java:72) [14:05:44.015] at org.apache.solr.core.SolrConfig.<clinit>(SolrConfig.java:80) [14:05:44.015] ... 27 more [14:05:44.015] javax.servlet.ServletException: java.lang.ExceptionInInitializerError [14:05:44.015] at com.caucho.server.dispatch.ServletConfigImpl.createServlet(ServletConfigImpl.java:618) [14:05:44.015] at com.caucho.server.dispatch.ServletManager.init(ServletManager.java:154) [14:05:44.015] at com.caucho.server.webapp.Application.start(Application.java:1654) [14:05:44.015] at com.caucho.server.deploy.DeployController.startImpl(DeployController.java:621) [14:05:44.015] at com.caucho.server.deploy.StartAutoRedeployAutoStrategy.startOnInit(StartAutoRedeployAutoStrategy.java:72) [14:05:44.015] at com.caucho.server.deploy.DeployController.startOnInit(DeployController.java:509) [14:05:44.015] at com.caucho.server.deploy.DeployContainer.start(DeployContainer.java:153) [14:05:44.015] at com.caucho.server.webapp.ApplicationContainer.start(ApplicationContainer.java:670) [14:05:44.015] at com.caucho.server.host.Host.start(Host.java:420) [14:05:44.015] at com.caucho.server.deploy.DeployController.startImpl(DeployController.java:621) [14:05:44.015] at com.caucho.server.deploy.StartAutoRedeployAutoStrategy.startOnInit(StartAutoRedeployAutoStrategy.java:72) [14:05:44.015] at com.caucho.server.deploy.DeployController.startOnInit(DeployController.java:509) [14:05:44.015] at com.caucho.server.deploy.DeployContainer.start(DeployContainer.java:153) [14:05:44.015] at com.caucho.server.host.HostContainer.start(HostContainer.java:504) [14:05:44.015] at com.caucho.server.resin.ServletServer.start(ServletServer.java:971) [14:05:44.015] at com.caucho.server.deploy.DeployController.startImpl(DeployController.java:621) [14:05:44.015] at com.caucho.server.deploy.AbstractDeployControllerStrategy.start(AbstractDeployControllerStrategy.java:56) [14:05:44.015] at com.caucho.server.deploy.DeployController.start(DeployController.java:517) [14:05:44.015] at com.caucho.server.resin.ResinServer.start(ResinServer.java:546) [14:05:44.015] at com.caucho.server.resin.Resin.init(Resin.java) [14:05:44.015] at com.caucho.server.resin.Resin.main(Resin.java:625) [14:05:44.015] at com.caucho.server.http.ResinServer.main(ResinServer.java:61) [14:05:44.015] Caused by: java.lang.ExceptionInInitializerError [14:05:44.015] at org.apache.solr.update.SolrIndexConfig.<clinit>(SolrIndexConfig.java:36) [14:05:44.015] at org.apache.solr.core.SolrCore.<clinit>(SolrCore.java:73) [14:05:44.015] at org.apache.solr.servlet.SolrServlet.init(SolrServlet.java:48) [14:05:44.015] at javax.servlet.GenericServlet.init(GenericServlet.java:69) [14:05:44.015] at com.caucho.server.dispatch.ServletConfigImpl.createServletImpl(ServletConfigImpl.java:646) [14:05:44.015] at com.caucho.server.dispatch.ServletConfigImpl.createServlet(ServletConfigImpl.java:587) [14:05:44.015] ... 21 more [14:05:44.015] Caused by: java.lang.RuntimeException: Error in solrconfig.xml [14:05:44.015] at org.apache.solr.core.SolrConfig.<clinit>(SolrConfig.java:82) [14:05:44.015] ... 27 more [14:05:44.015] Caused by: java.lang.RuntimeException: Can't find resource 'solrconfig.xml' in classpath or 'solr/conf/', cwd=C:\tmp [14:05:44.015] at org.apache.solr.core.Config.openResource(Config.java:324) [14:05:44.015] at org.apache.solr.core.SolrConfig.initConfig(SolrConfig.java:72) [14:05:44.015] at org.apache.solr.core.SolrConfig.<clinit>(SolrConfig.java:80) [14:05:44.015] ... 27 more
        Hide
        Hoss Man added a comment -

        load-on-startup in the web.xml is what tells the servlet container which order to load things on startup (if not set, things are loaded on first use)

        i have no idea if the servlet spec says all servelets should be loaded before all filters, or if they are in the same "load pool"

        Ryan: can you try setting a low load-on-startup for the dispatch filter (and change the values for hte servlets to be something high) and see if that solves the problem?

        Show
        Hoss Man added a comment - load-on-startup in the web.xml is what tells the servlet container which order to load things on startup (if not set, things are loaded on first use) i have no idea if the servlet spec says all servelets should be loaded before all filters, or if they are in the same "load pool" Ryan: can you try setting a low load-on-startup for the dispatch filter (and change the values for hte servlets to be something high) and see if that solves the problem?
        Hide
        Ryan McKinley added a comment -

        I don't see anyway to set load-on-startup for filters. It seems to only work for servlets. I'm able to fix this problem two ways on resin:

        1. remove "<load-on-startup>1</load-on-startup>" from SolrServer servlet
        2. lazy load core = SolrCore.getSolrCore()

        I think 1 is the better option. Filters are initalized are startup in most servlet containers. aparently resin first handles the "load-on-startup" servlets, then moves on to the filters. Jetty does the opposite.

        Note, the <load-on-startup>2</load-on-startup> for SolrUpdate does not affect anything. that servlet just punts anyway.

        Show
        Ryan McKinley added a comment - I don't see anyway to set load-on-startup for filters. It seems to only work for servlets. I'm able to fix this problem two ways on resin: 1. remove "<load-on-startup>1</load-on-startup>" from SolrServer servlet 2. lazy load core = SolrCore.getSolrCore() I think 1 is the better option. Filters are initalized are startup in most servlet containers. aparently resin first handles the "load-on-startup" servlets, then moves on to the filters. Jetty does the opposite. Note, the <load-on-startup>2</load-on-startup> for SolrUpdate does not affect anything. that servlet just punts anyway.
        Hide
        Hoss Man added a comment -

        hmmm ... servlet spec 2.4 says that all fitlers should be loaded before any servlets (see p78 in SRV.9.12) ... so unless that's changed between 2.3 nad 2.4 it's a resin bug.

        Ryan: one thing to try is changing the web.xml to use the 2.4 XSD instead of the 2.3 DTD and see if that forces resin to be compliant about loading the filter first.

        in general, i think it's good to load Servlets on startup even if there is no special initialization code they need to run, because it helps validate that the servlet is there on startup, and reduces the request time for the "first request" to that servlet because the class is alrready loaded.

        a third option you didn't mention would be moving all of the setInstanceDir logic using JNDI from the SolrDispatchFilter into Config.getInstanceDir ... off the top of my head i'm not sure why it was ever in the Dispatcher/SolrServlet in the first place.

        In a nutshell, getInstanceDir should check if a dir has been set, if not try JNDI, then system prop, then default to CWD and call setInstanceDir.

        what do you think?

        Show
        Hoss Man added a comment - hmmm ... servlet spec 2.4 says that all fitlers should be loaded before any servlets (see p78 in SRV.9.12) ... so unless that's changed between 2.3 nad 2.4 it's a resin bug. Ryan: one thing to try is changing the web.xml to use the 2.4 XSD instead of the 2.3 DTD and see if that forces resin to be compliant about loading the filter first. in general, i think it's good to load Servlets on startup even if there is no special initialization code they need to run, because it helps validate that the servlet is there on startup, and reduces the request time for the "first request" to that servlet because the class is alrready loaded. a third option you didn't mention would be moving all of the setInstanceDir logic using JNDI from the SolrDispatchFilter into Config.getInstanceDir ... off the top of my head i'm not sure why it was ever in the Dispatcher/SolrServlet in the first place. In a nutshell, getInstanceDir should check if a dir has been set, if not try JNDI, then system prop, then default to CWD and call setInstanceDir. what do you think?
        Hide
        Ryan McKinley added a comment -

        > Ryan: one thing to try is changing the web.xml to use the 2.4 XSD instead of the 2.3 DTD

        no dice. it must be a resin bug.

        >
        > in general, i think it's good to load Servlets on startup even if...

        agreed

        >
        > In a nutshell, getInstanceDir should check if a dir has been set, if not

        1. try JNDI,
        2. system prop,
        3. default to CWD

        call setInstanceDir.

        >
        > what do you think?

        I like it! as long as it only attempts the JNDI stuff if does not require extra libraries for a lightweight embedded version.

        Show
        Ryan McKinley added a comment - > Ryan: one thing to try is changing the web.xml to use the 2.4 XSD instead of the 2.3 DTD no dice. it must be a resin bug. > > in general, i think it's good to load Servlets on startup even if... agreed > > In a nutshell, getInstanceDir should check if a dir has been set, if not 1. try JNDI, 2. system prop, 3. default to CWD call setInstanceDir. > > what do you think? I like it! as long as it only attempts the JNDI stuff if does not require extra libraries for a lightweight embedded version.
        Hide
        Ryan McKinley added a comment -

        quick patch. it works for me...

        Show
        Ryan McKinley added a comment - quick patch. it works for me...
        Hide
        Hoss Man added a comment -

        commited with two small changes...

        1) log any unexpected RuntimeExceptions durring JNDI checks as warnings instead of silently ignoring (expected exceptions when JNDI isn't available are already loged as "info")

        2) use !isInstanceDirInitalized() instead of testing ==null directly.

        thanks for finding this and implimenting the fix Ryan

        Show
        Hoss Man added a comment - commited with two small changes... 1) log any unexpected RuntimeExceptions durring JNDI checks as warnings instead of silently ignoring (expected exceptions when JNDI isn't available are already loged as "info") 2) use !isInstanceDirInitalized() instead of testing ==null directly. thanks for finding this and implimenting the fix Ryan
        Hide
        Hoss Man added a comment -

        This bug was modified as part of a bulk update using the criteria...

        • Marked ("Resolved" or "Closed") and "Fixed"
        • Had no "Fix Version" versions
        • Was listed in the CHANGES.txt for 1.2

        The Fix Version for all 39 issues found was set to 1.2, email notification
        was suppressed to prevent excessive email.

        For a list of all the issues modified, search jira comments for this
        (hopefully) unique string: 20080415hossman2

        Show
        Hoss Man added a comment - This bug was modified as part of a bulk update using the criteria... Marked ("Resolved" or "Closed") and "Fixed" Had no "Fix Version" versions Was listed in the CHANGES.txt for 1.2 The Fix Version for all 39 issues found was set to 1.2, email notification was suppressed to prevent excessive email. For a list of all the issues modified, search jira comments for this (hopefully) unique string: 20080415hossman2

          People

          • Assignee:
            Hoss Man
            Reporter:
            Ryan McKinley
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development