2010-5-14 15:28:44 org.springframework.context.support.AbstractApplicationContext prepareRefresh
信息: Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@10b4b2f: display name [org.springframework.context.support.ClassPathXmlApplicationContext@10b4b2f]; startup date [Fri May 14 15:28:44 CST 2010]; root of context hierarchy
2010-5-14 15:28:44 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
信息: Loading XML bean definitions from class path resource [applicationContext.xml]
2010-5-14 15:28:44 org.springframework.context.support.AbstractApplicationContext obtainFreshBeanFactory
信息: Bean factory for application context [org.springframework.context.support.ClassPathXmlApplicationContext@10b4b2f]: org.springframework.beans.factory.support.DefaultListableBeanFactory@e0a386
2010-5-14 15:28:44 org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons
信息: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@e0a386: defining beans [org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.aop.config.internalAutoProxyCreator,userAction,logInterceptor,dao,service]; root of factory hierarchy
2010-5-14 15:28:44 org.springframework.beans.factory.support.DefaultSingletonBeanRegistry destroySingletons
信息: Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@e0a386: defining beans [org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.aop.config.internalAutoProxyCreator,userAction,logInterceptor,dao,service]; root of factory hierarchy
[size=large]Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userAction' defined in file [E:\share\reflect\myFirstSpring2.5-aop-annotation-commpent\bin\com\ouyang\action\UserAction.class]: BeanPostProcessor before instantiation of bean failed; nested exception is java.lang.NullPointerException[/size] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:405)
at java.security.AccessController.doPrivileged(Native Method)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
at org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:139)
at org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:83)
at com.ouyang.action.testAction.testBefore(testAction.java:15)
at com.ouyang.action.testAction.main(testAction.java:40)
在spring aop测试程序中中出现这样的错误不知道怎么解决?其他的没有错,就是老是抛NullPointerException 急
- 写回答
- 好问题 0 提建议
- 追加酬金
- 关注问题
- 邀请回答
-
2条回答 默认 最新
- qwe_rt 2010-05-15 16:42关注
请把UserAction.java以及相关的配置文件贴出来~
本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报