Spring之恶心错误记录

阅读更多

 

我一向都认为Spring等框架软件的错误提示非常的差劲的,今天又遇到,虽然解决了,还是有些愤愤。 那些做框架、做类库的老爷们,注重设计,喜欢过度设计,满口是解放程序员工作的牛逼话,随便搞搞,一个小错,浪费程序员N多的宝贵青春。呵呵!

 

 

07-01 16:04:40.890[           BeanUtil.java:27 :ERROR]
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ipDAO': Injection of resource fields failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [org.springframework.orm.ibatis.SqlMapClientTemplate] is defined: Unsatisfied dependency of type [class org.springframework.orm.ibatis.SqlMapClientTemplate]: expected at least 1 matching bean
    at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessAfterInstantiation(CommonAnnotationBeanPostProcessor.java:293)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:957)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:470)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
    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:217)
    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:729)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:381)
    at org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:139)
    at org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:93)
    at cn.sh.flyhyp.cherry.util.BeanUtil.checkInit(BeanUtil.java:23)
    at cn.sh.flyhyp.cherry.util.BeanUtil.getAllBeanNames(BeanUtil.java:41)
    at cn.sh.flyhyp.cherry.CherryDispatcher.actionInit(CherryDispatcher.java:38)
    at cn.sh.flyhyp.cherry.CherryDispatcher.init(CherryDispatcher.java:97)
    at javax.servlet.GenericServlet.init(GenericServlet.java:212)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1172)
    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:992)
    at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4058)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4371)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
    at org.apache.catalina.core.StandardService.start(StandardService.java:516)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [org.springframework.orm.ibatis.SqlMapClientTemplate] is defined: Unsatisfied dependency of type [class org.springframework.orm.ibatis.SqlMapClientTemplate]: expected at least 1 matching bean
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:613)
    at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:423)
    at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:502)
    at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:180)
    at org.springframework.beans.factory.annotation.InjectionMetadata.injectFields(InjectionMetadata.java:105)
    at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessAfterInstantiation(CommonAnnotationBeanPostProcessor.java:290)
    ... 37 more
2009-7-1 16:04:40 org.apache.catalina.core.ApplicationContext log
严重: StandardWrapper.Throwable
java.lang.NullPointerException
    at cn.sh.flyhyp.cherry.util.BeanUtil.getAllBeanNames(BeanUtil.java:42)
    at cn.sh.flyhyp.cherry.CherryDispatcher.actionInit(CherryDispatcher.java:38)
    at cn.sh.flyhyp.cherry.CherryDispatcher.init(CherryDispatcher.java:97)
    at javax.servlet.GenericServlet.init(GenericServlet.java:212)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1172)
    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:992)
    at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4058)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4371)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
    at org.apache.catalina.core.StandardService.start(StandardService.java:516)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
2009-7-1 16:04:40 org.apache.catalina.core.StandardContext loadOnStartup
严重: Servlet /tdIpMan threw load() exception
java.lang.NullPointerException
    at cn.sh.flyhyp.cherry.util.BeanUtil.getAllBeanNames(BeanUtil.java:42)
    at cn.sh.flyhyp.cherry.CherryDispatcher.actionInit(CherryDispatcher.java:38)
    at cn.sh.flyhyp.cherry.CherryDispatcher.init(CherryDispatcher.java:97)
    at javax.servlet.GenericServlet.init(GenericServlet.java:212)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1172)
    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:992)
    at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4058)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4371)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
    at org.apache.catalina.core.StandardService.start(StandardService.java:516)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)

你可能感兴趣的:(Spring,Java,Apache,iBATIS,C)