在用springmvc+EHCache做缓存时候报错如下:
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cacheManager' defined in class path resource [applicationContext-ehcache.xml]: Invocation of init method failed; nested exception is net.sf.ehcache.CacheException: Error configuring from input stream. Initial cause was 1 字节的 UTF-8 序列的字节 1 无效。
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1486)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)
... 83 more
Caused by: net.sf.ehcache.CacheException: Error configuring from input stream. Initial cause was 1 字节的 UTF-8 序列的字节 1 无效。
at net.sf.ehcache.config.ConfigurationFactory.parseConfiguration(ConfigurationFactory.java:152)
at net.sf.ehcache.CacheManager.parseConfiguration(CacheManager.java:404)
at net.sf.ehcache.CacheManager.init(CacheManager.java:270)
at net.sf.ehcache.CacheManager.<init>(CacheManager.java:249)
at org.springframework.cache.ehcache.EhCacheManagerFactoryBean.afterPropertiesSet(EhCacheManagerFactoryBean.java:113)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1545)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1483)
... 90 more
Caused by: com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: 1 字节的 UTF-8 序列的字节 1 无效。
at com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.invalidByte(UTF8Reader.java:687)
at com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.read(UTF8Reader.java:557)
at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.load(XMLEntityScanner.java:1753)
at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.scanData(XMLEntityScanner.java:1252)
at com.sun.org.apache.xerces.internal.impl.XMLScanner.scanComment(XMLScanner.java:730)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanComment(XMLDocumentFragmentScannerImpl.java:1000)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2915)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:607)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:489)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:835)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:123)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1210)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:568)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:302)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:195)
at net.sf.ehcache.config.ConfigurationFactory.parseConfiguration(ConfigurationFactory.java:150)
... 96 more
原因是ehcache.xml中使用了中文注解,把中文注解去掉就好用了。
相关推荐
Preface.........................................................................................................................................- 1 - 1 Introduction.......................................
《Installing and Configuring NVIDIA Virtual GPU Manager》 提供分步指南在支持的管理程序上安装和配置vGPU。 《Using GPU Pass-Through》解释如何配置GPU以通过支持的管理程序。 《Installing the ...
在SpringBoot项目中,默认情况下,Tomcat服务器使用ISO-8859-1字符编码,而开发者通常使用UTF-8字符编码,导致乱码问题的出现。 二、解决方案 1. 配置文件中添加编码设置 在application.properties或application....
4.1.1.11 Packet Tracer - Configuring Extended ACLs Scenario 2.pka
The TestStand Engine.................................................................................................1-8 Module Adapters ..................................................................
Datastage官方培训资料 英文 Module 1: Introduction to DataStage ............................ 1-01 Module 2: Installing DataStage ..................................... 2-01 Module 3: ...
Configuring virtual servers ..................................................................................................1-8 Configuring load balancing pools ........................................
安装完成后,打开命令提示符或Git Bash(如果选择了集成),输入`git --version`,你应该能看到类似`git version 2.38.0.rc0.windows.1`的输出,证明Git已经成功安装。 安装说明.png文件可能包含了详细的图解步骤,...
Windchill高级部署指南 This chapter describes how to configure background method servers, RMI for ...Configuring RMI for Tunneling over HTTP.......................................................3-8
stuts2项目启动tomcat报错:Error configuring application listener of class org.apache.struts2.dispatcher.ng.listener.StrutsListener,缺少的是这个javassist-3.11.0.GA.jar
Error Types to Look For . . . . . . . . . . . 91 Prioritize . . . . . . . . . . 92 Design for Verification . . . . . . . . . . . . 93 Directed Testbenches Approach . . . 96 Group into Testcases . ...
离线安装包,亲测可用
在“Cisco - Configuring 802.1X Port-Based Authentication”这个压缩包中,我们可以预见到这是一份关于如何在Cisco网络设备上配置802.1X端口认证的详细指导文档。以下将深入探讨802.1X协议的核心概念、其在Cisco...
24.6.1. Loading YAML 24.6.2. Exposing YAML as Properties in the Spring Environment 24.6.3. Multi-profile YAML Documents 24.6.4. YAML Shortcomings 24.7. Type-safe Configuration Properties 24.7.1. Third...
AdGuard Home 项目 是著名广告拦截器 AdGuard 里 DNS Server 的一个开源版本。该项目的原理是,在 DNS 的域名解析的过程里拦截网页上的广告。
Your program’s input and output . . . . . . . . . . . . . . . . . . . . . . . . Debugging an already-running process . . . . . . . . . . . . . . . . . . . Killing the child process . . . . . . . . . ...
4.6 Your Program’s Input and Output . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.7 Debugging an Already-running Process . . . . . . . . . . . . . . . . . . . . . . 4.8 Killing the Child ...
4.6 Your Program’s Input and Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.7 Debugging an Already-running Process . . . . . . . . . . . . . . . . . . . . . . . . 4.8 Killing the ...