commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Thomas" <debussy...@gmail.com>
Subject UTF-8 sequence problem.
Date Mon, 27 Nov 2006 15:20:21 GMT
Hi,

In my configuration file, I have the following :

<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE configuration [
  <!ENTITY amp "&#x26;">
  <!ENTITY lt "&#x3C;">
  <!ENTITY minus "&#45;">
]>

When I do operations in this file (read & write) ,
something really weird happens :

The above code changes to :

<?xml version="1.0" encoding="UTF-8"?>

Then when I reload the program it says :

[27/11/06 16:07:46:951 CET] 6083bafc SystemErr     R
org.apache.commons.configuration.ConfigurationException: Octet 2 incorrect
dans la séquence UTF-8 à 2-octets.
    at org.apache.commons.configuration.XMLConfiguration.load(
XMLConfiguration.java:620)
    at org.apache.commons.configuration.XMLConfiguration.load(
XMLConfiguration.java:578)
    at
org.apache.commons.configuration.XMLConfiguration$XMLFileConfigurationDelegate.load
(XMLConfiguration.java:1045)
    at org.apache.commons.configuration.AbstractFileConfiguration.load(
AbstractFileConfiguration.java:280)
    at org.apache.commons.configuration.AbstractFileConfiguration.load(
AbstractFileConfiguration.java:212)
    at org.apache.commons.configuration.AbstractFileConfiguration.load(
AbstractFileConfiguration.java:190)
    at
org.apache.commons.configuration.AbstractHierarchicalFileConfiguration.load(
AbstractHierarchicalFileConfiguration.java:136)
    at
org.apache.commons.configuration.AbstractHierarchicalFileConfiguration
.<init>(AbstractHierarchicalFileConfiguration.java:72)
    at org.apache.commons.configuration.XMLConfiguration.<init>(
XMLConfiguration.java:153)
    at lu.fortis.dao.DAOCrawlerConfigurationXML.loadCollection(
DAOCrawlerConfigurationXML.java:128)
    at lu.fortis.application.CollectionsManager.getCollection(
CollectionsManager.java:52)
    at lu.fortis.controllers.Controller.customizeCollection(Controller.java
:113)
    at lu.fortis.controllers.Controller.doGet(Controller.java:47)
    at lu.fortis.controllers.Controller.doPost(Controller.java:189)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(
StrictServletInstance.java:110)
    at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(
StrictLifecycleServlet.java:174)
    at com.ibm.ws.webcontainer.servlet.IdleServletState.service(
StrictLifecycleServlet.java:313)
    at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(
StrictLifecycleServlet.java:116)
    at com.ibm.ws.webcontainer.servlet.ServletInstance.service(
ServletInstance.java:283)
    at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(
ValidServletReferenceState.java:42)
    at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(
ServletInstanceReference.java:40)
    at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(
WebAppRequestDispatcher.java:983)
    at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(
WebAppRequestDispatcher.java:564)
    at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(
WebAppRequestDispatcher.java:200)
    at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(
WebAppInvoker.java:119)
    at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(
WebAppInvoker.java:276)
    at
com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(
CachedInvocation.java:71)
    at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(
ServletRequestProcessor.java:182)
    at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(
OSEListener.java:334)
    at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(
HttpConnection.java:56)
    at com.ibm.ws.http.HttpConnection.readAndHandleRequest(
HttpConnection.java:618)
    at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:443)
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:672)
Caused by: java.io.UTFDataFormatException: Octet 2 incorrect dans la
séquence UTF-8 à 2-octets.
    at org.apache.xerces.impl.io.UTF8Reader.invalidByte(Unknown Source)
    at org.apache.xerces.impl.io.UTF8Reader.read(Unknown Source)
    at org.apache.xerces.impl.XMLEntityScanner.load(Unknown Source)
    at org.apache.xerces.impl.XMLEntityScanner.scanContent(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanContent(Unknown
Source)
    at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
    at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
    at org.apache.commons.configuration.XMLConfiguration.load(
XMLConfiguration.java:612)
    ... 34 more




Thank u for any help.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message