When I am adding log4j.jar in my library, Spring RESTful web service is not loading. Console logs:
Mar 5, 2012 1:36:35 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring FrameworkServlet 'policy'
Mar 5, 2012 1:36:36 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
It is initializing the servlet but not loading the service after that.
But If I remove log4j.jar, everything works fine. Console logs:
Mar 5, 2012 1:32:36 PM org.springframework.web.servlet.FrameworkServlet initServletBean
INFO: FrameworkServlet 'policy': initialization started
Mar 5, 2012 1:32:37 PM org.springframework.context.support.AbstractApplicationContext prepareRefresh
INFO: Refreshing WebApplicationContext for namespace 'policy-servlet': startup date [Mon Mar 05 13:32:37 EST 2012]; root of context hierarchy
I do have commons-logging.jar in my library to run Spring.
I have resolved this question by adding long4j.xml in my classes folder and adding DTD specification to it.
Earlier I was using log4j.properties and log4j.jar was not recognizing it.