Ehcache配置遇到Content is not allowed in prolog异常的解决办法
来源:互联网 发布:mac设置默认图标放大 编辑:程序博客网 时间:2024/05/17 09:20
项目中使用了Hibernate,并使用Ehcache作为二级缓存,配置好了之后,启动tomcat老是出现下面的错误:
严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [applicationContext.xml]: Invocation of init method failed; nested exception is net.sf.ehcache.CacheException: Error configuring from file:/D:/Tomcat%206.0/webapps/ROOT/WEB-INF/classes/ehcache.xml. Initial cause was Error configuring from input stream. Initial cause was Content is not allowed in prolog.
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1420)
。。。。。。。
Caused by: net.sf.ehcache.CacheException: Error configuring from file:/D:/Tomcat%206.0/webapps/ROOT/WEB-INF/classes/ehcache.xml. Initial cause was Error configuring from input stream. Initial cause was Content is not allowed in prolog.
at net.sf.ehcache.config.ConfigurationFactory.parseConfiguration(ConfigurationFactory.java:101)
。。。。。。。
Caused by: net.sf.ehcache.CacheException: Error configuring from input stream. Initial cause was Content is not allowed in prolog.
at net.sf.ehcache.config.ConfigurationFactory.parseConfiguration(ConfigurationFactory.java:155)
at net.sf.ehcache.config.ConfigurationFactory.parseConfiguration(ConfigurationFactory.java:99)
... 52 more
Caused by: org.xml.sax.SAXParseException: Content is not allowed in prolog.
一开始看到第一个错误提示,还以为是spring或Ehcache引起的问题,后来找了很久才从Content is not allowed in prolog信息中找到解决的办法:
将ehcache.xml配置文件利用记事本另存为Anis编码的文件。
一个小问题,居然花了好长一段时间才找到原因和解决办法。
- Ehcache配置遇到Content is not allowed in prolog异常的解决办法
- org.dom4j.DocumentException: Content is not allowed in prolog. 解决办法
- Content is not allowed in prolog
- Content is not allowed in prolog.解决方法
- DOM4j:Content is not allowed in prolog
- Content is not allowed in prolog.
- Content is not allowed in prolog.解决
- Content is not allowed in prolog
- SAXParseException: Content is not allowed in prolog
- Content is not allowed in prolog.错误
- Error:Content is not allowed in prolog.
- ibatis的sqlmap.xml 报错:Content is not allowed in prolog异常的原因
- Content is not allowed in prolog. Nested exception: Content is not allowed in prolog
- UE编辑的XML,如果字符集为“UTF-8”,Content is not allowed in prolog异常问题
- Content is not allowed in prolog异常产生原因及处理方式
- Content is not allowed in prolog异常产生原因及处理方式
- Exception: Content is not allowed in prolog-搜集
- org.xml.sax.SAXParseException: Content is not allowed in prolog.
- 调出照片柔和的蓝黄色-简单方法
- js滚动的图片
- 提高编程效率
- RandomAccessFile
- div中图片居中
- Ehcache配置遇到Content is not allowed in prolog异常的解决办法
- 《Maven实战》(国内首本Maven著作)(Maven的安装、配置及使用入门)
- FCKeditor 的使用 之 3
- 等待队列
- 缓存--ehcache
- selectany 关键字的用法
- KVM or Xen? Choosing a Virtualization Platform
- 国外程序员是如何准备面试的
- 把类显示用 new 产生一个指定的内存地址上,并显示调用析构函数