问题描述
org.springframework.beans.factory.BeanCreationException:Errorcreatingbeanwithname'MetaRepClassAnalyseService'definedinServletContextresource[/WEB-INF/spring/xfire/Services.xml]:Cannotresolvereferencetobean'metaRepClassAnalyseService'whilesettingbeanproperty'serviceBean';nestedexceptionisorg.springframework.beans.factory.BeanCreationException:Errorcreatingbeanwithname'metaRepClassAnalyseService'definedinServletContextresource[/WEB-INF/spring/service/service-meta.xml]:Cannotresolvereferencetobean'metaRepClassDao'whilesettingbeanproperty'metaRepClassDao';nestedexceptionisorg.springframework.beans.factory.BeanCreationException:Errorcreatingbeanwithname'metaRepClassDao'definedinServletContextresource[/WEB-INF/spring/dao/dao-meta.xml]:Cannotresolvereferencetobean'sqlMapClient'whilesettingbeanproperty'sqlMapClient';nestedexceptionisorg.springframework.beans.factory.BeanCreationException:Errorcreatingbeanwithname'sqlMapClient'definedinServletContextresource[/WEB-INF/spring/applicationContext.xml]:Invocationofinitmethodfailed;nestedexceptionisorg.springframework.core.NestedIOException:Failedtoparsemappingresource:file[D:Tomcat6.0webappsprodmanageWEB-INFclassescomdatainfodaosqlmodulesqlaSqlcategory.xml];nestedexceptioniscom.ibatis.common.xml.NodeletException:ErrorparsingXML.Cause:java.lang.RuntimeException:ErrorparsingXPath'/sqlMap/delete'.Cause:com.ibatis.sqlmap.client.SqlMapException:Thereisalreadyastatementnamedsqla.deletesqlacategoryinthisSqlMap.atorg.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:275)atorg.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104)atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245)atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)atjava.security.AccessController.doPrivileged(NativeMethod)atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)atorg.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)atorg.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)atorg.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)atorg.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)atorg.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)atorg.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)atorg.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)atorg.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)atorg.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)atorg.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)atorg.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)atorg.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3972)atorg.apache.catalina.core.StandardContext.start(StandardContext.java:4467)atorg.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)atorg.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)atorg.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)atorg.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1041)atorg.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:964)atorg.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:502)atorg.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)atorg.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)atorg.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)atorg.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)atorg.apache.catalina.core.StandardHost.start(StandardHost.java:785)atorg.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)atorg.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)atorg.apache.catalina.core.StandardService.start(StandardService.java:519)atorg.apache.catalina.core.StandardServer.start(StandardServer.java:710)atorg.apache.catalina.startup.Catalina.start(Catalina.java:581)atsun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)atsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)atsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)atjava.lang.reflect.Method.invoke(Method.java:597)atorg.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)atorg.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
解决方案
解决方案二:
配置文件出错
解决方案三:
Errorcreatingbeanwithname'MetaRepClassAnalyseService'definedinServletContextresource[/WEB-INF/spring/xfire/Services.xml]:Cannotresolvereferencetobean'metaRepClassAnalyseService'whilesettingbeanproperty'serviceBean';关键词:MetaRepClassAnalyseService,[/WEB-INF/spring/xfire/Services.xml]:,serviceBean上你的配置文件[/WEB-INF/spring/xfire/Services.xml]:,里看看这两个哪错了
解决方案四:
好好检查配置文件吧
解决方案五:
英文好编程是一种优势!..很显然。你可不过关.!
解决方案六:
我英语就没过级,不要让我丢人现眼了
解决方案七:
实体映射文件有错误,无法解析
解决方案八:
这个与英语好没关系,spring的配置文件有问题查查那个名称写错了
解决方案九:
"spring的配置文件有问题查查那个名称写错了"正解
解决方案十:
Cannotresolvereferencetobean'metaRepClassAnalyseService'whilesettingbeanproperty'serviceBean'多清楚啊,无法创建MetaRepClassAnalyseService,原因是它引用的serviceBean没有正确的set进去。估计是你的serviceBean配置名称不对,要不就是class路径错误
解决方案十一:
配置文件有问题,解决问题应该从后向前倒着找,先从这句话开始找问题,Cause:java.lang.RuntimeException:ErrorparsingXPath'/sqlMap/delete'.Cause:com.ibatis.sqlmap.client.SqlMapException:Thereisalreadyastatementnamedsqla.deletesqlacategoryinthisSqlMap.貌似是有重名的配置,先检查这个然后一步一步向上检查,可能就是这一个问题造成的?也有可能还有其他问题并存?没有配置文件代码,没法替你检查,自己慢慢找吧。
解决方案十二:
MetaRepClassAnalyseService有接口吗,有的话把接口去掉试试