在用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.......................................
MS.Press.Self-Paced.Training.Kit.Exam.70-652.Configuring.Windows.Server.Virtualization
2-8 Exporting a Configuration Using WLST .......................................................................... 2-9 Generating an Effective WSDL .....................................................
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 ........................................
原版MSCE 考试用书,也可做为参考用书,比较详细MS.Exam.Ref.70-410.Installing.and.Configuring.Windows.Server.2012.R2.0735684
stuts2项目启动tomcat报错:Error configuring application listener of class org.apache.struts2.dispatcher.ng.listener.StrutsListener,缺少的是这个javassist-3.11.0.GA.jar
Windchill高级部署指南 This chapter describes how to configure background method servers, RMI for ...Configuring RMI for Tunneling over HTTP.......................................................3-8
Error Types to Look For . . . . . . . . . . . 91 Prioritize . . . . . . . . . . 92 Design for Verification . . . . . . . . . . . . 93 Directed Testbenches Approach . . . 96 Group into Testcases . ...
CMake Error at cmake/boost.cmake:81 (MESSAGE): You can download it with -DDOWNLOAD_BOOST=1 -DWITH_BOOST= This CMake script will look for boost in <directory>. If it is not there, it will download ...
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...
离线安装包,亲测可用
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 ...
3.3. Java 8 (as well as 6 and 7) ............................................................................... 17 3.4. Java EE 6 and 7 ..................................................................
西门子 plc Hans Berger Automating with 系列丛书 Automating with SIMATICS 7-1500 Configuring, Programming and Testingwith STEP 7 Professional 2017.pdf
Apache and the Internet..............................................1 Apache: The Anatomy of a Web Server.........................................................1 The Apache Source ....................
1 Overview ...................................................................................................... 3 1.1 Introduction ......................................................................