I am having an enterprise application which contains a WAR and
EJB JAR modules. Both the modules make use of log4j logging. The WAR module makes use of
Struts framework.
So I kept the Struts related jar files in WEB-INF/lib and the libraries used by EJB JAR like log4j.jar, ibatis.jar, classes12.jar etc. in the EJB JAR file and added them to the Class-Path of the MANIFEST.MF of EJB JAR.
Now when I deploy the EAR, the ActionServlet of Struts is throwing an exception saying that the org.apache.log4j.Layout class is not found. I have event used the
class-loader delegate="true" in the sun-web.xml. From the web components like JSPs I am able to refer to classes mentioned in the Class-Path of EJB JAR. But I am not able to find out what is the problem with the "log4j.jar" and why only this file is giving problem.
Can anyone please help?