Tomcat容器启动失败,找到 debug日志一看:

Context initialization failed

org.springframework. beans.factory.xml.XmlBeanDefinitionStoreException:Line 1 in XML document from file [spring-wlf.xml] is invalid;nested exception is org.xml.sax.SAXParseException:The processing instruction target matching "[xX][mM][1L]” is not allowed.

  回头打开spring-wlf.xml仔细看了下

  1. <?xml version="1.0" encoding="UTF-8"?>

  竟然在文件开头多了一个空格,导致识别不了文件。不得不承认,有时候问题就是这么纠结而细微:在<?xml前面有个不起眼的空格。

spring装载配置文件失败报错:org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException的更多相关文章

  1. 【spring boot】使用注解@ConfigurationProperties读取配置文件时候 报错 org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'rocketmqAutoConfiguration': Unsatisfied dependenc

    如题,配置文件如下: #注册中心配置 eureka: instance: instanceId: ${spring.application.name}:${random.int} hostname: ...

  2. org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException 前言中不允许有内容 来自类路径资源的XML文档中的第1行是无效的

    今天复习一下Spring和Hibernate的整合,遇到了一个问题,报错信息如下: org.springframework.beans.factory.xml.XmlBeanDefinitionSto ...

  3. org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException

    1.错误描述 usage: java org.apache.catalina.startup.Catalina [ -config {pathname} ] [ -nonaming ] { -help ...

  4. 用maven工具管理web项目的错误记录:org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException

    运行异常报告日志: 严重: Context initialization failedorg.springframework.beans.factory.xml.XmlBeanDefinitionSt ...

  5. org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException Line 47 in

    org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 47 in XML document from ...

  6. org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 12 in XML document from

    org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 12 in XML document from ...

  7. spring和mybatis整合报错:org.springframework.beans.MethodInvocationException: Property 'dataSource' threw exception; nested exception is java.lang.NoClassDefFoundError

    Exception in thread "main" org.springframework.beans.factory.UnsatisfiedDependencyExceptio ...

  8. Spring AOP 报错org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'XXXXXX' defined in class path resource..........

    完整报错如下: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'befo ...

  9. 报错org.springframework.beans.factory.CannotLoadBeanClassException: Error loading class [org.mybatis.spring.SqlSessionFactoryBean]

    超级大坑 org.springframework.beans.factory.CannotLoadBeanClassException: Error loading class [org.mybati ...

随机推荐

  1. 双系统下ubuntu不能访问658GB卷,磁盘挂载失败。

    win10+ubuntu双系统出现以下错误: Error mounting /dev/sda5 at /media/captain/AC8CF85B8CF8218E: Command-line `mo ...

  2. Java复习4.数组初始化.

    Java复习4.Java中的数组声明方式  20131004 1.数组声明和初始化, 数组元素和变量一样,可以在定义的时候i进行初始化.数组元素的初始化工作实在编译阶段完成的,可以减少运行时间. 在初 ...

  3. SpringBoot全家桶

    前言 Spring简化了Java的开发,而SpringBoot简化了Spring.本文用SpringBoot采用分层的结构整合了filter,aspect,mybaits,logback,redis, ...

  4. UML_04_时序图

    一.前言 时序图建模工具,推荐一个工具 https://www.zenuml.com/ 时序图是一种强调消息时序的交互图,他由对象(Object).消息(Message).生命线(Lifeline) ...

  5. jQuery Ajax同步参数导致浏览器假死怎么办

    俗话说不作死就不会死,今天作死了一回,写了一个比较二逼的函数,遇到了同步Ajax引起的UI线程阻塞问题,在此记录一下.   事情起因是这样的,因为页面上有多个相似的异步请求动作,本着提高代码可重用性的 ...

  6. log4cpp之Category

    body, table{font-family: 微软雅黑; font-size: 10pt} table{border-collapse: collapse; border: solid gray; ...

  7. fegin 调用源码分析

    http://techblog.ppdai.com/2018/05/28/20180528/ 这篇文章是相当详细

  8. css 中相对定位和绝对定位

    1. css中定位机制有三种: 标准文档流, 浮动, 绝对定位 2. 绝对定位就属于第三种定位, 用到position属性, 下面就是具体设置 相对定位: 相对于自身原有位置(就是普通流的时候)进行偏 ...

  9. Oracle解决中文乱码

    原因 经过一番查证,发现问题的源头不是出现在PLSQL上,而是出现在我们的Oracle上,由于我们的Oracle数据库里的字符集不支持中文导致的,既然知道了原因,就好办了,我们就配置我们的Oracle ...

  10. c++下使用命名管道实现进程间通信

    前面已经使用邮槽实现过进程间通信:http://www.cnblogs.com/jzincnblogs/p/5192654.html ,这里使用命名管道实现进程间通信. 与邮槽不同的是,命名管道在进程 ...