1、错误描述
INFO:2015-05-0111:12:15[localhost-startStop-1] - Root WebApplicationContext: initializationstarted
INFO:2015-05-01 11:12:15[localhost-startStop-1] - Refreshing RootWebApplicationContext: startup date [Fri May 01 11:12:15 CST 2015]; root ofcontext hierarchy
INFO:2015-05-01 11:12:15[localhost-startStop-1] - Loading XML bean definitionsfrom class path resource [applicationContext.xml]
INFO:2015-05-01 11:12:15[localhost-startStop-1] - Loading properties file fromclass path resource [hibernate.mysql.properties]
WARN:2015-05-01 11:12:16[localhost-startStop-1] - Exception encountered duringcontext initialization - cancelling refreshattempt
org.springframework.beans.factory.BeanCreationException: Error creating beanwith name 'org.springframework.aop.config.internalAutoProxyCreator':Instantiation of bean failed; nested exception isorg.springframework.beans.BeanInstantiationException: Could not instantiatebean class [org.springframework.aop.aspectj.annotation.AnnotationAwareAspectJAutoProxyCreator]:Constructor threw exception; nested exception isjava.lang.NoClassDefFoundError:org/aspectj/lang/annotation/Around
atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1095)
atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1040)
atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:505)
atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
atorg.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:302)
atorg.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:229)
atorg.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:298)
atorg.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:198)
atorg.springframework.context.support.PostProcessorRegistrationDelegate.registerBeanPostProcessors(PostProcessorRegistrationDelegate.java:220)
atorg.springframework.context.support.AbstractApplicationContext.registerBeanPostProcessors(AbstractApplicationContext.java:615)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:465)
atorg.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403)
atorg.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
atorg.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)
atorg.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4994)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5492)
atorg.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
atorg.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
atorg.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
atorg.apache.catalina.core.StandardHost.addChild(StandardHost.java:649)
atorg.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1245)
atorg.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1895)
atjava.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
atjava.util.concurrent.FutureTask.run(FutureTask.java:262)
atjava.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
atjava.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
atjava.lang.Thread.run(Thread.java:745)
Caused by: org.springframework.beans.BeanInstantiationException: Could notinstantiate bean class[org.springframework.aop.aspectj.annotation.AnnotationAwareAspectJAutoProxyCreator]:Constructor threw exception; nested exception isjava.lang.NoClassDefFoundError: org/aspectj/lang/annotation/Around
atorg.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:163)
atorg.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:89)
atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1088)
... 26 more
Caused by: java.lang.NoClassDefFoundError:org/aspectj/lang/annotation/Around
atorg.springframework.aop.aspectj.annotation.ReflectiveAspectJAdvisorFactory.<clinit>(ReflectiveAspectJAdvisorFactory.java:74)
atorg.springframework.aop.aspectj.annotation.AnnotationAwareAspectJAutoProxyCreator.<init>(AnnotationAwareAspectJAutoProxyCreator.java:53)
atsun.reflect.NativeConstructorAccessorImpl.newInstance0(NativeMethod)
atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
atjava.lang.reflect.Constructor.newInstance(Constructor.java:526)
atorg.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:147)
... 28 more
Caused by: java.lang.ClassNotFoundException:org.aspectj.lang.annotation.Around
atorg.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1720)
atorg.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571)
... 35more
ERROR:2015-05-01 11:12:16[localhost-startStop-1] - Context initializationfailed
org.springframework.beans.factory.BeanCreationException: Error creating beanwith name 'org.springframework.aop.config.internalAutoProxyCreator':Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException:Could not instantiate bean class[org.springframework.aop.aspectj.annotation.AnnotationAwareAspectJAutoProxyCreator]:Constructor threw exception; nested exception isjava.lang.NoClassDefFoundError: org/aspectj/lang/annotation/Around
atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1095)
atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1040)
atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:505)
atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
atorg.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:302)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:229)
atorg.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:298)
atorg.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:198)
atorg.springframework.context.support.PostProcessorRegistrationDelegate.registerBeanPostProcessors(PostProcessorRegistrationDelegate.java:220)
atorg.springframework.context.support.AbstractApplicationContext.registerBeanPostProcessors(AbstractApplicationContext.java:615)
atorg.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:465)
atorg.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403)
atorg.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
atorg.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4994)
atorg.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5492)
atorg.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
atorg.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
atorg.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
atorg.apache.catalina.core.StandardHost.addChild(StandardHost.java:649)
atorg.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1245)
atorg.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1895)
atjava.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
atjava.util.concurrent.FutureTask.run(FutureTask.java:262)
atjava.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
atjava.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
atjava.lang.Thread.run(Thread.java:745)
Caused by: org.springframework.beans.BeanInstantiationException: Could notinstantiate bean class[org.springframework.aop.aspectj.annotation.AnnotationAwareAspectJAutoProxyCreator]:Constructor threw exception; nested exception isjava.lang.NoClassDefFoundError:org/aspectj/lang/annotation/Around
atorg.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:163)
atorg.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:89)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1088)
... 26 more
Caused by: java.lang.NoClassDefFoundError: org/aspectj/lang/annotation/Around
atorg.springframework.aop.aspectj.annotation.ReflectiveAspectJAdvisorFactory.<clinit>(ReflectiveAspectJAdvisorFactory.java:74)
atorg.springframework.aop.aspectj.annotation.AnnotationAwareAspectJAutoProxyCreator.<init>(AnnotationAwareAspectJAutoProxyCreator.java:53)
atsun.reflect.NativeConstructorAccessorImpl.newInstance0(NativeMethod)
atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
atjava.lang.reflect.Constructor.newInstance(Constructor.java:526)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:147)
... 28 more
Caused by: java.lang.ClassNotFoundException:org.aspectj.lang.annotation.Around
atorg.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1720)
atorg.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571)
... 35 more
五月 01, 2015 11:12:16 上午 org.apache.catalina.core.StandardContextlistenerStart
严重: Exception sending context initialized event to listener instance of classorg.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating beanwith name 'org.springframework.aop.config.internalAutoProxyCreator':Instantiation of bean failed; nested exception isorg.springframework.beans.BeanInstantiationException: Could not instantiatebean class[org.springframework.aop.aspectj.annotation.AnnotationAwareAspectJAutoProxyCreator]:Constructor threw exception; nested exception isjava.lang.NoClassDefFoundError: org/aspectj/lang/annotation/Around
atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1095)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1040)
atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:505)
atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
atorg.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:302)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:229)
atorg.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:298)
atorg.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:198)
atorg.springframework.context.support.PostProcessorRegistrationDelegate.registerBeanPostProcessors(PostProcessorRegistrationDelegate.java:220)
atorg.springframework.context.support.AbstractApplicationContext.registerBeanPostProcessors(AbstractApplicationContext.java:615)
atorg.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:465)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403)
atorg.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
atorg.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)
atorg.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4994)
atorg.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5492)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
atorg.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
atorg.apache.catalina.core.StandardHost.addChild(StandardHost.java:649)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1245)
atorg.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1895)
atjava.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
atjava.util.concurrent.FutureTask.run(FutureTask.java:262)
atjava.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
atjava.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
atjava.lang.Thread.run(Thread.java:745)
Caused by: org.springframework.beans.BeanInstantiationException: Could notinstantiate bean class[org.springframework.aop.aspectj.annotation.AnnotationAwareAspectJAutoProxyCreator]:Constructor threw exception; nested exception isjava.lang.NoClassDefFoundError:org/aspectj/lang/annotation/Around
atorg.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:163)
atorg.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:89)
atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1088)
... 26 more
Caused by: java.lang.NoClassDefFoundError: org/aspectj/lang/annotation/Around
atorg.springframework.aop.aspectj.annotation.ReflectiveAspectJAdvisorFactory.<clinit>(ReflectiveAspectJAdvisorFactory.java:74)
at org.springframework.aop.aspectj.annotation.AnnotationAwareAspectJAutoProxyCreator.<init>(AnnotationAwareAspectJAutoProxyCreator.java:53)
atsun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
atjava.lang.reflect.Constructor.newInstance(Constructor.java:526)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:147)
... 28 more
Caused by: java.lang.ClassNotFoundException:org.aspectj.lang.annotation.Around
atorg.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1720)
atorg.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571)
... 35 more
五月 01, 2015 11:12:16 上午 com.sun.faces.config.ConfigureListenercontextInitialized
信息: 初始化上下文 '/SpringMVCH' 的 Mojarra 2.0.3 (FCS b03)
五月 01, 2015 11:12:16 上午 com.sun.faces.spi.InjectionProviderFactorycreateInstance
信息: JSF1048:有 PostConstruct/PreDestroy 注释。标有这些注释的 ManagedBeans方法将表示注释已处理。
五月 01, 2015 11:12:17 上午 org.apache.catalina.core.StandardContextstartInternal
严重: Error listenerStart
五月 01, 2015 11:12:17 上午 org.apache.catalina.core.StandardContextstartInternal
严重: Context [/SpringMVCH] startup failed due to previous errors
五月 01, 2015 11:12:17 上午 org.apache.catalina.core.ApplicationContextlog
信息: Closing Spring root WebApplicationContext
五月 01, 2015 11:12:17 上午 org.apache.catalina.loader.WebappClassLoadercheckThreadLocalMapForLeaks
严重: The web application [/SpringMVCH] created a ThreadLocal with key of type[com.sun.faces.util.Util$1] (value [com.sun.faces.util.Util$1@51f16da]) and avalue of type [java.util.HashMap] (value [{com.sun.faces.patternCache={ = }}])but failed to remove it when the web application was stopped. Threads are goingto be renewed
2、错误原因
缺少“aspectjrt.jar”
3、解决办法
将“aspectjrt.jar”导入到lib目录下