I have an existing application which is succesffully running in WAS 5.1 and WASD.We have migrated the appliication in WAS 6.1 and RAD 7.0.
While deployed successfuly the code in WAS 6.1 and RAD 7.0 and start the server we are facing the same type of error in the console.
Could you please suggest me should Log4j(log4j-1.2.9.jar) compatible with Websphere 6.1 or we need higher version log4j jar for WAS 6.1.
Thanks in advance.
posted 11 years ago
I wanted to know whether this version Log4j(log4j-1.2.9.jar) will still work on WAS6.1 or we will have to upgrade to later version on log4j?
Your best bet is probably to include it in the enterprise application or web application you're working with. That way it won't interfere with other applications and you'll have better control over the logging options.
posted 11 years ago
Our log4j.properties file is not properly loaded in the server .So we are getting the error java.lang.ds
I am sorry that I am replying to one of the oldest thread. Long time back I had found a solution in another forum. Wish I could recall and paste that link.
I have tested the solution provided by them on Websphere 6.1 and websphere 7 and it works.
1) No need to have commons-logging.properties in the classpath. No need to change the class loading policy to PARENT_LAST.
2) Under META-INF/services, create a file by name "org.apache.commons.logging.LogFactory". The content of file should be just "org.apache.commons.logging.impl.Log4jFactory"
3) Now comes the most important part. Websphere 6.1 and 7.0 still uses apache-commons-logging "1.0.3" version.
a) In Websphere 6.1, go to <WEBSPHERE INSTALLED FOLDER>/plugins and open the jar "com.ibm.ws.runtime_6.1.0.jar". It contains the commons logging file
b) Download apache commons logging 1.0.3 version from its archived website. Open the downloaded jar. When you compare the contents with the jar file of Websphere you will find that the downloaded version of apache commons logging has the below extra files
All other files are common files in both websphere and apache library.
c) Now from the downloaded apache commons logging jar, delete the common files. Only retain the above mentioned file. Once you are done, you will basically have a stripped version of apache commons logging 1.0.3. Put this stripped jar in WEB-INF/lib
d) You are all set, restart the server.
4) In Websphere 7.0, the apache commons logging can be found at <WEBSPHERE INSTALLED FOLDER>/plugins/com.ibm.ws.prereq.commons-logging.jar. All other activities will be similar to the one explained above
5) With this approach, we are not changing core library file of Websphere. Neither we are changing the class loading policies.
As I mentioned above, this solution was found in some forum which I am unable to recall. I have basically tried to provide as much information as I can. I had done the above activities in one of my previous project and was successful.