I am able to solve this. After cleaning project tomcat started but problem again occurred on next launch. In console I found below errors-
WARNING: Ignored XML validation warning org.xml.sax.SAXParseException;
lineNumber: 15; columnNumber: 31; schema_reference.4: Failed to read
schema document
'http://www.springframework.org/schema/context/spring-context-4.0.xsd',
because 1) could not find the document; 2) the document could not be
read; 3) the root element of the document is not . at
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown
Source) at
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.warning(Unknown
Source)
Jul 24, 2015 2:31:11 PM org.springframework.web.servlet.FrameworkServlet initServletBean
SEVERE: Context initialization failed
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException:
Line 15 in XML document from ServletContext resource
[/WEB-INF/rest-servlet.xml] is invalid; nested exception is
org.xml.sax.SAXParseException; lineNumber: 15; columnNumber: 31;
cvc-complex-type.2.4.c: The matching wildcard is strict, but no
declaration can be found for element 'context:annotation-config'.
Caused by: org.xml.sax.SAXParseException; lineNumber: 15;
columnNumber: 31; cvc-complex-type.2.4.c: The matching wildcard is
strict, but no declaration can be found for element
'context:annotation-config'.
Jul 24, 2015 2:31:11 PM org.apache.catalina.core.ApplicationContext
log SEVERE: StandardWrapper.Throwable
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException:
Line 15 in XML document from ServletContext resource
[/WEB-INF/rest-servlet.xml] is invalid; nested exception is
org.xml.sax.SAXParseException; lineNumber: 15; columnNumber: 31;
cvc-complex-type.2.4.c: The matching wildcard is strict, but no
declaration can be found for element 'context:annotation-config'.
Caused by: org.xml.sax.SAXParseException; lineNumber: 15;
columnNumber: 31; cvc-complex-type.2.4.c: The matching wildcard is
strict, but no declaration can be found for element
'context:annotation-config'.
So I checked my servlet.xml file in WEB-INF folder and I found that xsi:schemaLocation
declarations is using 4.0 version but in my lib folder I have 3.0.5 version jars of spring. So I changed to 3.0 in servlet.xml and problem is fixed. So if anyone facing timeout problem in tomcat and server while starting is stuck at this line in console-
INFO: Loading XML bean definitions from ServletContext resource
[/WEB-INF/rest-servlet.xml]
then please check version of spring jars and version in servlet.xml file.
I am wondering how it was able to run previously, may be it was loading definations from web.