Thursday, March 5, 2015

SOLR 4.10.2 Deployment on WebSphere 8.5.5

Apache Solr 4.10.2 Deployment on Websphere involves a couples of extra steps compared to the Solr deployment on JBOSS WildFly or Apache Tomcat.

  • WebSphere comes with a default IBM jdk versio 6. First update the JDK version to 7. This Link is a good one and I have tried and tested it.     WAS855 JDK update to version 7
  • Install solr.war on the WebSphere. It is same as installing any war application on WAS8
  • Make a shared library. The additional jars I added to the shared library are shown below in screenshot-2. These jars are available in the solr/dist + solr/dist/solrj-lib+ solr/examplees/ext
  • Make sure no jars are duplicates. Match the jars between the shared_lib and solr.war\WEB-INF\lib
  • Go to environment --> shared libarary and add the shared-library path. See that you take care it is not a complete path but a referenced path from one of the WEBSPHERE_VARIABLES. Few of the variables can be found in : ${websphere8.5.5}\IBM\WebSphere\AppServer\profiles\AppSrv01\bin\setupCmdLine.bat. How to add a shared lib                                                                                                                                                                                           
  • Configure the above created shared_lib for solr application.    
  • Modify the class loading strategy for solr.war. Go to Application --> Enterprise Application --> solr --> class loading and update detection. Change the property to
           a.) PARENT_LAST
  • Add JVM properties, solr.solr.home + Go to servers --> Enterprise Application --> server1 --> process definition --> Java virtual machine --> custom properties 
          a.) Add solr.solr.home and save
          b.) Add and save

  • My SOLR_HOME has SOLR_DATA directory within it.

Access the URL : http://localhost:9080/solr