`

Error configuring from input stream. Initial cause was 1 字节的 UTF-8 序列的

阅读更多

在用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中使用了中文注解,把中文注解去掉就好用了。

分享到:
评论

相关推荐

    Service Support-英文原版

    Preface.........................................................................................................................................- 1 - 1 Introduction.......................................

    MS.Press.Self-Paced.Training.Kit.Exam.70-652.Configuring.Windows.Server.Virtualization

    MS.Press.Self-Paced.Training.Kit.Exam.70-652.Configuring.Windows.Server.Virtualization

    ORACLE OSB开发指南

    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

    4.1.1.11 Packet Tracer - Configuring Extended ACLs Scenario 2.pka

    Labview TestStand教程

    The TestStand Engine.................................................................................................1-8 Module Adapters ..................................................................

    Datastage官方培训资料

    Datastage官方培训资料 英文 Module 1: Introduction to DataStage ............................ 1-01 Module 2: Installing DataStage ..................................... 2-01 Module 3: ...

    LTM Config 配置手册打包

    Configuring virtual servers ..................................................................................................1-8 Configuring load balancing pools ........................................

    MS.Exam.Ref.70-410.Installing.and.Configuring.Windows.Server.2012.R2.0735684

    原版MSCE 考试用书,也可做为参考用书,比较详细MS.Exam.Ref.70-410.Installing.and.Configuring.Windows.Server.2012.R2.0735684

    javassist-3.11.0.GA.jar

    stuts2项目启动tomcat报错:Error configuring application listener of class org.apache.struts2.dispatcher.ng.listener.StrutsListener,缺少的是这个javassist-3.11.0.GA.jar

    WCAdvDeployGuide_zh_CN.pdf

    Windchill高级部署指南 This chapter describes how to configure background method servers, RMI for ...Configuring RMI for Tunneling over HTTP.......................................................3-8

    Writing Testbenches using System Verilog

    Error Types to Look For . . . . . . . . . . . 91 Prioritize . . . . . . . . . . 92 Design for Verification . . . . . . . . . . . . 93 Directed Testbenches Approach . . . 96 Group into Testcases . ...

    boost_1_59_0.tar.gz

    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 &lt;directory&gt;. If it is not there, it will download ...

    spring-boot-reference.pdf

    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...

    adwaita-icon-theme-3.28.0-1.el7.noarch.rpm

    离线安装包,亲测可用

    Debugging with GDB --2003年6.0

    Your program’s input and output . . . . . . . . . . . . . . . . . . . . . . . . Debugging an already-running process . . . . . . . . . . . . . . . . . . . Killing the child process . . . . . . . . . ...

    DebuggingWithGDB 6.8-2008

    4.6 Your Program’s Input and Output . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.7 Debugging an Already-running Process . . . . . . . . . . . . . . . . . . . . . . 4.8 Killing the Child ...

    spring-framework-reference4.1.4

    3.3. Java 8 (as well as 6 and 7) ............................................................................... 17 3.4. Java EE 6 and 7 ..................................................................

    Automating with SIMATICS 7-1500 Configuring, Programming 2017.pdf

    西门子 plc Hans Berger Automating with 系列丛书 Automating with SIMATICS 7-1500 Configuring, Programming and Testingwith STEP 7 Professional 2017.pdf

    pro_apache_third_edition..pdf

    Apache and the Internet..............................................1 Apache: The Anatomy of a Web Server.........................................................1 The Apache Source ....................

    vxworks_kernel_programmers_guide_6.9

    1 Overview ...................................................................................................... 3 1.1 Introduction ......................................................................

Global site tag (gtag.js) - Google Analytics