myecipse maven spring mvc webapp 不能启动
我用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 FilesJavajdk1.7.0_80jre
六月 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 FilesTomcatapache-tomcat-8.0.41
六月 24, 2017 11:47:07 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_HOME: D:Program FilesTomcatapache-tomcat-8.0.41
六月 24, 2017 11:47:07 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.base=D:Program FilesTomcatapache-tomcat-8.0.41
六月 24, 2017 11:47:07 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.home=D:Program FilesTomcatapache-tomcat-8.0.41
六月 24, 2017 11:47:07 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dwtp.deploy=D:Program FilesTomcatapache-tomcat-8.0.41webapps
六月 24, 2017 11:47:07 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Djava.endorsed.dirs=D:Program FilesTomcatapache-tomcat-8.0.41endorsed
六月 24, 2017 11:47:07 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Djava.library.path=C:Program FilesJavajdk1.7.0_80bin;D:Program FilesTomcatapache-tomcat-8.0.41bin
六月 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 FilesJavajdk1.7.0_80bin;D:Program FilesTomcatapache-tomcat-8.0.41bin
六月 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 FilesTomcatapache-tomcat-8.0.41webappsdocs
六月 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 FilesTomcatapache-tomcat-8.0.41webappsdocs has finished in 21,410 ms
六月 24, 2017 11:47:28 上午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory D:Program FilesTomcatapache-tomcat-8.0.41webappsexamples
六月 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 FilesTomcatapache-tomcat-8.0.41webappsexamples has finished in 560 ms
六月 24, 2017 11:47:29 上午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory D:Program FilesTomcatapache-tomcat-8.0.41webappshost-manager
六月 24, 2017 11:47:29 上午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory D:Program FilesTomcatapache-tomcat-8.0.41webappshost-manager has finished in 39 ms
六月 24, 2017 11:47:29 上午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory D:Program FilesTomcatapache-tomcat-8.0.41webappsmanager
六月 24, 2017 11:47:29 上午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory D:Program FilesTomcatapache-tomcat-8.0.41webappsmanager has finished in 32 ms
六月 24, 2017 11:47:29 上午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory D:Program FilesTomcatapache-tomcat-8.0.41webappsROOT
六月 24, 2017 11:47:29 上午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory D:Program FilesTomcatapache-tomcat-8.0.41webappsROOT has finished in 27 ms
六月 24, 2017 11:47:29 上午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory D:Program FilesTomcatapache-tomcat-8.0.41webappsspringmvcwebappplicationsample
六月 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 FilesTomcatapache-tomcat-8.0.41webappsspringmvcwebappplicationsample 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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(7)
IDE 自己选了比较 low 的jdk吧
您好,我也遇到这个问题了,请问怎么解决的,这个网址打不开了,谢谢您
回复
已经重新开放了
解决办法:https://www.zybuluo.com/chenyiliang/note/797956
不是,已经解决,还真有点麻烦!!
jar包不对,有可能版本或者是冲突?反正排查一下
楼主给力啊,我也出现了这个问题,按你的写的顺利解决了