码迷,mamicode.com
首页 > 其他好文 > 详细

启动tomcat服务器报错:ERROR ContextLoader:307 - Context initialization failed

时间:2018-10-01 22:10:25      阅读:397      评论:0      收藏:0      [点我收藏+]

标签:lte   required   stdout   oca   exti   version   updating   import   collect   

错误详情

十月 012018 7:46:36 下午 org.apache.tomcat.util.digester.SetPropertiesRule begin
警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property ‘source‘ to ‘org.eclipse.jst.jee.server:bos19‘ did not find a matching property.
十月 012018 7:46:36 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server version:        Apache Tomcat/8.5.30
十月 012018 7:46:36 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server built:          Apr 3 2018 20:04:09 UTC
十月 012018 7:46:36 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server number:         8.5.30.0
十月 012018 7:46:36 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Name:               Windows 10
十月 012018 7:46:36 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Version:            10.0
十月 012018 7:46:36 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Architecture:          amd64
十月 012018 7:46:36 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Java Home:             D:\learn\Java\JDK\jdk1.8.0_161\jre
十月 012018 7:46:36 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Version:           1.8.0_161-b12
十月 012018 7:46:36 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Vendor:            Oracle Corporation
十月 012018 7:46:36 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_BASE:         D:\learn\Java\eclipse-jee-oxygen-2-win32-x86_64\eclipse-workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0
十月 012018 7:46:36 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_HOME:         D:\learn\JavaWeb\apache-tomcat\apache-tomcat-8.5.30
十月 012018 7:46:36 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.base=D:\learn\Java\eclipse-jee-oxygen-2-win32-x86_64\eclipse-workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0
十月 012018 7:46:36 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.home=D:\learn\JavaWeb\apache-tomcat\apache-tomcat-8.5.30
十月 012018 7:46:36 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dwtp.deploy=D:\learn\Java\eclipse-jee-oxygen-2-win32-x86_64\eclipse-workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps
十月 012018 7:46:36 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Djava.endorsed.dirs=D:\learn\JavaWeb\apache-tomcat\apache-tomcat-8.5.30\endorsed
十月 012018 7:46:36 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dfile.encoding=GBK
十月 012018 7:46:36 下午 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
信息: Loaded APR based Apache Tomcat Native library [1.2.16] using APR version [1.6.3].
十月 012018 7:46:36 下午 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
信息: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
十月 012018 7:46:36 下午 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
信息: APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true]
十月 012018 7:46:37 下午 org.apache.catalina.core.AprLifecycleListener initializeSSL
信息: OpenSSL successfully initialized [OpenSSL 1.0.2m  2 Nov 2017]
十月 012018 7:46:38 下午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["http-nio-8080"]
十月 012018 7:46:39 下午 org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
信息: Using a shared selector for servlet write/read
十月 012018 7:46:39 下午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["ajp-nio-8009"]
十月 012018 7:46:39 下午 org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
信息: Using a shared selector for servlet write/read
十月 012018 7:46:39 下午 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 4059 ms
十月 012018 7:46:39 下午 org.apache.catalina.core.StandardService startInternal
信息: Starting service [Catalina]
十月 012018 7:46:39 下午 org.apache.catalina.core.StandardEngine startInternal
信息: Starting Servlet Engine: Apache Tomcat/8.5.30
十月 012018 7:46:47 下午 org.apache.jasper.servlet.TldScanner scanJars
信息: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
十月 012018 7:46:57 下午 org.apache.jasper.servlet.TldScanner scanJars
信息: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
十月 012018 7:46:57 下午 org.apache.catalina.core.ApplicationContext log
信息: No Spring WebApplicationInitializer types detected on classpath
十月 012018 7:46:57 下午 org.apache.catalina.core.ApplicationContext log
信息: Initializing Spring root WebApplicationContext
19:46:57,185  INFO ContextLoader:272 - Root WebApplicationContext: initialization started
19:46:57,372  INFO XmlWebApplicationContext:510 - Refreshing Root WebApplicationContext: startup date [Mon Oct 01 19:46:57 CST 2018]; root of context hierarchy
19:46:57,487  INFO XmlBeanDefinitionReader:315 - Loading XML bean definitions from class path resource [applicationContext.xml]
19:46:57,771  INFO ClassPathBeanDefinitionScanner:222 - JSR-250 ‘javax.annotation.ManagedBean‘ found and supported for component scanning
19:46:58,203 ERROR ContextLoader:307 - Context initialization failed
java.lang.IllegalArgumentException
    at org.springframework.asm.ClassReader.<init>(Unknown Source)
    at org.springframework.asm.ClassReader.<init>(Unknown Source)
    at org.springframework.asm.ClassReader.<init>(Unknown Source)
    at org.springframework.core.type.classreading.SimpleMetadataReader.<init>(SimpleMetadataReader.java:52)
    at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:80)
    at org.springframework.core.type.classreading.CachingMetadataReaderFactory.getMetadataReader(CachingMetadataReaderFactory.java:101)
    at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:76)
    at org.springframework.context.annotation.ConfigurationClassParser.getImports(ConfigurationClassParser.java:298)
    at org.springframework.context.annotation.ConfigurationClassParser.getImports(ConfigurationClassParser.java:300)
    at org.springframework.context.annotation.ConfigurationClassParser.getImports(ConfigurationClassParser.java:300)
    at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:230)
    at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:153)
    at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:130)
    at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:285)
    at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:223)
    at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:630)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:461)
    at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:383)
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:283)
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4776)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5240)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1421)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1411)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
十月 012018 7:46:58 下午 org.apache.catalina.core.StandardContext listenerStart
严重: Exception sending context initialized event to listener instance of class [org.springframework.web.context.ContextLoaderListener]
java.lang.IllegalArgumentException
    at org.springframework.asm.ClassReader.<init>(Unknown Source)
    at org.springframework.asm.ClassReader.<init>(Unknown Source)
    at org.springframework.asm.ClassReader.<init>(Unknown Source)
    at org.springframework.core.type.classreading.SimpleMetadataReader.<init>(SimpleMetadataReader.java:52)
    at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:80)
    at org.springframework.core.type.classreading.CachingMetadataReaderFactory.getMetadataReader(CachingMetadataReaderFactory.java:101)
    at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:76)
    at org.springframework.context.annotation.ConfigurationClassParser.getImports(ConfigurationClassParser.java:298)
    at org.springframework.context.annotation.ConfigurationClassParser.getImports(ConfigurationClassParser.java:300)
    at org.springframework.context.annotation.ConfigurationClassParser.getImports(ConfigurationClassParser.java:300)
    at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:230)
    at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:153)
    at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:130)
    at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:285)
    at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:223)
    at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:630)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:461)
    at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:383)
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:283)
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4776)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5240)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1421)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1411)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)

十月 012018 7:46:58 下午 org.apache.catalina.core.StandardContext startInternal
严重: One or more listeners failed to start. Full details will be found in the appropriate container log file
十月 012018 7:46:58 下午 org.apache.catalina.core.StandardContext startInternal
严重: Context [/bos19] startup failed due to previous errors
十月 012018 7:46:58 下午 org.apache.catalina.core.ApplicationContext log
信息: Closing Spring root WebApplicationContext
19:46:58,217  INFO XmlWebApplicationContext:1042 - Closing Root WebApplicationContext: startup date [Mon Oct 01 19:46:57 CST 2018]; root of context hierarchy
19:46:58,232  WARN XmlWebApplicationContext:1052 - Exception thrown from ApplicationListener handling ContextClosedEvent
java.lang.IllegalStateException: ApplicationEventMulticaster not initialized - call ‘refresh‘ before multicasting events via the context: Root WebApplicationContext: startup date [Mon Oct 01 19:46:57 CST 2018]; root of context hierarchy
    at org.springframework.context.support.AbstractApplicationContext.getApplicationEventMulticaster(AbstractApplicationContext.java:347)
    at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:334)
    at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1049)
    at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:1010)
    at org.springframework.web.context.ContextLoader.closeWebApplicationContext(ContextLoader.java:549)
    at org.springframework.web.context.ContextLoaderListener.contextDestroyed(ContextLoaderListener.java:143)
    at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4823)
    at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5462)
    at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:226)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1421)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1411)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
19:46:58,232  WARN XmlWebApplicationContext:1060 - Exception thrown from LifecycleProcessor on context close
java.lang.IllegalStateException: LifecycleProcessor not initialized - call ‘refresh‘ before invoking lifecycle methods via the context: Root WebApplicationContext: startup date [Mon Oct 01 19:46:57 CST 2018]; root of context hierarchy
    at org.springframework.context.support.AbstractApplicationContext.getLifecycleProcessor(AbstractApplicationContext.java:360)
    at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1057)
    at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:1010)
    at org.springframework.web.context.ContextLoader.closeWebApplicationContext(ContextLoader.java:549)
    at org.springframework.web.context.ContextLoaderListener.contextDestroyed(ContextLoaderListener.java:143)
    at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4823)
    at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5462)
    at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:226)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1421)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1411)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
19:46:58,233  INFO DefaultListableBeanFactory:444 - Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@75e731d4: defining beans [org.springframework.context.support.PropertySourcesPlaceholderConfigurer#0,dataSource,sessionFactory,transactionManager,userDaoImpl,userAction,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalPersistenceAnnotationProcessor,org.springframework.aop.config.internalAutoProxyCreator,org.springframework.transaction.annotation.AnnotationTransactionAttributeSource#0,org.springframework.transaction.interceptor.TransactionInterceptor#0,org.springframework.transaction.config.internalTransactionAdvisor,org.springframework.context.annotation.ConfigurationClassPostProcessor.importAwareProcessor]; root of factory hierarchy
十月 012018 7:46:58 下午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["http-nio-8080"]
十月 012018 7:46:58 下午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["ajp-nio-8009"]
十月 012018 7:46:58 下午 org.apache.catalina.startup.Catalina start
信息: Server startup in 19021 ms

系统框架

  struts2+spring3+hibernate3

  整体来说项目的版本相对来比较老

运行环境

  项目环境是Eclipse企业版4.7.2 + jdk1.8.0_161 + apache-tomcat-8.5.30

问题根源

  经过排查,这个问题就是发生在jdk环境的问题上!

解决方案

  jdk1.8只能支持spring4.0,而spring3只能使用1.7及以下jdk进行配置。

  所以降低jdk的版本即可解决问题。

  Windows --> Preferences --> Java --> Install JREs,安装jdk1.7版本

  技术分享图片

  与此同时,我们需要改变JDK编译器的java版本为jdk1.7,如下图所示:

  技术分享图片

效果截图

  再次启动tomcat,控制台没有报错了!

十月 01, 2018 8:41:27 下午 org.apache.tomcat.util.digester.SetPropertiesRule begin
警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property ‘source‘ to ‘org.eclipse.jst.jee.server:bos19‘ did not find a matching property.
十月 01, 2018 8:41:27 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server version:        Apache Tomcat/8.5.30
十月 01, 2018 8:41:27 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server built:          Apr 3 2018 20:04:09 UTC
十月 01, 2018 8:41:27 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server number:         8.5.30.0
十月 01, 2018 8:41:27 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Name:               Windows 8.1
十月 01, 2018 8:41:27 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Version:            6.3
十月 01, 2018 8:41:27 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Architecture:          amd64
十月 01, 2018 8:41:27 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Java Home:             D:\learn\Java\JRE\jre1.7.0_80
十月 01, 2018 8:41:27 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Version:           1.7.0_80-b15
十月 01, 2018 8:41:27 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Vendor:            Oracle Corporation
十月 01, 2018 8:41:27 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_BASE:         D:\learn\Java\eclipse-jee-oxygen-2-win32-x86_64\eclipse-workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0
十月 01, 2018 8:41:27 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_HOME:         D:\learn\JavaWeb\apache-tomcat\apache-tomcat-8.5.30
十月 01, 2018 8:41:27 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.base=D:\learn\Java\eclipse-jee-oxygen-2-win32-x86_64\eclipse-workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0
十月 01, 2018 8:41:27 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.home=D:\learn\JavaWeb\apache-tomcat\apache-tomcat-8.5.30
十月 01, 2018 8:41:27 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dwtp.deploy=D:\learn\Java\eclipse-jee-oxygen-2-win32-x86_64\eclipse-workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps
十月 01, 2018 8:41:27 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Djava.endorsed.dirs=D:\learn\JavaWeb\apache-tomcat\apache-tomcat-8.5.30\endorsed
十月 01, 2018 8:41:27 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dfile.encoding=GBK
十月 01, 2018 8:41:27 下午 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
信息: Loaded APR based Apache Tomcat Native library [1.2.16] using APR version [1.6.3].
十月 01, 2018 8:41:27 下午 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
信息: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
十月 01, 2018 8:41:27 下午 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
信息: APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true]
十月 01, 2018 8:41:27 下午 org.apache.catalina.core.AprLifecycleListener initializeSSL
信息: OpenSSL successfully initialized [OpenSSL 1.0.2m  2 Nov 2017]
十月 01, 2018 8:41:28 下午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["http-nio-8080"]
十月 01, 2018 8:41:28 下午 org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
信息: Using a shared selector for servlet write/read
十月 01, 2018 8:41:28 下午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["ajp-nio-8009"]
十月 01, 2018 8:41:28 下午 org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
信息: Using a shared selector for servlet write/read
十月 01, 2018 8:41:28 下午 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 1613 ms
十月 01, 2018 8:41:28 下午 org.apache.catalina.core.StandardService startInternal
信息: Starting service [Catalina]
十月 01, 2018 8:41:28 下午 org.apache.catalina.core.StandardEngine startInternal
信息: Starting Servlet Engine: Apache Tomcat/8.5.30
十月 01, 2018 8:41:32 下午 org.apache.jasper.servlet.TldScanner scanJars
信息: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
十月 01, 2018 8:41:32 下午 org.apache.catalina.util.SessionIdGeneratorBase createSecureRandom
警告: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [290] milliseconds.
十月 01, 2018 8:41:37 下午 org.apache.jasper.servlet.TldScanner scanJars
信息: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
十月 01, 2018 8:41:37 下午 org.apache.catalina.core.ApplicationContext log
信息: No Spring WebApplicationInitializer types detected on classpath
十月 01, 2018 8:41:37 下午 org.apache.catalina.core.ApplicationContext log
信息: Initializing Spring root WebApplicationContext
20:41:37,128  INFO ContextLoader:272 - Root WebApplicationContext: initialization started
20:41:37,270  INFO XmlWebApplicationContext:510 - Refreshing Root WebApplicationContext: startup date [Mon Oct 01 20:41:37 CST 2018]; root of context hierarchy
20:41:37,361  INFO XmlBeanDefinitionReader:315 - Loading XML bean definitions from class path resource [applicationContext.xml]
20:41:37,535  INFO ClassPathBeanDefinitionScanner:222 - JSR-250 ‘javax.annotation.ManagedBean‘ found and supported for component scanning
20:41:37,892  INFO PropertySourcesPlaceholderConfigurer:177 - Loading properties file from class path resource [JdbcInfo.properties]
20:41:37,965  INFO DefaultListableBeanFactory:577 - Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@16015cf6: defining beans [org.springframework.context.support.PropertySourcesPlaceholderConfigurer#0,dataSource,sessionFactory,transactionManager,userDaoImpl,userAction,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalPersistenceAnnotationProcessor,org.springframework.aop.config.internalAutoProxyCreator,org.springframework.transaction.annotation.AnnotationTransactionAttributeSource#0,org.springframework.transaction.interceptor.TransactionInterceptor#0,org.springframework.transaction.config.internalTransactionAdvisor,org.springframework.context.annotation.ConfigurationClassPostProcessor.importAwareProcessor]; root of factory hierarchy
20:41:37,990  INFO MLog:80 - MLog clients using log4j logging.
20:41:38,096  INFO C3P0Registry:204 - Initializing c3p0-0.9.1.2 [built 21-May-2007 15:04:56; debug? true; trace: 10]
20:41:38,469  INFO Version:37 - Hibernate Commons Annotations 3.2.0.Final
20:41:38,478  INFO Environment:603 - Hibernate 3.6.10.Final
20:41:38,480  INFO Environment:636 - hibernate.properties not found
20:41:38,483  INFO Environment:814 - Bytecode provider name : javassist
20:41:38,489  INFO Environment:695 - using JDK 1.4 java.sql.Timestamp handling
20:41:38,609  INFO Configuration:495 - Reading mappings from file: D:\learn\Java\eclipse-jee-oxygen-2-win32-x86_64\eclipse-workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\bos19\WEB-INF\classes\com\itheima\bos\domain\User.hbm.xml
20:41:38,771  INFO HbmBinder:353 - Mapping class: com.itheima.bos.domain.User -> t_user
20:41:38,803  INFO Configuration:1676 - Hibernate Validator not found: ignoring
20:41:38,806  INFO LocalSessionFactoryBean:780 - Building new Hibernate SessionFactory
20:41:38,813  INFO HibernateSearchEventListenerRegister:75 - Unable to find org.hibernate.search.event.FullTextIndexEventListener on the classpath. Hibernate Search is not enabled.
20:41:38,819  INFO ConnectionProviderFactory:173 - Initializing connection provider: org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider
20:41:38,930  INFO AbstractPoolBackedDataSource:462 - Initializing c3p0 pool... com.mchange.v2.c3p0.ComboPooledDataSource [ acquireIncrement -> 3, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> false, checkoutTimeout -> 0, connectionCustomizerClassName -> null, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, dataSourceName -> 1hgeby99yd7y1p712w0xgs|19d8b741, debugUnreturnedConnectionStackTraces -> false, description -> null, driverClass -> com.mysql.jdbc.Driver, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, identityToken -> 1hgeby99yd7y1p712w0xgs|19d8b741, idleConnectionTestPeriod -> 0, initialPoolSize -> 3, jdbcUrl -> jdbc:mysql:///bos19, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 0, maxIdleTimeExcessConnections -> 0, maxPoolSize -> 15, maxStatements -> 0, maxStatementsPerConnection -> 0, minPoolSize -> 3, numHelperThreads -> 3, numThreadsAwaitingCheckoutDefaultUser -> 0, preferredTestQuery -> null, properties -> {user=******, password=******}, propertyCycle -> 0, testConnectionOnCheckin -> false, testConnectionOnCheckout -> false, unreturnedConnectionTimeout -> 0, usesTraditionalReflectiveProxies -> false ]
20:41:39,241  INFO Dialect:136 - Using dialect: org.hibernate.dialect.MySQL5Dialect
20:41:39,257  INFO JdbcSupportLoader:108 - Disabling contextual LOB creation as createClob() method threw error : java.lang.reflect.InvocationTargetException
20:41:39,257  INFO SettingsFactory:126 - Database ->
       name : MySQL
    version : 5.5.27
      major : 5
      minor : 5
20:41:39,257  INFO SettingsFactory:132 - Driver ->
       name : MySQL Connector Java
    version : mysql-connector-java-5.1.46 ( Revision: 9cc87a48e75c2d2e87c1a293b2862ce651cb256e )
      major : 5
      minor : 1
20:41:39,266  INFO TransactionFactoryFactory:65 - Transaction strategy: org.springframework.orm.hibernate3.SpringTransactionFactory
20:41:39,268  INFO TransactionManagerLookupFactory:83 - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
20:41:39,269  INFO SettingsFactory:179 - Automatic flush during beforeCompletion(): disabled
20:41:39,269  INFO SettingsFactory:183 - Automatic session close at end of transaction: disabled
20:41:39,269  INFO SettingsFactory:190 - JDBC batch size: 15
20:41:39,269  INFO SettingsFactory:193 - JDBC batch updates for versioned data: disabled
20:41:39,271  INFO SettingsFactory:198 - Scrollable result sets: enabled
20:41:39,271  INFO SettingsFactory:206 - JDBC3 getGeneratedKeys(): enabled
20:41:39,271  INFO SettingsFactory:214 - Connection release mode: auto
20:41:39,274  INFO SettingsFactory:238 - Maximum outer join fetch depth: 2
20:41:39,275  INFO SettingsFactory:241 - Default batch fetch size: 1
20:41:39,275  INFO SettingsFactory:245 - Generate SQL with comments: disabled
20:41:39,275  INFO SettingsFactory:249 - Order SQL updates by primary key: disabled
20:41:39,276  INFO SettingsFactory:253 - Order SQL inserts for batching: disabled
20:41:39,276  INFO SettingsFactory:431 - Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
20:41:39,281  INFO ASTQueryTranslatorFactory:47 - Using ASTQueryTranslatorFactory
20:41:39,281  INFO SettingsFactory:261 - Query language substitutions: {}
20:41:39,281  INFO SettingsFactory:266 - JPA-QL strict compliance: disabled
20:41:39,282  INFO SettingsFactory:271 - Second-level cache: enabled
20:41:39,282  INFO SettingsFactory:275 - Query cache: disabled
20:41:39,282  INFO SettingsFactory:406 - Cache region factory : org.hibernate.cache.impl.NoCachingRegionFactory
20:41:39,284  INFO SettingsFactory:285 - Optimize cache for minimal puts: disabled
20:41:39,285  INFO SettingsFactory:294 - Structured second-level cache entries: disabled
20:41:39,292  INFO SettingsFactory:314 - Echoing all SQL to stdout
20:41:39,294  INFO SettingsFactory:323 - Statistics: disabled
20:41:39,294  INFO SettingsFactory:327 - Deleted entity synthetic identifier rollback: disabled
20:41:39,294  INFO SettingsFactory:343 - Default entity-mode: pojo
20:41:39,295  INFO SettingsFactory:347 - Named query checking : enabled
20:41:39,295  INFO SettingsFactory:351 - Check Nullability in Core (should be disabled when Bean Validation is on): enabled
20:41:39,322  INFO SessionFactoryImpl:202 - building session factory
20:41:39,329  INFO BasicTypeRegistry:150 - Type registration [clob] overrides previous : org.hibernate.type.ClobType@38731ea3
20:41:39,330  INFO BasicTypeRegistry:150 - Type registration [java.sql.Clob] overrides previous : org.hibernate.type.ClobType@38731ea3
20:41:39,330  INFO BasicTypeRegistry:150 - Type registration [characters_clob] overrides previous : org.hibernate.type.PrimitiveCharacterArrayClobType@6356d3f5
20:41:39,330  INFO BasicTypeRegistry:150 - Type registration [blob] overrides previous : org.hibernate.type.BlobType@3ca2290c
20:41:39,330  INFO BasicTypeRegistry:150 - Type registration [java.sql.Blob] overrides previous : org.hibernate.type.BlobType@3ca2290c
20:41:39,330  INFO BasicTypeRegistry:150 - Type registration [wrapper_characters_clob] overrides previous : org.hibernate.type.CharacterArrayClobType@5e6d7bac
20:41:39,331  INFO BasicTypeRegistry:150 - Type registration [materialized_blob] overrides previous : org.hibernate.type.MaterializedBlobType@614a1ee7
20:41:39,331  INFO BasicTypeRegistry:150 - Type registration [wrapper_materialized_blob] overrides previous : org.hibernate.type.WrappedMaterializedBlobType@33ad860c
20:41:39,331  INFO BasicTypeRegistry:150 - Type registration [materialized_clob] overrides previous : org.hibernate.type.MaterializedClobType@4b8e17f5
20:41:39,585  INFO SessionFactoryObjectFactory:105 - Not binding factory to JNDI, no JNDI name configured
20:41:39,594  INFO SchemaUpdate:155 - Running hbm2ddl schema update
20:41:39,594  INFO SchemaUpdate:167 - fetching database metadata
20:41:39,598  INFO SchemaUpdate:179 - updating schema
20:41:39,642  INFO TableMetadata:65 - table found: bos19.t_user
20:41:39,643  INFO TableMetadata:66 - columns: [id, birthday, username, remark, station, gender, salary, telephone, password]
20:41:39,643  INFO TableMetadata:68 - foreign keys: []
20:41:39,643  INFO TableMetadata:69 - indexes: [primary]
20:41:39,644  INFO SchemaUpdate:217 - schema update complete
20:41:39,715  INFO HibernateTransactionManager:415 - Using DataSource [com.mchange.v2.c3p0.ComboPooledDataSource [ acquireIncrement -> 3, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> false, checkoutTimeout -> 0, connectionCustomizerClassName -> null, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, dataSourceName -> 1hgeby99yd7y1p712w0xgs|19d8b741, debugUnreturnedConnectionStackTraces -> false, description -> null, driverClass -> com.mysql.jdbc.Driver, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, identityToken -> 1hgeby99yd7y1p712w0xgs|19d8b741, idleConnectionTestPeriod -> 0, initialPoolSize -> 3, jdbcUrl -> jdbc:mysql:///bos19, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 0, maxIdleTimeExcessConnections -> 0, maxPoolSize -> 15, maxStatements -> 0, maxStatementsPerConnection -> 0, minPoolSize -> 3, numHelperThreads -> 3, numThreadsAwaitingCheckoutDefaultUser -> 0, preferredTestQuery -> null, properties -> {user=******, password=******}, propertyCycle -> 0, testConnectionOnCheckin -> false, testConnectionOnCheckout -> false, unreturnedConnectionTimeout -> 0, usesTraditionalReflectiveProxies -> false ]] of Hibernate SessionFactory for HibernateTransactionManager
20:41:39,763  INFO ContextLoader:301 - Root WebApplicationContext: initialization completed in 2632 ms
20:41:40,102  INFO XmlConfigurationProvider:42 - Parsing configuration file [struts-default.xml]
20:41:40,193  INFO XmlConfigurationProvider:42 - Parsing configuration file [struts-plugin.xml]
20:41:40,205  INFO XmlConfigurationProvider:42 - Parsing configuration file [struts.xml]
20:41:40,210  INFO BeanSelectionProvider:42 - Choosing bean (spring) for (com.opensymphony.xwork2.ObjectFactory)
20:41:40,211  INFO BeanSelectionProvider:42 - Choosing bean (struts) for (com.opensymphony.xwork2.FileManagerFactory)
20:41:40,211  INFO BeanSelectionProvider:42 - Choosing bean (struts) for (com.opensymphony.xwork2.conversion.impl.XWorkConverter)
20:41:40,211  INFO BeanSelectionProvider:42 - Choosing bean (struts) for (com.opensymphony.xwork2.conversion.impl.CollectionConverter)
20:41:40,211  INFO BeanSelectionProvider:42 - Choosing bean (struts) for (com.opensymphony.xwork2.conversion.impl.ArrayConverter)
20:41:40,211  INFO BeanSelectionProvider:42 - Choosing bean (struts) for (com.opensymphony.xwork2.conversion.impl.DateConverter)
20:41:40,211  INFO BeanSelectionProvider:42 - Choosing bean (struts) for (com.opensymphony.xwork2.conversion.impl.NumberConverter)
20:41:40,211  INFO BeanSelectionProvider:42 - Choosing bean (struts) for (com.opensymphony.xwork2.conversion.impl.StringConverter)
20:41:40,212  INFO BeanSelectionProvider:42 - Choosing bean (struts) for (com.opensymphony.xwork2.conversion.ConversionPropertiesProcessor)
20:41:40,212  INFO BeanSelectionProvider:42 - Choosing bean (struts) for (com.opensymphony.xwork2.conversion.ConversionFileProcessor)
20:41:40,212  INFO BeanSelectionProvider:42 - Choosing bean (struts) for (com.opensymphony.xwork2.conversion.ConversionAnnotationProcessor)
20:41:40,212  INFO BeanSelectionProvider:42 - Choosing bean (struts) for (com.opensymphony.xwork2.conversion.TypeConverterCreator)
20:41:40,212  INFO BeanSelectionProvider:42 - Choosing bean (struts) for (com.opensymphony.xwork2.conversion.TypeConverterHolder)
20:41:40,212  INFO BeanSelectionProvider:42 - Choosing bean (struts) for (com.opensymphony.xwork2.TextProvider)
20:41:40,212  INFO BeanSelectionProvider:42 - Choosing bean (struts) for (com.opensymphony.xwork2.LocaleProvider)
20:41:40,213  INFO BeanSelectionProvider:42 - Choosing bean (struts) for (com.opensymphony.xwork2.ActionProxyFactory)
20:41:40,213  INFO BeanSelectionProvider:42 - Choosing bean (struts) for (com.opensymphony.xwork2.conversion.ObjectTypeDeterminer)
20:41:40,213  INFO BeanSelectionProvider:42 - Choosing bean (struts) for (org.apache.struts2.dispatcher.mapper.ActionMapper)
20:41:40,213  INFO BeanSelectionProvider:42 - Choosing bean (jakarta) for (org.apache.struts2.dispatcher.multipart.MultiPartRequest)
20:41:40,213  INFO BeanSelectionProvider:42 - Choosing bean (struts) for (org.apache.struts2.views.freemarker.FreemarkerManager)
20:41:40,215  INFO BeanSelectionProvider:42 - Choosing bean (struts) for (org.apache.struts2.components.UrlRenderer)
20:41:40,216  INFO BeanSelectionProvider:42 - Choosing bean (struts) for (com.opensymphony.xwork2.validator.ActionValidatorManager)
20:41:40,216  INFO BeanSelectionProvider:42 - Choosing bean (struts) for (com.opensymphony.xwork2.util.ValueStackFactory)
20:41:40,216  INFO BeanSelectionProvider:42 - Choosing bean (struts) for (com.opensymphony.xwork2.util.reflection.ReflectionProvider)
20:41:40,216  INFO BeanSelectionProvider:42 - Choosing bean (struts) for (com.opensymphony.xwork2.util.reflection.ReflectionContextFactory)
20:41:40,216  INFO BeanSelectionProvider:42 - Choosing bean (struts) for (com.opensymphony.xwork2.util.PatternMatcher)
20:41:40,216  INFO BeanSelectionProvider:42 - Choosing bean (struts) for (org.apache.struts2.dispatcher.StaticContentLoader)
20:41:40,217  INFO BeanSelectionProvider:42 - Choosing bean (struts) for (com.opensymphony.xwork2.UnknownHandlerManager)
20:41:40,217  INFO BeanSelectionProvider:42 - Choosing bean (struts) for (org.apache.struts2.views.util.UrlHelper)
20:41:40,217  INFO BeanSelectionProvider:42 - Choosing bean (struts) for (com.opensymphony.xwork2.util.TextParser)
20:41:40,217  INFO DefaultConfiguration:42 - Overriding property struts.i18n.reload - old value: false new value: true
20:41:40,217  INFO DefaultConfiguration:42 - Overriding property struts.configuration.xml.reload - old value: false new value: true
20:41:40,240  INFO StrutsSpringObjectFactory:42 - Initializing Struts-Spring integration...
20:41:40,241  INFO SpringObjectFactory:42 - Setting autowire strategy to name
20:41:40,241  INFO StrutsSpringObjectFactory:42 - ... initialized Struts-Spring integration successfully
十月 01, 2018 8:41:40 下午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["http-nio-8080"]
十月 01, 2018 8:41:40 下午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["ajp-nio-8009"]
十月 01, 2018 8:41:40 下午 org.apache.catalina.startup.Catalina start
信息: Server startup in 12761 ms

新的问题

  我们发现,控制台第一行出现一个警告:

  十月 01, 2018 8:41:27 下午 org.apache.tomcat.util.digester.SetPropertiesRule begin
  警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property ‘source‘ to ‘org.eclipse.jst.jee.server:bos19‘ did not find a matching property.

问题原因

   这是因为我们在eclipse下,通过tomcat部署web工程时,tomcat的配置文件server.xml中会自动生成一个关于该web工程的配置信息,类似于下面的东西:

  xml代码:
<Context docBase="webPoject" path="/webProject" reloadable="true" source="org.eclipse.jst.jee.server:webProject"/> 

  而默认情况下,server.xml的 Context元素不支持名称为source的属性,所以会发出警告。

解决办法

  关闭tomcat,双击eclipse下tomcat服务器,在出来的 Tomcat server at localhost 页面中找到 Server Options 选项,选中其中的选项 ”Publish modual contexts to separat XML files“,Ctrl+s,重新启动tomcat。没有警告了!

  技术分享图片

参考链接:

  https://blog.csdn.net/jiadajing267/article/details/78957443

  https://blog.csdn.net/wearegouest/article/details/5175247

启动tomcat服务器报错:ERROR ContextLoader:307 - Context initialization failed

标签:lte   required   stdout   oca   exti   version   updating   import   collect   

原文地址:https://www.cnblogs.com/chenmingjun/p/9735862.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!