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 Theodan <da...@theodan.com> on 2007/03/22 17:02:21 UTC

Setting "Solr Home" via JNDI on Tomcat Bundled with JBoss

Hello.

I apologize in advance if I've overlooked something obvious, but I've been
trying for over a day to setup Solr to run on the Tomcat 5.5 that's bundled
with JBoss AS 4.0.5 GA.  There is plenty of help on the Solr Wiki about
setting it up on Tomcat 5.5 Standalone, but no help on Tomcat 5.5 Bundled.

Ideally, it should be a similar process, but it doesn't seem to be.  Tomcat
Bundled is quite different from Tomcat Standalone.  There is no "webapps"
deployment folder or "<tomcat>\conf\Catalina\localhost" config folder, as
referred to on the "Solr Tomcat" wiki page, and in fact the entire folder
structure is quite different, due to JBoss' treatment of Tomcat as just
another service.

I've actually gotten past all of the hurdles, except for figuring out how to
setup "Solr Home" via JNDI so that Tomcat Bundled will see the binding.  I
have tried various approaches:

1. Based on instructions at "http://wiki.apache.org/solr/SolrTomcat", I
created an XML fragment:
	<Context docBase="C:\Dev\jboss-4.0.5.GA\server\default\deploy\Solr.war"
debug="0" crossContext="true">
		<Environment name="solr/home" type="java.lang.String"
value="C:\Dev\MyTestSolrHome" override="true" />
	</Context>
and tried placing it in various promising places:
	- jboss-4.0.5.GA/server/default/deploy/<Solr.war>/META-INF/context.xml
	- jboss-4.0.5.GA/server/default/deploy/<Solr.war>/META-INF/solr.xml
	- jboss-4.0.5.GA/server/default/deploy/jbossweb-tomcat55.sar/context.xml
	- jboss-4.0.5.GA/server/default/deploy/jbossweb-tomcat55.sar/solr.xml
	-
jboss-4.0.5.GA/server/default/deploy/jbossweb-tomcat55.sar/conf/context.xml
	- jboss-4.0.5.GA/server/default/deploy/jbossweb-tomcat55.sar/conf/solr.xml

2. Based on instructions at
"http://wiki.jboss.org/wiki/Wiki.jsp?page=JNDIBindingServiceMgr", I copied
the sample JNDIBindingServiceMgr <mbean>, and customized it with the
following JNDI binding:
	<jndi:binding name="solr/home">
		<jndi:value type="java.lang.String">C:\Dev\MyTestSolrHome</jndi:value>
	</jndi:binding>
and tried placing it in
"jboss-4.0.5.GA\server\default\conf\jboss-service.xml", under the "JNDI"
section.

None of these approaches worked, and during Solr startup I still get the
following in the logs:

==============================================================
16:56:33,532 ERROR [STDERR] Mar 21, 2007 4:56:33 PM
org.apache.solr.servlet.SolrServlet init
INFO: SolrServlet.init()
16:56:33,532 ERROR [STDERR] Mar 21, 2007 4:56:33 PM
org.apache.solr.servlet.SolrServlet init
INFO: No /solr/home in JNDI
16:56:33,532 ERROR [STDERR] Mar 21, 2007 4:56:33 PM
org.apache.solr.servlet.SolrServlet init
INFO: user.dir=C:\Dev\jboss-4.0.5.GA\bin
16:56:33,610 ERROR [STDERR] Mar 21, 2007 4:56:33 PM
org.apache.solr.core.Config getInstanceDir
INFO: Solr home defaulted to 'solr/'
==============================================================

Can anyone please help?

Thanks,
-Dan
-- 
View this message in context: http://www.nabble.com/Setting-%22Solr-Home%22-via-JNDI-on-Tomcat-Bundled-with-JBoss-tf3448553.html#a9617997
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Setting "Solr Home" via JNDI on Tomcat Bundled with JBoss

Posted by Chris Hostetter <ho...@fucit.org>.
: with JBoss AS 4.0.5 GA.  There is plenty of help on the Solr Wiki about
: setting it up on Tomcat 5.5 Standalone, but no help on Tomcat 5.5 Bundled.

Sorry, i don't really know anything about JBoss.

You might wnat to start by tackling the JNDI problem seperate from Solr
... make a simple little WAR containing a single JSP that echos the value
of a JNDI variable ... and figure out the neccessary JBoss/Tomcat config
to mke that work (presumably the JBoss community can help since you'll
have a simple, portable test case that won't involve explaining Solr to
them)

if that works, but the same config for solr doesn't work ... well then
we go back to hte drawing board.




-Hoss