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 8.5.5.0 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
b.) SINGLE_CLASSLOADER_FOR_APPLICATION
- Add JVM properties, solr.solr.home + solr.solr.data. Go to servers --> Enterprise Application --> server1 --> process definition --> Java virtual machine --> custom properties
b.) Add solr.data.dir and save
Access the URL : http://localhost:9080/solr
Did a few extra steps from my own earlier deployment. ( See screenshot-1 )
ReplyDeleteRemoved from solr/WEB-INF/lib the following jars
a. Removed jcl-over-slf4j-1.7.5.jar : Reason : Clashes with solr_shared_lib. No two jars should be common between shared_lb and web-inf\lib
b. slf4j-api-1.7.5.jar.jar : Reason : Clashes with solr_shared_lib. No two jars should be common between shared_lb and web-inf\lib
c. xml-apis-1.0.b2.jar : Reason : Clashes with Websphere lib
Removed from solr_shared
d. slf4j-log4j12-1.7.6.jar : Reason : Clashes with Websphere lib. So the solr_shared to be used should be the one on this machine