tags:

views:

56

answers:

2

Hi,

I try to install solr 1.4.1 with Liferay 5.5-5.2.3 running with Tomcat; my system is RHEL5.

Below I explain the errors I meet; then I give the details of my solr install.

When I start Tomcat, I have the following exceptions :

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.<init>(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.<init>(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

Once Tomcat has started, I try to access solr in a navigator : http://194.2.219.3:8080/solr/.

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".

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).

Now, here are the steps I followed in my install :

  • I downloaded solr 1.4.1,, and unzipped the file under /opt.
  • 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
  • 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 :

Context docBase="/opt/apache-solr-1.4.1/example/solr/apache-solr-1.4.1.war" debug="0" crossContext="true"

Environment name="solr/home" type="java.lang.String" value="/opt/apache-solr-1.4.1/example/solr" override="true"

  • In the file bin/setenv.sh from Tomcat, I added the line :

JAVA_OPTS=="$JAVA_OPTS -Dsolr.solr.home=SOLR_HOME/example/solr"

  • In the file /opt/apache-solr-1.4.1/example/solr/conf/solrconfig.xml, I explicitly set the index directory in the dataDir tag :

${solr.data.dir:/opt/apache-solr-1.4.1/example/solr/data}

Then I launched Tomcat.

Thank you for any advice on what is wrong with my configuration.

Sylvain

A: 

It looks like the solr.xml file does not contain the correct settings. You should use the the settings in the Catalina folder, but you should create another one in the solr home directory.

It looks like this (if you want to use cores):

<solr persistent="false" sharedLib="./lib">
  <cores adminPath="/admin/cores">
    <core name="standards" instanceDir="standards" />
  </cores>
</solr>
coudenysj
A: 

OK, thanks for your replyn but I finally abandoned the solr solution.

Sylvain