zoukankan      html  css  js  c++  java
  • Cannot create inner bean '(inner bean)#67f903b5' of typ

    严重: Context initialization failed
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'MaraService': Cannot create inner bean '(inner bean)#67f903b5' of type [com.cxf.ws.service.impl.WsMaraServiceImpl] while setting constructor argument; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name '(inner bean)#67f903b5': Unsatisfied dependency expressed through field 'maraService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'maraService': Unsatisfied dependency expressed through field 'maraMapper'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'maraMapper' defined in file [G:poWorkSpace.metadata.pluginsorg.eclipse.wst.server.core mp0wtpwebappscxfWEB-INFclassescomcxfdaoMaraMapper.class]: Cannot resolve reference to bean 'sqlSessionFactory' while setting bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in file [G:poWorkSpace.metadata.pluginsorg.eclipse.wst.server.core mp0wtpwebappscxfWEB-INFclassesspring-mybatis.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [G:poWorkSpace.metadata.pluginsorg.eclipse.wst.server.core mp0wtpwebappscxfWEB-INFclassesmapperMastMapper.xml]'; nested exception is org.apache.ibatis.builder.BuilderException: Error creating document instance.  Cause: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 39; 文件提前结束。
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:313)
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:129)
        at org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:634)
        at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:145)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1193)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1095)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761)
        at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:866)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542)
        at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:443)
        at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:325)
        at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5118)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5634)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1571)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1561)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)

    解决方法:①检查service层是否有@Service("XXX");

    http://blog.csdn.net/zzg1229059735/article/details/51320218

  • 相关阅读:
    【BZOJ】1671: [Usaco2005 Dec]Knights of Ni 骑士(bfs)
    【BZOJ】1689: [Usaco2005 Open] Muddy roads 泥泞的路(贪心)
    Maven使用
    上传图片
    Model、ModelMap和ModelAndView的使用详解
    Spring MVC 基于AnnotationFormatterFactory接口实现自定义的规则
    mybatis 分页插件PageHelper的简单使用
    Mybatis 自动生成mapper文件
    Tomcat部署时war和war exploded区别以及平时踩得坑
    springMVC @response 中文乱码解决
  • 原文地址:https://www.cnblogs.com/Snowfun/p/8427575.html
Copyright © 2011-2022 走看看