[Solved] Tomcat Error: SEVERE: Error listenerStart

System version: CentOS 6.6 x64

Java version: 1.7.0_55

Problem Description:

After the Tomcat migration project is started, an error is reported in the log, 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

We can’t get the key information from the above content. It only prompts that there is an error but does not explain the fault point. At this time, we need to modify the log level to print more information to help us troubleshoot. The methods are as follows

solution:

Under the classes path in the Tomcat project, add the following contents to the file logging.properties. If there is no such file, it will be created 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 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)

 

Through the above information, it is confirmed that the problem occurs on the database connection. After modifying the connection information, restart Tomcat and “sever: error listener start” does not appear again

summary:

As described above, in troubleshooting, we can obtain more log information by modifying Tomcat log level, so as to help us troubleshoot. The specific problems should be confirmed in combination with the actual situation. The reasons for “severe: error listener start” are not the same

 

Similar Posts: