Re: Tomcat JNDI Settings

2007-11-08 Thread Wayne Graham
Hi Hoss,

I just wanted to follow up to the list on this one...I could never get
the JNDI settings to work with Tomcat. I went to Jetty and everything is
working quite nicely.

Wayne

Chris Hostetter wrote:
 : 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
 

-- 
/**
 * 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

2007-11-08 Thread Chris Hostetter
: I just wanted to follow up to the list on this one...I could never get
: the JNDI settings to work with Tomcat. I went to Jetty and everything is

I'm not sure what to tell you.  

I've been preping my ApacheCon demo for next week using Tomcat and JNDI 
and i haven't had any problems  i've got a few helper scripts that 
save me typing when i set it up (they use sh -x to echo the shell 
commands they execute when they run), but here's everything i do just so 
you can see what i've got going on ... it might help you figure out what's 
not working about your setup.

At the end of all of this Solr is up and running in tomcat using my 
configured SolrHome...

[EMAIL PROTECTED]:/var/tmp/ac-demo$ pwd
/var/tmp/ac-demo
[EMAIL PROTECTED]:/var/tmp/ac-demo$ ls
books-solr-home   demo-links.html raw-data   
tomcat-context.xml
create-tomcat-context.sh  install-tomcat-and-solr.sh  tar-balls
[EMAIL PROTECTED]:/var/tmp/ac-demo$ find books-solr-home/
books-solr-home/
books-solr-home/conf
books-solr-home/conf/xslt
books-solr-home/conf/xslt/example.xsl
books-solr-home/conf/xslt/example_atom.xsl
books-solr-home/conf/schema_minimal.xml
books-solr-home/conf/solrconfig.xml
books-solr-home/conf/synonyms.txt
books-solr-home/conf/schema_books.xml
books-solr-home/conf/schema.xml
[EMAIL PROTECTED]:/var/tmp/ac-demo$ cat tomcat-context.xml

!--

An example of declaring a specific tomcat context file that
points at our solr.war (anywhere we want it) and a Solr Home
directory (any where we want it) using JNDI.

We could have multiple context files like this, with different
names (and different Solr Home settings) to support multiple
indexes on one box.

--
Context
  docBase=/var/tmp/ac-demo/apache-solr-1.2.0/dist/apache-solr-1.2.0.war
  debug=0
  crossContext=true 

  Environment name=solr/home
   value=/var/tmp/ac-demo/books-solr-home/
   type=java.lang.String
   override=true /
/Context
[EMAIL PROTECTED]:/var/tmp/ac-demo$ ./install-tomcat-and-solr.sh
+ cd /var/tmp/ac-demo/
+ tar -xzf tar-balls/apache-tomcat-6.0.14.tar.gz
+ tar -xzf tar-balls/apache-solr-1.2.0.tgz
[EMAIL PROTECTED]:/var/tmp/ac-demo$ ls
apache-solr-1.2.0 books-solr-home   demo-links.html 
raw-data   tomcat-context.xml
apache-tomcat-6.0.14  create-tomcat-context.sh  install-tomcat-and-solr.sh  
tar-balls
[EMAIL PROTECTED]:/var/tmp/ac-demo$ ./create-tomcat-context.sh
+ mkdir -p apache-tomcat-6.0.14/conf/Catalina/localhost/
+ cp tomcat-context.xml 
apache-tomcat-6.0.14/conf/Catalina/localhost/books-solr.xml
[EMAIL PROTECTED]:/var/tmp/ac-demo$ apache-tomcat-6.0.14/bin/catalina.sh
Using CATALINA_BASE:   /var/tmp/ac-demo/apache-tomcat-6.0.14
Using CATALINA_HOME:   /var/tmp/ac-demo/apache-tomcat-6.0.14
Using CATALINA_TMPDIR: /var/tmp/ac-demo/apache-tomcat-6.0.14/temp
Using JRE_HOME:   /opt/jdk1.5
Usage: catalina.sh ( commands ... )
commands:
  debug Start Catalina in a debugger
  debug -security   Debug Catalina with a security manager
  jpda startStart Catalina under JPDA debugger
  run   Start Catalina in the current window
  run -security Start in the current window with security manager
  start Start Catalina in a separate window
  start -security   Start in a separate window with security manager
  stop  Stop Catalina
  stop -force   Stop Catalina (followed by kill -KILL)
  version   What version of tomcat are you running?
[EMAIL PROTECTED]:/var/tmp/ac-demo$ apache-tomcat-6.0.14/bin/catalina.sh start
Using CATALINA_BASE:   /var/tmp/ac-demo/apache-tomcat-6.0.14
Using CATALINA_HOME:   /var/tmp/ac-demo/apache-tomcat-6.0.14
Using CATALINA_TMPDIR: /var/tmp/ac-demo/apache-tomcat-6.0.14/temp
Using JRE_HOME:   /opt/jdk1.5
[EMAIL PROTECTED]:/var/tmp/ac-demo$



Re: Tomcat JNDI Settings

2007-11-06 Thread Wayne Graham
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 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

2007-11-06 Thread Chris Hostetter
: 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



Re: Tomcat JNDI Settings

2007-11-05 Thread Chris Hostetter
: Context docBase=/var/lib/tomcat5/solr/apache-solr-1.2.0.war 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