myecipse maven spring mvc webapp 不能启动

陈诒亮 发布于 2017/06/24 11:53
阅读 260
收藏 0

开源之夏第三届火热来袭,高校学生参与赢万元奖金!>>>

我用MyEclipse 2017创建了一个Maven Spring MVC webapp,但是始终不能启动,实在想不明白,开发环境:MyEclipse 2017 + jdk1.7.80 + tomcat8.0.41,

另外 MyEclipse 2017 + jdk1.8.131 + tomcoat8.5也试过,也不行!

日志如下:

六月 24, 2017 11:47:07 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server version:        Apache Tomcat/8.0.41
六月 24, 2017 11:47:07 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server built:          Jan 18 2017 22:19:39 UTC
六月 24, 2017 11:47:07 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server number:         8.0.41.0
六月 24, 2017 11:47:07 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Name:               Windows 8.1
六月 24, 2017 11:47:07 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Version:            6.3
六月 24, 2017 11:47:07 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Architecture:          amd64
六月 24, 2017 11:47:07 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Java Home:             C:\Program Files\Java\jdk1.7.0_80\jre
六月 24, 2017 11:47:07 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Version:           1.7.0_80-b15
六月 24, 2017 11:47:07 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Vendor:            Oracle Corporation
六月 24, 2017 11:47:07 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_BASE:         D:\Program Files\Tomcat\apache-tomcat-8.0.41
六月 24, 2017 11:47:07 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_HOME:         D:\Program Files\Tomcat\apache-tomcat-8.0.41
六月 24, 2017 11:47:07 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.base=D:\Program Files\Tomcat\apache-tomcat-8.0.41
六月 24, 2017 11:47:07 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.home=D:\Program Files\Tomcat\apache-tomcat-8.0.41
六月 24, 2017 11:47:07 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dwtp.deploy=D:\Program Files\Tomcat\apache-tomcat-8.0.41\webapps
六月 24, 2017 11:47:07 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Djava.endorsed.dirs=D:\Program Files\Tomcat\apache-tomcat-8.0.41\endorsed
六月 24, 2017 11:47:07 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Djava.library.path=C:\Program Files\Java\jdk1.7.0_80\bin;D:\Program Files\Tomcat\apache-tomcat-8.0.41\bin
六月 24, 2017 11:47:07 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dfile.encoding=UTF-8
六月 24, 2017 11:47:07 上午 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.7.0_80\bin;D:\Program Files\Tomcat\apache-tomcat-8.0.41\bin
六月 24, 2017 11:47:07 上午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["http-nio-8080"]
六月 24, 2017 11:47:07 上午 org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
信息: Using a shared selector for servlet write/read
六月 24, 2017 11:47:07 上午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["ajp-nio-8009"]
六月 24, 2017 11:47:07 上午 org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
信息: Using a shared selector for servlet write/read
六月 24, 2017 11:47:07 上午 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 934 ms
六月 24, 2017 11:47:07 上午 org.apache.catalina.core.StandardService startInternal
信息: Starting service Catalina
六月 24, 2017 11:47:07 上午 org.apache.catalina.core.StandardEngine startInternal
信息: Starting Servlet Engine: Apache Tomcat/8.0.41
六月 24, 2017 11:47:07 上午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory D:\Program Files\Tomcat\apache-tomcat-8.0.41\webapps\docs
六月 24, 2017 11:47:28 上午 org.apache.catalina.util.SessionIdGeneratorBase createSecureRandom
信息: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [20,828] milliseconds.
六月 24, 2017 11:47:28 上午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory D:\Program Files\Tomcat\apache-tomcat-8.0.41\webapps\docs has finished in 21,410 ms
六月 24, 2017 11:47:28 上午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory D:\Program Files\Tomcat\apache-tomcat-8.0.41\webapps\examples
六月 24, 2017 11:47:29 上午 org.apache.catalina.core.ApplicationContext log
信息: ContextListener: contextInitialized()
六月 24, 2017 11:47:29 上午 org.apache.catalina.core.ApplicationContext log
信息: SessionListener: contextInitialized()
六月 24, 2017 11:47:29 上午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory D:\Program Files\Tomcat\apache-tomcat-8.0.41\webapps\examples has finished in 560 ms
六月 24, 2017 11:47:29 上午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory D:\Program Files\Tomcat\apache-tomcat-8.0.41\webapps\host-manager
六月 24, 2017 11:47:29 上午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory D:\Program Files\Tomcat\apache-tomcat-8.0.41\webapps\host-manager has finished in 39 ms
六月 24, 2017 11:47:29 上午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory D:\Program Files\Tomcat\apache-tomcat-8.0.41\webapps\manager
六月 24, 2017 11:47:29 上午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory D:\Program Files\Tomcat\apache-tomcat-8.0.41\webapps\manager has finished in 32 ms
六月 24, 2017 11:47:29 上午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory D:\Program Files\Tomcat\apache-tomcat-8.0.41\webapps\ROOT
六月 24, 2017 11:47:29 上午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory D:\Program Files\Tomcat\apache-tomcat-8.0.41\webapps\ROOT has finished in 27 ms
六月 24, 2017 11:47:29 上午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory D:\Program Files\Tomcat\apache-tomcat-8.0.41\webapps\springmvcwebappplicationsample
六月 24, 2017 11:47:30 上午 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.
六月 24, 2017 11:47:30 上午 org.apache.catalina.core.ApplicationContext log
信息: No Spring WebApplicationInitializer types detected on classpath
六月 24, 2017 11:47:30 上午 org.apache.catalina.core.ApplicationContext log
信息: Initializing Spring root WebApplicationContext
六月 24, 2017 11:47:30 上午 org.springframework.web.context.ContextLoader initWebApplicationContext
信息: Root WebApplicationContext: initialization started
六月 24, 2017 11:47:31 上午 org.springframework.context.support.AbstractApplicationContext prepareRefresh
信息: Refreshing Root WebApplicationContext: startup date [Sat Jun 24 11:47:31 CST 2017]; root of context hierarchy
六月 24, 2017 11:47:31 上午 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
信息: Loading XML bean definitions from class path resource [META-INF/spring/applicationContext.xml]
六月 24, 2017 11:47:31 上午 org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider registerDefaultFilters
信息: JSR-250 'javax.annotation.ManagedBean' found and supported for component scanning
六月 24, 2017 11:47:31 上午 org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider registerDefaultFilters
信息: JSR-250 'javax.annotation.ManagedBean' found and supported for component scanning
六月 24, 2017 11:47:31 上午 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
信息: Loading XML bean definitions from class path resource [META-INF/spring/infrastructure.xml]
六月 24, 2017 11:47:31 上午 org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons
信息: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@60204144: defining beans [org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,memberDaoImpl,org.springframework.aop.config.internalAutoProxyCreator,org.springframework.transaction.annotation.AnnotationTransactionAttributeSource#0,org.springframework.transaction.interceptor.TransactionInterceptor#0,org.springframework.transaction.config.internalTransactionAdvisor,entityManagerFactory,entityManager,dataSource,transactionManager,org.springframework.context.annotation.ConfigurationClassPostProcessor.importAwareProcessor]; root of factory hierarchy
六月 24, 2017 11:47:31 上午 org.springframework.web.context.ContextLoader initWebApplicationContext
严重: Context initialization failed
java.lang.NoClassDefFoundError: javax/persistence/criteria/Selection
	at java.lang.Class.getDeclaredConstructors0(Native Method)
	at java.lang.Class.privateGetDeclaredConstructors(Class.java:2595)
	at java.lang.Class.getDeclaredConstructors(Class.java:1914)
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.determineCandidateConstructors(AutowiredAnnotationBeanPostProcessor.java:230)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineConstructorsFromBeanPostProcessors(AbstractAutowireCapableBeanFactory.java:978)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:951)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:490)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
	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:4853)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5314)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:753)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:729)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
	at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1092)
	at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1834)
	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)
Caused by: java.lang.ClassNotFoundException: javax.persistence.criteria.Selection
	at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1333)
	at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1167)
	... 31 more
六月 24, 2017 11:47:31 上午 org.apache.catalina.core.StandardContext listenerStart
严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
java.lang.NoClassDefFoundError: javax/persistence/criteria/Selection
	at java.lang.Class.getDeclaredConstructors0(Native Method)
	at java.lang.Class.privateGetDeclaredConstructors(Class.java:2595)
	at java.lang.Class.getDeclaredConstructors(Class.java:1914)
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.determineCandidateConstructors(AutowiredAnnotationBeanPostProcessor.java:230)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineConstructorsFromBeanPostProcessors(AbstractAutowireCapableBeanFactory.java:978)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:951)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:490)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
	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:4853)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5314)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:753)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:729)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
	at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1092)
	at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1834)
	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)
Caused by: java.lang.ClassNotFoundException: javax.persistence.criteria.Selection
	at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1333)
	at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1167)
	... 31 more
六月 24, 2017 11:47:31 上午 org.apache.catalina.core.StandardContext startInternal
严重: One or more listeners failed to start. Full details will be found in the appropriate container log file
六月 24, 2017 11:47:31 上午 org.apache.catalina.core.StandardContext startInternal
严重: Context [/springmvcwebappplicationsample] startup failed due to previous errors
六月 24, 2017 11:47:31 上午 org.apache.catalina.core.ApplicationContext log
信息: Closing Spring root WebApplicationContext
六月 24, 2017 11:47:31 上午 org.springframework.context.support.AbstractApplicationContext doClose
信息: Closing Root WebApplicationContext: startup date [Sat Jun 24 11:47:31 CST 2017]; root of context hierarchy
六月 24, 2017 11:47:31 上午 org.springframework.context.support.AbstractApplicationContext doClose
警告: 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 [Sat Jun 24 11:47:31 CST 2017]; 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:558)
	at org.springframework.web.context.ContextLoaderListener.contextDestroyed(ContextLoaderListener.java:143)
	at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4900)
	at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5537)
	at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:221)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:149)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:753)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:729)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
	at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1092)
	at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1834)
	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)
六月 24, 2017 11:47:31 上午 org.springframework.beans.factory.support.DefaultSingletonBeanRegistry destroySingletons
信息: Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@60204144: defining beans [org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,memberDaoImpl,org.springframework.aop.config.internalAutoProxyCreator,org.springframework.transaction.annotation.AnnotationTransactionAttributeSource#0,org.springframework.transaction.interceptor.TransactionInterceptor#0,org.springframework.transaction.config.internalTransactionAdvisor,entityManagerFactory,entityManager,dataSource,transactionManager,org.springframework.context.annotation.ConfigurationClassPostProcessor.importAwareProcessor]; root of factory hierarchy
六月 24, 2017 11:47:31 上午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory D:\Program Files\Tomcat\apache-tomcat-8.0.41\webapps\springmvcwebappplicationsample has finished in 2,202 ms
六月 24, 2017 11:47:31 上午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["http-nio-8080"]
六月 24, 2017 11:47:31 上午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["ajp-nio-8009"]
六月 24, 2017 11:47:31 上午 org.apache.catalina.startup.Catalina start
信息: Server startup in 24336 ms

 

 

加载中
1
若离x
若离x

楼主给力啊,我也出现了这个问题,按你的写的顺利解决了

0
子龙哟哟哟
子龙哟哟哟

jar包不对,有可能版本或者是冲突?反正排查一下

陈诒亮
陈诒亮
不是,已经解决,还真有点麻烦!!
0
陈诒亮
陈诒亮
陈诒亮
回复 @Nanette : 已经重新开放了
Nanette
Nanette
您好,我也遇到这个问题了,请问怎么解决的,这个网址打不开了,谢谢您
0
大东Daniel
大东Daniel

IDE 自己选了比较 low 的jdk吧

OSCHINA
登录后可查看更多优质内容
返回顶部
顶部
返回顶部
顶部