List Info

Thread: Tomcat JNDI Settings




Tomcat JNDI Settings
user name
2007-11-05 12:17:54
I'm attempting to set up multiple instances of Solr using
JNDI (taken
from http://wiki.ap
ache.org/solr/SolrTomcat). I created a new solr.xml
file in $CATALINA_HOME/conf/Catalina/localhost with:

<Context
docBase="/var/lib/tomcat5/solr/apache-solr-1.2.0.war&qu
ot; debug="0"
crossContext="true" >
   <Environment name="solr/home"
type="java.lang.String"
value="/var/lib/tomcat5/solr/home"
override="true" />
</Context>

The box is running tomcat 5.5.23, so the solr.war file is
out of the
webapps path and the solr/home has the config folder from
the examples
directory.

When I restart Tomcat, I get an error

SEVERE: Exception starting filter SolrRequestFilter class
java.lang.NoClassDefFoundError: Could not initialize class
org.apache.solr.core.SolrConfig
...

Tomcat does create the folders in the webapps folder (and
I've created
multiple context files), but every single one of them throws
the same error.

Obviously I'm missing something, I just can't figure out
what...any
thoughts?

TIA,
Wayne

-- 
/**
 * Wayne Graham
 * Earl Gregg Swem Library
 * PO Box 8794
 * Williamsburg, VA 23188
 * 757.221.3112
 * http://swem.wm.
edu/blogs/waynegraham/
 */


Re: Tomcat JNDI Settings
user name
2007-11-06 00:08:57
: <Context
docBase="/var/lib/tomcat5/solr/apache-solr-1.2.0.war&qu
ot; debug="0"
: crossContext="true" >
:    <Environment name="solr/home"
type="java.lang.String"
: value="/var/lib/tomcat5/solr/home"
override="true" />
: </Context>

: SEVERE: Exception starting filter SolrRequestFilter class
: java.lang.NoClassDefFoundError: Could not initialize
class
: org.apache.solr.core.SolrConfig

this may be a variant of SOLR-337 ... are you sure 
/var/lib/tomcat5/solr/home exists?  does it contain a ./conf
directory? 
does the conf directory contain a solrconfig.xml file?

https:
//issues.apache.org/jira/browse/SOLR-337

Second suggestion: is /var/lib/tomcat5/ the directory where
you normally 
put war files for tomcat?  i recall people saying that with
tomcat, if you 
want to use a context file then the war *must* not be in the
nromal webaps 
directory...

http://wiki.apache.org/solr/
SolrTomcat#head-7036378fa48b79c0797cc8230a8aa0965412fb2e


"For Tomcat 5.5 and later, the war file must be stored
outside of the 
webapps directory for this to work. Otherwise, this Context
element is 
ignored."


-Hoss


Re: Tomcat JNDI Settings
user name
2007-11-06 13:58:33
Hi Chris,

Thanks for getting back to me. The folder
/var/lib/tomcat5/solr/home
exists as does
/var/lib/tomcat5/solr/home/conf/solrconfig.xml. It's
basically a copy of the files from examples folder at this
point.

I put war files in /var/lib/tomcat5/webapps, so I have the
apache-solr-1.2.0.war file outside of the webapps folder.

Are there any special permissions these files need? I have
them owned by
the tomcat user.

Wayne

Chris Hostetter wrote:
> : <Context
docBase="/var/lib/tomcat5/solr/apache-solr-1.2.0.war&qu
ot; debug="0"
> : crossContext="true" >
> :    <Environment name="solr/home"
type="java.lang.String"
> : value="/var/lib/tomcat5/solr/home"
override="true" />
> : </Context>
> 
> : SEVERE: Exception starting filter SolrRequestFilter
class
> : java.lang.NoClassDefFoundError: Could not initialize
class
> : org.apache.solr.core.SolrConfig
> 
> this may be a variant of SOLR-337 ... are you sure 
> /var/lib/tomcat5/solr/home exists?  does it contain a
./conf directory? 
> does the conf directory contain a solrconfig.xml file?
> 
> https:
//issues.apache.org/jira/browse/SOLR-337
> 
> Second suggestion: is /var/lib/tomcat5/ the directory
where you normally 
> put war files for tomcat?  i recall people saying that
with tomcat, if you 
> want to use a context file then the war *must* not be
in the nromal webaps 
> directory...
> 
> http://wiki.apache.org/solr/
SolrTomcat#head-7036378fa48b79c0797cc8230a8aa0965412fb2e

> 
> "For Tomcat 5.5 and later, the war file must be
stored outside of the 
> webapps directory for this to work. Otherwise, this
Context element is 
> ignored."
> 
> 
> -Hoss
> 

-- 
/**
 * Wayne Graham
 * Earl Gregg Swem Library
 * PO Box 8794
 * Williamsburg, VA 23188
 * 757.221.3112
 * http://swem.wm.
edu/blogs/waynegraham/
 */


Re: Tomcat JNDI Settings
user name
2007-11-06 22:59:53
: Thanks for getting back to me. The folder
/var/lib/tomcat5/solr/home
: exists as does
/var/lib/tomcat5/solr/home/conf/solrconfig.xml. It's
: basically a copy of the files from examples folder at this
point.
: 
: I put war files in /var/lib/tomcat5/webapps, so I have
the
: apache-solr-1.2.0.war file outside of the webapps folder.
: 
: Are there any special permissions these files need? I have
them owned by
: the tomcat user.

that should be fine ... is /var/lib/tomcat5/solr/home/
writable by the 
tomcat user so it can make the ./data and ./data/index
directories?

are you sure there aren't any other errors in the logs above
the one you 
mentioned already?




-Hoss


[1-4]

about | contact  Other archives ( Real Estate discussion Medical topics )