Differences between revisions 9 and 10
Revision 9 as of 2009-06-18 10:30:02
Size: 3058
Editor: 206-223-186-119
Comment: Sections were at wrong levels.
Revision 10 as of 2009-07-07 18:32:18
Size: 3155
Editor: HossMan
Comment: TOC, header cleanup, new sub-sec with snmp link
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
== Solr with JBoss == = Solr with JBoss =
Line 5: Line 5:
=== Optional Configuration ===
==== URI Charset Config ====

= Optional Configuration =
== URI Charset Config ==
Line 22: Line 24:
=== Configuring Solr Home === == SNMP Monitoring ==

For more information on Using SNMP with Solr in JBoss please see SolrSnmp

= Configuring Solr Home =
Line 25: Line 31:
==== Solr Home via web.xml ==== == Solr Home via web.xml ==
Line 35: Line 41:
==== Solr Home via properties-service.xml ==== == Solr Home via properties-service.xml ==
Line 46: Line 52:
=== JBoss Logging === = JBoss Logging =
Line 56: Line 62:
=== Troubleshooting === = Troubleshooting =

Solr with JBoss

  • Solr runs fine with [http://www.jboss.org/ JBoss], see the instructions in the generic [wiki:SolrInstall Solr installation] page

  • The latest version of JBoss is recommended


Optional Configuration

URI Charset Config

If you are going to query Solr using international characters (>127) using HTTP-GET, you must configure JBoss to conform to the URI standard by accepting percent-encoded UTF-8.

Edit JBoss's server/default/deploy/jbossweb-tomcat55.sar/server.xml and add the following attribute to the correct Connector element: URIEncoding="UTF-8". If you're using JBoss v4.0 or above, then the file is located at: server/default/deploy/jboss-web-deployer/server.xml

<Server ...>
 <Service ...>
   <Connector ... URIEncoding="UTF-8"/>

This is only an issue when sending non-ascii characters in a query request... no configuration is needed for Solr/Tomcat to return non-ascii chars in a response, or accept non-ascii chars in an HTTP-POST body.

SNMP Monitoring

For more information on Using SNMP with Solr in JBoss please see SolrSnmp

Configuring Solr Home

You can configure the Solr home directory globally via -Dsolr.solr.home in the file bin/run.bat. But that is often not desired because you potentially want more than one Solr installation deployed.

Solr Home via web.xml

You can configure the Solr home directory to use per webapp in Solr's web.xml file. Add following snippet to the web.xml:


Solr Home via properties-service.xml

You can also configure it (and other Solr variables, such as the Solr-data-dir) in properties-service.xml like so:

<mbean code="org.jboss.varia.property.SystemPropertiesService" name="jboss:type=Service,name=SystemProperties">
  <attribute name="Properties">

JBoss Logging

By default JBoss uses Log4J for its logging, while the default Solr installation uses the [http://www.slf4j.org/manual.html#binding SLF4J binding] to log via the JDK1.4 logging system. In order to get Solr to log via Log4J, you must replace the slf4j-jdk*.jar binding with the slf4j-log4j*.jar binding. From that point on, logging can be configured via the log4j.xml configuration file.

For example, this can be used to silence all the INFO messages from Solr:

<category name="org.apache.solr"> 
  <priority value="WARN"/>


If you encounter the error "statements are only available if source level is 5.0" then you have to edit the file server/default/deploy/jbossweb-tomcat55.sar/conf/web.xml.

Comment in the block


SolrJBoss (last edited 2013-01-06 15:52:56 by UweSchindler)