Newbie with problems getting Solr to run on Tomcat

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Newbie with problems getting Solr to run on Tomcat

Morten Fangel-2
Hi,

I'm quite the newbie when it comes to running Tomcat webapps and the likes of
it.. I just need Solr for my website as we have ~45.000 articles we would
like a full-text index of.

And I have gotten the example "distribution" (solr-nightly/example/) running
by modding the schema.xml file.. But since I hardly believe that Getty is
suitable for a production env. I tried to move it to Tomcat..
So I installed Tomcat on our "staging"/"test"-server (a copy of our production
env. to test stuff out on).

It's:
Java SDK: `java -version` == java version "1.5.0_06"
Tomcat version: `./bin/version.sh`== Version: Apache Tomcat/5.0

Solr-Nightly from solr-2006-09-19.zip

When I try to access: testsite.[mycompany].dk/solr/admin/ I get attached
error-msg..

I would really appreciate any help, because I would really enjoy using Solr
for our searches...

Morten Fangel // fangel
  Denmark


solr-tomcat-exception.txt (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Newbie with problems getting Solr to run on Tomcat

Chris Hostetter-3

that's a little strange ... it looks like it's finding the SolrServlet
class but not SolrCore.

did you put the solr.war file directly into your webapps directory -- or
idd you expand it and move anything arround?

the war should work "out of the box" as long as it can find the config
files.

can you send the output of "find ." from the root directory of your tomcat
installation so we can see how you've got your files laid out?




: Date: Mon, 15 May 2006 11:05:56 +0200
: From: Morten Fangel <[hidden email]>
: Reply-To: [hidden email], [hidden email]
: To: [hidden email]
: Subject: Newbie with problems getting Solr to run on Tomcat
:
: Hi,
:
: I'm quite the newbie when it comes to running Tomcat webapps and the likes of
: it.. I just need Solr for my website as we have ~45.000 articles we would
: like a full-text index of.
:
: And I have gotten the example "distribution" (solr-nightly/example/) running
: by modding the schema.xml file.. But since I hardly believe that Getty is
: suitable for a production env. I tried to move it to Tomcat..
: So I installed Tomcat on our "staging"/"test"-server (a copy of our production
: env. to test stuff out on).
:
: It's:
: Java SDK: `java -version` == java version "1.5.0_06"
: Tomcat version: `./bin/version.sh`== Version: Apache Tomcat/5.0
:
: Solr-Nightly from solr-2006-09-19.zip
:
: When I try to access: testsite.[mycompany].dk/solr/admin/ I get attached
: error-msg..
:
: I would really appreciate any help, because I would really enjoy using Solr
: for our searches...
:
: Morten Fangel // fangel
:   Denmark
:
:



-Hoss

Reply | Threaded
Open this post in threaded view
|

Re: Newbie with problems getting Solr to run on Tomcat

Brian Lucas
I had the same issue some time back.  I think the problem is that you need
to create solr/conf and solr/data under the tomcat root, not inside
"webapps".

For instance:

TOMCAT HOME = /usr/local/tomcat/

SOLR CONFIG = /usr/local/tomcat/solr/conf/

SOLR DATA = /usr/local/tomcat/solr/data/

SOLR WEBAPP WAR = /usr/local/tomcat/webapps/solr.war



On 5/15/06, Chris Hostetter <[hidden email]> wrote:

>
>
> that's a little strange ... it looks like it's finding the SolrServlet
> class but not SolrCore.
>
> did you put the solr.war file directly into your webapps directory -- or
> idd you expand it and move anything arround?
>
> the war should work "out of the box" as long as it can find the config
> files.
>
> can you send the output of "find ." from the root directory of your tomcat
> installation so we can see how you've got your files laid out?
>
>
>
>
> : Date: Mon, 15 May 2006 11:05:56 +0200
> : From: Morten Fangel <[hidden email]>
> : Reply-To: [hidden email], [hidden email]
> : To: [hidden email]
> : Subject: Newbie with problems getting Solr to run on Tomcat
> :
> : Hi,
> :
> : I'm quite the newbie when it comes to running Tomcat webapps and the
> likes of
> : it.. I just need Solr for my website as we have ~45.000 articles we
> would
> : like a full-text index of.
> :
> : And I have gotten the example "distribution" (solr-nightly/example/)
> running
> : by modding the schema.xml file.. But since I hardly believe that Getty
> is
> : suitable for a production env. I tried to move it to Tomcat..
> : So I installed Tomcat on our "staging"/"test"-server (a copy of our
> production
> : env. to test stuff out on).
> :
> : It's:
> : Java SDK: `java -version` == java version "1.5.0_06"
> : Tomcat version: `./bin/version.sh`== Version: Apache Tomcat/5.0
> :
> : Solr-Nightly from solr-2006-09-19.zip
> :
> : When I try to access: testsite.[mycompany].dk/solr/admin/ I get attached
> : error-msg..
> :
> : I would really appreciate any help, because I would really enjoy using
> Solr
> : for our searches...
> :
> : Morten Fangel // fangel
> :   Denmark
> :
> :
>
>
>
> -Hoss
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Newbie with problems getting Solr to run on Tomcat

Chris Hostetter-3

: I had the same issue some time back.  I think the problem is that you need
: to create solr/conf and solr/data under the tomcat root, not inside
: "webapps".


did you really get the same exception becuase tomcat couldn't find your
config directory?....

2006-05-15 10:57:45 StandardContext[/solr]Servlet /solr threw load() exception
javax.servlet.ServletException: Servlet.init() for servlet SolrServer threw exception
        at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1085)
        at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:876)
...
----- Root Cause -----
java.lang.NoClassDefFoundError
        at org.apache.solr.servlet.SolrServlet.init(SolrServlet.java:59)
        at javax.servlet.GenericServlet.init(GenericServlet.java:261)
...


...if so that's really bad, i could have sworn Yonik made the code throw
good error messages about missing config files a while back, this looks
more like a problme of not being able to find the SolrCore class itself
(which should be in a jar included in the war file)


-Hoss

Reply | Threaded
Open this post in threaded view
|

Re: Newbie with problems getting Solr to run on Tomcat

Yonik Seeley
On 5/15/06, Chris Hostetter <[hidden email]> wrote:
> i could have sworn Yonik made the code throw
> good error messages about missing config files a while back

Yeah, as long as people ca see the whole exception chain, the error
message should be in there.

-Yonik
Reply | Threaded
Open this post in threaded view
|

Re: Newbie with problems getting Solr to run on Tomcat

Morten Fangel-2
In reply to this post by Chris Hostetter-3
On Monday 15 May 2006 22:51, you wrote:

> that's a little strange ... it looks like it's finding the SolrServlet
> class but not SolrCore.
>
> did you put the solr.war file directly into your webapps directory -- or
> idd you expand it and move anything arround?
>
> the war should work "out of the box" as long as it can find the config
> files.
>
> can you send the output of "find ." from the root directory of your tomcat
> installation so we can see how you've got your files laid out?
>
> -Hoss
Okay - I have realised that know NOTHING about Tomcat.. I though you could
just go to /manager/html and deply the .war file.. But apparently you cant do
that at all..
So I have cleaned the tomcat dir so a "find ." (well, its split up via
symlinks, so I appended "find ." for /var/share/tomcat5 and /var/lib/tomcat5
and /var/log/tomcat5 - stupid debian install script) results in the attached
file.

Could someone just guide me with a step by step install of the example from
solr-nightly/example into Tomcat. Should I copy the entire content of the
example-dir into $CATALINA_HOME (/var/share/tomcat5) or into
$CATALINA_HOME/server (/var/share/tomcat5/server) or what?

Remember - I have no clue.. so _any_ help would be greatly appreciated.. ;)

(sorry for being a nag and asking stupid questions)

-fangel

tomcat5_find_output.txt (54K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Newbie with problems getting Solr to run on Tomcat

Yonik Seeley
On 5/16/06, Morten Fangel <[hidden email]> wrote:
> Could someone just guide me with a step by step install of the example from
> solr-nightly/example into Tomcat.

For development, It's probably easiest to download Tomcat Core (in tgz
or zip format) from
http://www.signal42.com/mirrors/apache/tomcat/tomcat-5/v5.5.17/bin/apache-tomcat-5.5.17.tar.gz
and simply unarchive it yourself... that way things aren't spread all
across the system.

Then cp -r solr/example/solr to the TomCat home directory
and cp solr/example/webapps/solr.war to the TomCat dir under webapps.

Start Tomcat from it's base home dir via ./bin/startup.sh

-Yonik
Reply | Threaded
Open this post in threaded view
|

Re: Newbie with problems getting Solr to run on Tomcat

Morten Fangel-2
On Tuesday 16 May 2006 15:46, Yonik Seeley wrote:

> For development, It's probably easiest to download Tomcat Core (in tgz
> or zip format) from
> http://www.signal42.com/mirrors/apache/tomcat/tomcat-5/v5.5.17/bin/apache-t
>omcat-5.5.17.tar.gz and simply unarchive it yourself... that way things
> aren't spread all across the system.
>
> Then cp -r solr/example/solr to the TomCat home directory
> and cp solr/example/webapps/solr.war to the TomCat dir under webapps.
>
> Start Tomcat from it's base home dir via ./bin/startup.sh
Great, I got it working in no time. Thank you, Thank you, Thank you..

Goodie - now, back to work for me.. I've got a search-page to set up.

-fangel
>
> -Yonik