When trying to use Commons Logging in WebSphere, the following error occurs:
Class com.ibm.ws.commons.logging.TrLogFactory does not implement org.apache.commons.logging.LogFactory
The commons-logging.properties file which specifies the LogFactory implementation class being used was placed on the classpath, as is the normal solution for this type of error. However, it was still not being found.
Resolving the problem
By placing the commons-logging.properties file with the following contents:
org.apache.commons.logging.LogFactory=org.apache.commons.logging.impl.LogFactoryImpl in the /<was_home>/profiles/<profile_name>/properties/ directory, the file was found and the errors no longer existed.
|Application Servers||Runtimes for Java Technology||Java SDK|