ssh 工程启动的时候报错

khtnly 2011-03-06 11:31:45
各位大侠,这种错误一般是什么原因啊,小弟初用ssh。多谢指教
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator#0' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: org/aopalliance/intercept/MethodInterceptor
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:965)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:911)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
at org.springframework.context.support.AbstractApplicationContext.registerBeanPostProcessors(AbstractApplicationContext.java:710)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:410)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4205)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4704)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1079)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1002)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:506)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1315)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1061)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
at org.apache.catalina.core.StandardService.start(StandardService.java:525)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: org/aopalliance/intercept/MethodInterceptor
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:141)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:74)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:958)
... 36 more
Caused by: java.lang.NoClassDefFoundError: org/aopalliance/intercept/MethodInterceptor
at org.springframework.aop.framework.adapter.DefaultAdvisorAdapterRegistry.<init>(DefaultAdvisorAdapterRegistry.java:49)
at org.springframework.aop.framework.adapter.GlobalAdvisorAdapterRegistry.<clinit>(GlobalAdvisorAdapterRegistry.java:31)
at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.<init>(AbstractAutoProxyCreator.java:118)
at org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator.<init>(BeanNameAutoProxyCreator.java:45)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:126)
... 38 more
Caused by: java.lang.ClassNotFoundException: org.aopalliance.intercept.MethodInterceptor
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:316)
... 47 more
2011-3-6 11:13:18 org.apache.catalina.core.StandardContext listenerStart
严重: The web application [/netdisk] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
2011-3-6 11:13:20 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory ROOT
2011-3-6 11:13:20 org.apache.coyote.http11.Http11AprProtocol start
信息: Starting Coyote HTTP/1.1 on http-8080
2011-3-6 11:13:20 org.apache.coyote.ajp.AjpAprProtocol start
信息: Starting Coyote AJP/1.3 on ajp-8009
2011-3-6 11:13:20 org.apache.catalina.startup.Catalina start
信息: Server startup in 29901 ms
...全文
202 8 点赞 打赏 收藏 举报
写回复
8 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
Trac 2011-03-08
你没有导入aop的包
  • 打赏
  • 举报
回复
cnqing 2011-03-08
[Quote=引用 7 楼 chevalier_jack 的回复:]
Caused by: java.lang.NoClassDefFoundError:org/aopalliance/intercept/MethodInterceptor
注意这个

导入aopalliance.jar

在“SPRING_HOME\spring-framework-2.5.6\lib\aopalliance”这个位置
[/Quote]

就是这个原因了
  • 打赏
  • 举报
回复
CoffeeStyle 2011-03-08
Caused by: java.lang.NoClassDefFoundError:org/aopalliance/intercept/MethodInterceptor
注意这个

导入aopalliance.jar

在“SPRING_HOME\spring-framework-2.5.6\lib\aopalliance”这个位置
  • 打赏
  • 举报
回复
ETCentury 2011-03-08
用AOP,那就要导入相应的包哦
  • 打赏
  • 举报
回复
ginni215 2011-03-08
看错误信息:nested exception is java.lang.NoClassDefFoundError: org/aopalliance/intercept/MethodInterceptor

很明显啊,提示org/aopalliance/intercept/MethodInterceptor类没有找到,
而这个类就在aopalliance.jar包里面,加载到项目里面就行了~
  • 打赏
  • 举报
回复
沐希 2011-03-08
就AOP对应的包没有导入。
  • 打赏
  • 举报
回复
zuxianghuang 2011-03-06
你在spring里建的bean出错了,
  • 打赏
  • 举报
回复
相关推荐
发帖
Web 开发
创建于2007-09-28

8.0w+

社区成员

Java Web 开发
申请成为版主
帖子事件
创建了帖子
2011-03-06 11:31
社区公告
暂无公告