Exception sending context initialized ... org.springframework.web.context.ContextLoaderListener
2016-06-13 18:50
453 查看
严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from file [C:\D\apache\tomcat\apache-tomcat-7.0.69\wtpwebapps\weixinweb\WEB-INF\classes\applicationContext.xml]; nested exception is com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: 3 字节的 UTF-8 序列的字节 3 无效。 at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:410) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:336) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:304) at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:181) at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:217) at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:188) at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:125) at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:94) at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:129) at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:537) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:452) at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5068) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5584) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1572) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1562) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745)
这种情况可能是maven编译项目的编码问题,需要在pom文件中,指定build的编码:
<properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> </properties>
然后maven重新打包,clean package
相关文章推荐
- Java NIO:浅析I/O模型
- java.lang.UnsatisfiedLinkError: No implementation found for long com.autonavi.amap.mapcore.MapCore.n
- 用Java操作树莓派!pi4j简介与安装
- 调试eclipse javaEE所遇问题解决
- 断言assert引入包
- spring boot 入门
- java 反射详解通俗易懂
- eclipse工程转studio,生成build.gradle时报错:make sure all dependencies are opend
- 字符串子序列穷举(Java语言,递归算法)
- Spring MVC 上传文件(upload files)
- java的一些知识(七)
- SpringMVC学习--校验
- Spring MVC拦截器+注解方式实现防止表单重复提交
- java中间件
- Spring MVC拦截器+注解方式实现防止表单重复提交
- Android真机连接Android studio或Eclipse输出不了日志问题
- spring AOP 的几种实现方式(能测试)
- 并发编程学习总结(六) :java 显式锁ReentrantLock使用详解之测试锁与超时
- myeclipse中的js文件报错
- Java中Class对象详解、类名.class、class.forName()、 getClass()区别