title: Installing liferay with Solr : admin console unreachable + exceptions on launching
body: <p>I try to install solr 1.4.1 with Liferay 5.5-5.2.3 running with Tomcat; my system is RHEL5.</p>
  
  <p>Below I explain the errors I meet; then I give the details of my solr install.</p>
  
  <p>When I start Tomcat, I have the following exceptions : </p>
  
  <pre><code>INFO: Solr home set to '/opt/apache-solr-1.4.1/example/solr/'
  Aug 4, 2010 10:44:26 AM org.apache.solr.common.SolrException log
  SEVERE:
  javax.xml.transform.TransformerException: Unknown error in XPath.
          at org.apache.xpath.XPath.execute(XPath.java:363)
          at org.apache.xpath.jaxp.XPathImpl.eval(XPathImpl.java:213)
          at org.apache.xpath.jaxp.XPathImpl.evaluate(XPathImpl.java:275)
          at org.apache.solr.core.CoreContainer.readProperties(CoreContainer.java:303)
          at org.apache.solr.core.CoreContainer.load(CoreContainer.java:242)
          at org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:117)
          at org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:83)
          at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:221)
          at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:302)
          at org.apache.catalina.core.ApplicationFilterConfig.&lt;init&gt;(ApplicationFilterConfig.java:78)
          at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3635)
          at org.apache.catalina.core.StandardContext.start(StandardContext.java:4222)
          at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
          at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
          at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
          at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:927)
          at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:890)
          at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
          at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1150)
          at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
          at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
          at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
          at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
          at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
          at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
          at org.apache.catalina.core.StandardService.start(StandardService.java:448)
          at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
          at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
          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:592)
          at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
          at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
  Caused by: java.lang.NullPointerException
          at org.apache.xpath.axes.ChildTestIterator.setRoot(ChildTestIterator.java:125)
          at org.apache.xpath.axes.NodeSequence.setRoot(NodeSequence.java:213)
          at org.apache.xpath.axes.LocPathIterator.execute(LocPathIterator.java:210)
          at org.apache.xpath.XPath.execute(XPath.java:335)
          ... 33 more
  --------------- linked to ------------------
  javax.xml.xpath.XPathExpressionException: javax.xml.transform.TransformerException: Unknown error in XPath.
          at org.apache.xpath.jaxp.XPathImpl.evaluate(XPathImpl.java:289)
          at org.apache.solr.core.CoreContainer.readProperties(CoreContainer.java:303)
          at org.apache.solr.core.CoreContainer.load(CoreContainer.java:242)
          at org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:117)
          at org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:83)
          at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:221)
          at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:302)
          at org.apache.catalina.core.ApplicationFilterConfig.&lt;init&gt;(ApplicationFilterConfig.java:78)
          at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3635)
          at org.apache.catalina.core.StandardContext.start(StandardContext.java:4222)
          at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
          at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
          at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
          at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:927)
          at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:890)
          at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
          at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1150)
          at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
          at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
          at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
          at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
          at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
          at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
          at org.apache.catalina.core.StandardService.start(StandardService.java:448)
          at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
          at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
          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:592)
          at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
          at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
  Caused by: javax.xml.transform.TransformerException: Unknown error in XPath.
          at org.apache.xpath.XPath.execute(XPath.java:363)
          at org.apache.xpath.jaxp.XPathImpl.eval(XPathImpl.java:213)
          at org.apache.xpath.jaxp.XPathImpl.evaluate(XPathImpl.java:275)
          ... 31 more
  Caused by: java.lang.NullPointerException
          at org.apache.xpath.axes.ChildTestIterator.setRoot(ChildTestIterator.java:125)
          at org.apache.xpath.axes.NodeSequence.setRoot(NodeSequence.java:213)
          at org.apache.xpath.axes.LocPathIterator.execute(LocPathIterator.java:210)
          at org.apache.xpath.XPath.execute(XPath.java:335)
          ... 33 more
  
  Aug 4, 2010 10:44:26 AM org.apache.solr.servlet.SolrDispatchFilter init
  INFO: user.dir=/opt/apache-solr-1.4.1
  </code></pre>
  
  <p>Once Tomcat has started, I try to access solr in a navigator : <a href="http://MyIpAddress/solr/" rel="nofollow noreferrer">http://MyIpAddress/solr/</a> .</p>
  
  <p>I have the "Welcome to Solr!" page, which is OK. But when I click on the "Solr Admin" link, I getthe error message "HTTP Status 404 - missing core name in path".</p>
  
  <p>I add that I get the same behaviour if I launch solr separately with start.jar (I get the same exception, and then the same error when I try to access the console).</p>
  
  <p>Now, here are the steps I followed in my install : </p>
  
  <ul>
  <li>I downloaded solr 1.4.1,, and unzipped the file under /opt.</li>
  <li>I copied the file /opt/apache-solr-1.4.1/dist/apache-solr-1.4.1.war under /opt/apache-solr-1.4.1/example/solr</li>
  <li>I created a file called solr.xml, with the content below, and I put it in two folders : conf/Catalina/localhost from Tomcat, and in /opt/apache-solr-1.4.1/example/solr : </li>
  </ul>
  
  <blockquote>
    <p>Context
    docBase="/opt/apache-solr-1.4.1/example/solr/apache-solr-1.4.1.war"
    debug="0" crossContext="true"</p>
    
    <p>Environment name="solr/home"
    type="java.lang.String"
    value="/opt/apache-solr-1.4.1/example/solr" override="true"</p>
  </blockquote>
  
  <ul>
  <li>In the file bin/setenv.sh from Tomcat, I added the line : </li>
  </ul>
  
  <p>JAVA_OPTS=="$JAVA_OPTS -Dsolr.solr.home=SOLR_HOME/example/solr"</p>
  
  <ul>
  <li>In the file /opt/apache-solr-1.4.1/example/solr/conf/solrconfig.xml, I explicitly set the index directory in the dataDir tag : </li>
  </ul>
  
  <blockquote>
    <p>${solr.data.dir:/opt/apache-solr-1.4.1/example/solr/data}</p>
  </blockquote>
  
  <p>Then I launched Tomcat.</p>
  
  <p>Thank you for any advice on what is wrong with my configuration.</p>
  
  <p>Sylvain</p>