You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Markus Fischer <ma...@fischer.name> on 2009/09/14 01:12:06 UTC

Seeking help setting up solr in eclipse

Hi,

I'ld like to set up Eclipse to run solr (in Tomcat for example), but
struggling with the issue that I can't get the index.jsp and other files
to be properly executed, for debugging and working on a plugin.

I've checked out solr via subclipse plugin, created a Dynamic Web
Project. It seems that I've to know in advance which directories contain
the proper web files. Since I can't find a definitive UI to change that
aftewards, I modified the .settings/org.eclipse.wst.common.component by
hand, but I can't get it work.

When I open solr/src/webapp/web/index.jsp via Run as/Run on Server,
Tomcat gets started and the browser window opens the URL
http://localhost:8080/solr/index.jsp which only gives me a HTTP Status
404 - /solr/index.jsp . That's straight to the point for me, but I'm not
sure where to fix this. My org.eclipse.wst.common.component looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<project-modules id="moduleCoreId" project-version="1.5.0">
    <wb-module deploy-name="solr">
        <wb-resource deploy-path="/" source-path="/src/webapp/web"/>
        <wb-resource deploy-path="/WEB-INF/classes"
source-path="/src/common"/>
        <wb-resource deploy-path="/WEB-INF/classes"
source-path="/src/java"/>
        <wb-resource deploy-path="/WEB-INF/classes"
source-path="/src/webapp/src"/>
        <wb-resource deploy-path="/WEB-INF/classes"
source-path="/src/webapp/web"/>
        <property name="java-output-path"/>
        <property name="context-root" value="/"/>
    </wb-module>
</project-modules>

I see that Tomcat gets started with these values (stripped path to
workspace):

/usr/lib/jvm/java-6-sun-1.6.0.15/bin/java
-Dcatalina.base=/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0
-Dcatalina.home=/apache-tomcat-6.0.20
-Dwtp.deploy=/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps
-Djava.endorsed.dirs=/apache-tomcat-6.0.20/endorsed
-Dfile.encoding=UTF-8 -classpath
/apache-tomcat-6.0.20/bin/bootstrap.jar:/usr/lib/jvm/java-6-sun-1.6.0.15/lib/tools.jar
org.apache.catalina.startup.Bootstrap start

The configuration files in "/workspace/Servers/Tomcat v6.0 Server at
localhost-config", e.g. server.xml, contain:

<Host appBase="webapps" autoDeploy="true" name="localhost"
unpackWARs="true" xmlNamespaceAware="false"
xmlValidation="false"><Context docBase="solr" path="/solr"
reloadable="true" source="org.eclipse.jst.jee.server:solr"/></Host>

I see files copied, e.g.

/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/solr/WEB-INF/classes/index.jsp

I'm bumping against a wall currently, I don't see the woods anymore ...

thanks for any help,
- Markus

Re: Seeking help setting up solr in eclipse

Posted by Grant Ingersoll <gs...@apache.org>.
I'm not familiar w/ Eclipse, but do you need to set solr.solr.home?     
Perhaps http://wiki.apache.org/solr/SolrTomcat can help too.
On Sep 13, 2009, at 7:12 PM, Markus Fischer wrote:

> Hi,
>
> I'ld like to set up Eclipse to run solr (in Tomcat for example), but
> struggling with the issue that I can't get the index.jsp and other  
> files
> to be properly executed, for debugging and working on a plugin.
>
> I've checked out solr via subclipse plugin, created a Dynamic Web
> Project. It seems that I've to know in advance which directories  
> contain
> the proper web files. Since I can't find a definitive UI to change  
> that
> aftewards, I modified the .settings/org.eclipse.wst.common.component  
> by
> hand, but I can't get it work.
>
> When I open solr/src/webapp/web/index.jsp via Run as/Run on Server,
> Tomcat gets started and the browser window opens the URL
> http://localhost:8080/solr/index.jsp which only gives me a HTTP Status
> 404 - /solr/index.jsp . That's straight to the point for me, but I'm  
> not
> sure where to fix this. My org.eclipse.wst.common.component looks  
> like this:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <project-modules id="moduleCoreId" project-version="1.5.0">
>    <wb-module deploy-name="solr">
>        <wb-resource deploy-path="/" source-path="/src/webapp/web"/>
>        <wb-resource deploy-path="/WEB-INF/classes"
> source-path="/src/common"/>
>        <wb-resource deploy-path="/WEB-INF/classes"
> source-path="/src/java"/>
>        <wb-resource deploy-path="/WEB-INF/classes"
> source-path="/src/webapp/src"/>
>        <wb-resource deploy-path="/WEB-INF/classes"
> source-path="/src/webapp/web"/>
>        <property name="java-output-path"/>
>        <property name="context-root" value="/"/>
>    </wb-module>
> </project-modules>
>
> I see that Tomcat gets started with these values (stripped path to
> workspace):
>
> /usr/lib/jvm/java-6-sun-1.6.0.15/bin/java
> -Dcatalina.base=/workspace/.metadata/.plugins/ 
> org.eclipse.wst.server.core/tmp0
> -Dcatalina.home=/apache-tomcat-6.0.20
> -Dwtp.deploy=/workspace/.metadata/.plugins/ 
> org.eclipse.wst.server.core/tmp0/wtpwebapps
> -Djava.endorsed.dirs=/apache-tomcat-6.0.20/endorsed
> -Dfile.encoding=UTF-8 -classpath
> /apache-tomcat-6.0.20/bin/bootstrap.jar:/usr/lib/jvm/java-6- 
> sun-1.6.0.15/lib/tools.jar
> org.apache.catalina.startup.Bootstrap start
>
> The configuration files in "/workspace/Servers/Tomcat v6.0 Server at
> localhost-config", e.g. server.xml, contain:
>
> <Host appBase="webapps" autoDeploy="true" name="localhost"
> unpackWARs="true" xmlNamespaceAware="false"
> xmlValidation="false"><Context docBase="solr" path="/solr"
> reloadable="true" source="org.eclipse.jst.jee.server:solr"/></Host>
>
> I see files copied, e.g.
>
> /workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/ 
> wtpwebapps/solr/WEB-INF/classes/index.jsp
>
> I'm bumping against a wall currently, I don't see the woods  
> anymore ...
>
> thanks for any help,
> - Markus

--------------------------
Grant Ingersoll
http://www.lucidimagination.com/

Search the Lucene ecosystem (Lucene/Solr/Nutch/Mahout/Tika/Droids)  
using Solr/Lucene:
http://www.lucidimagination.com/search