码迷,mamicode.com
首页 > 编程语言 > 详细

Spring Error BeanDefinitionStoreException: IOException parsing XML document from class path resource *

时间:2020-09-21 12:02:35      阅读:53      评论:0      收藏:0      [点我收藏+]

标签:resource   artifact   lte   方案   expr   sso   director   factory   includes   

org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [applicationContext.xml];
nested exception is com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException Exception encountered during context initialization
- cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating
bean with name ‘userService‘ defined in class path resource [applicationContext.xml]: BeanPostProcessor before instantiation of bean failed; nested exception
is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#0‘:
Cannot resolve reference to bean ‘pointcut‘ while setting bean property ‘pointcut‘; nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name ‘pointcut‘: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate
[org.springframework.aop.aspectj.AspectJExpressionPointcut]: No default constructor found; nested exception is java.lang.NoClassDefFoundError:
org/aspectj/weaver/reflect/ReflectionWorld$ReflectionWorldException org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘userService‘ defined in class path resource [applicationContext.xml]:
BeanPostProcessor before instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name
‘org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#0‘: Cannot resolve reference to bean ‘pointcut‘ while setting bean property ‘pointcut‘; nested
exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘pointcut‘: Instantiation of bean failed; nested exception is
org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.aop.aspectj.AspectJExpressionPointcut]: No default constructor found;
nested exception is java.lang.NoClassDefFoundError: org/aspectj/weaver/reflect/ReflectionWorld$ReflectionWorldException

从这段异常中翻译可以看到它大概说无法解析***.xml

解决方案

检查有没有导入包,

maven 导入

    <dependency>
            <groupId>org.aspectj</groupId>
            <artifactId>aspectjweaver</artifactId>
            <version>1.9.6</version>
        </dependency>

如果导入并且你的项目是子项目,请检查父项目中有没有共享文件配置

<build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <includes>
                    <include>**/*.properties</include>
                    <include>**/*.xml</include>
                </includes>
                <filtering>true</filtering>
            </resource>
            <resource>
                <directory>src/main/java</directory>
                <includes>
                    <include>**/*.properties</include>
                    <include>**/*.xml</include>
                </includes>
                <filtering>true</filtering>
            </resource>
        </resources>

 

Spring Error BeanDefinitionStoreException: IOException parsing XML document from class path resource *

标签:resource   artifact   lte   方案   expr   sso   director   factory   includes   

原文地址:https://www.cnblogs.com/wanghwei/p/13694083.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!