This happens because the class org.apache.commons.logging.impl.Jdk14Logger
is loaded by a different classloader than the one that loaded the Log
interface.
According to IBM's documentation, whenever you use a third-party library that WebSphere itself uses for its own internal purposes, you must:
- Set your EAR's classloader policy to
PARENT_LAST
; and
- Ensure that your EAR is self-sufficient. That is, that your third-party libraries (and their dependencies) are bundled within the EAR.
In your case:
- Set your EAR's classloader policy to
PARENT_LAST
- Include
commons-logging-1.1.jar
within your EAR (you can place it in the "EAR Library" directory, usually EAR/lib
).