Problem with StringUtils. containsIgnoreCase(String, String) in IBM RAD 7.5 and Websphere 6.1


I am using IBM Rational Developer v 7.5 as development IDE and WebSphere Application Server 6.1 as application server to develop a J2EE project. Some days ago I encountered a problem with  containsIgnoreCase method of StringUtils. 
  
It was complaining that The method containsIgnoreCase(String, String) is undefined for the type StringUtils as

I was using containsIgnoreCase method of StringUtils defined in apache commons lang 2.3. For that I had added commons -lang -2.3.jar in the classpath. Although the required jar was there in classpath it was saying the method containsIgnoreCase was undefined.

Then I searched on the internet and found on IBM website
(http://www-01.ibm.com/support/docview.wss?uid=swg21398963 ) that it was problem with IBM RAD 7.5. While using IBM RAD 7.5 with WebSphere Application Server 6.1 if the Java code uses  containsIgnoreCase method of StringUtils defined in apache commons -lang -2.3.jar it gives  error.
The reason for error is that there is another version of apache common lang defined in WebSphere Runtime Libraries.

 Then I went to Java build path of my project and changed the order of libraries used by project. As I moved the commons -lang -2.3.jar upper than WebSphere Application Server the error was removed.
Therefore to remove this error the library for apache commons lang  must be in the classpath before WebSphere Runtime Libraries.

Comments

Popular posts from this blog

Old Questions for Big Data Technologies at Institute of Engineering(IOE), Tribhuvan University, Nepal

Unable to evaluate the selected expression while debugging Java project in eclipse

Install the Windows Subsystem for Linux