System version: CentOS 6.6 x64
java version: 1.7.0_55
Problem Description:
An error appears in the log after the migration Tomcat project is started, and the content is as follows:
Jan 20, 2018 7:02:50 PM org.apache.catalina.core.StandardContext startInternal SEVERE: Error listenerStart Jan 20, 2018 7:02:49 PM org.apache.catalina.core.StandardContext startInternal SEVERE: Context [] startup failed due to previous errors Jan 20, 2018 7:02:49 PM org.apache.coyote.AbstractProtocol start INFO: Starting ProtocolHandler ["http-bio-8680"] Jan 20, 2018 7:02:49 PM org.apache.catalina.startup.Catalina start INFO: Server startup in 30535 ms
The key information cannot be obtained from the above content, which only prompts that there is an error but does not indicate the point of failure. At this time, we need to modify the log level to print more information to help us troubleshoot. The method is as follows.
solution:
In the classes path of the tomcat project, add the following content to the file logging.properties , if there is no such file, create it directly.
handlers = org.apache.juli.FileHandler, java.util.logging.ConsoleHandler org.apache.juli.FileHandler.level = FINE org.apache.juli.FileHandler.directory = ${catalina.base}/logs org.apache.juli.FileHandler.prefix = error-debug. java.util.logging.ConsoleHandler.level = FINE java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
Next restart Tomcat, and then check the log, the problems I encountered are as follows:
Jan 20, 2018 7:07:20 PM org.apache.catalina.core.StandardContext listenerStart SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'dataSourceHbe' defined in file [/root/svn/busservice/WebContent/WEB-INF/classes/applicationContext_hbe.xml]: Could not resolve placeholder 'hbe.driver' in string value "${hbe.driver}" at org.springframework.beans.factory.config.PlaceholderConfigurerSupport.doProcessProperties(PlaceholderConfigurerSupport.java:209) at org.springframework.beans.factory.config.PropertyPlaceholderConfigurer.processProperties(PropertyPlaceholderConfigurer.java:220) at org.springframework.beans.factory.config.PropertyResourceConfigurer.postProcessBeanFactory(PropertyResourceConfigurer.java:84) at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:694) at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:669) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:461) at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:389) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:294) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4791) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5285) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:618) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:650) at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1582) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745)
Use the above information to confirm that the problem is on the database connection. After re-modifying the connection information, restart Tomcat, and “SEVERE: Error listenerStart” does not appear again.
Read More:
- Tomcat startup error: java.lang.NoClassDefFoundError
- How to Solve Springmvc Error: org.springframework.web.servlet.DispatcherServlet
- AN ERROR MESSAGE APPEARS WHEN TOMCAT DEPLOYS A NEW PROJECT: INVALID BYTE TAG IN CONSTANT POOL: 15
- [Sp;ved] Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/ssm]
- [Solved] Springboot Error: org.apache.catalina.core.ContainerBase : A child container failed during start
- [Solved] Spring MVC Error: A child container failed during start
- Spring deployment error: Could not open ServletContext resource [/db.properties]
- [How to Fix] manual close is not allowed over a Spring managed SqlSession
- Error when Struts2 started Tomcat: org.apache.catalina.core.StandardContext filterStart
- [Solved] the request was rejected because its size (11579386) exceeds the configured maximum (10485760)
- Tk.mapper Common mapper Error: Error creating bean with name ‘commonMapper‘ defined in file xxx
- The Ajax return value reports an error, and the spring boot development Ajax return value reports an error
- How to Solve AspectJ error: error at ::0 can’t find referenced pointcut XXX
- Mybatis Error: Result Maps collection already contains value
- [Solved] Ureport2 export word error: unable to access this website
- [Solved] JWT + SSO Error: Error creating bean with name ‘jwtTokenServices’
- [Solved] Springcloud Add gateway to Startup Error: Exception encountered during context initialization – cancelling refresh
- [Solved] liquibase.exception.ValidationFailedException: Validation Failed
- [Solved] SAX2 driver class org.apache.xerces.parsers.SAXParser not found
- com.netflix.zuul.exception.zuulexception Timeout (Fixed)