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仔细看了下

 <?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. UVA-1312 Cricket Field (技巧枚举)

    题目大意:在一个w*h的网格中,有n个点,找出一个最大的正方形,使得正方形内部没有点. 题目分析:寻找正方形实质上等同于寻找矩形(只需令长宽同取较短的边长).那么枚举出所有可能的长宽组合取最优答案即可 ...

  2. SqlServer 转 Oracle 的几点注意

    (转自:http://www.2cto.com/database/201208/146740.html) 1.字符型的字段相加需要用“||”,如果用“+”的话,会报“无效的数字”的错误.   2.类似 ...

  3. hystrix -hystrixCommand配置介绍

    public @interface HystrixCommand { // HystrixCommand 命令所属的组的名称:默认注解方法类的名称 String groupKey() default ...

  4. nodejs编译sass模块包 node-compass,与gulp包gulp-sass使用方法

    简介:node express或者就是node项目中,要自动编译sass方法很多,比如gulp 比如考拉,比如今天我想说的这个包node-compass. 编译sass的三种方法: 前提条件: 都需要 ...

  5. PHP stripos()、strripos()和strrpos() 使用方法和区别

    区别 stripos():查找字符串首次出现的位置(不区分大小写) 写法:stripos ( string $haystack , string $needle [, int $offset = 0 ...

  6. DOM 踩踩踩

    1.如果是想给一个DOM元素添加一个伪类,可以转换为  为这个元素添加一个类名,这个类名上面绑定一个伪类. 2.append一个元素,删除掉原来的元素再进行添加.

  7. 01-名字管理系统.py

    #-*- coding:utf-8 -*- #1.打印功能提示 print("-"*50) print("名字管理系统 V8.6") print("1 ...

  8. HTML字符实体(Character Entities),转义字符串(Escape Sequence) 转

    为什么要用转义字符串? HTML中<,>,&等有特殊含义(<,>,用于链接签,&用于转义),不能直接使用.这些符号是不显示在我们最终看到的网页里的,那如果我们希 ...

  9. python 之头像上传,预览

    上传头像 我们需要实现的效果是:当我们点击默认头像,用户可以进行选择要上传的头像文件,其原理就是头像的img标签与文件input(file类型)框重合或者关联,可以通过如下两种方式进行实现: 方法一l ...

  10. Jenkins构建持续集成

    Jenkins 是一个开源软件项目,旨在提供一个开放易用的软件平台,使软件的持续集成变得可能.现在软件开发追求的是效率以及质量,Jenkins使得自动化成为可能! 亮点 采用shell自定义脚本,控制 ...