Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
Hello!
I create two cocoon block such as in this article: "Modularize Cocoon apps (Using blocks)" (http://cocoon.zones.apache.org/dev-docs/2.2/1291_1_1.html) in section "Use a pipeline fragment".
Only difference is that file "demo/welcome.xml" contain russian symbols (but in UTF-8 encoding - 100%). After point my browser at http://localhost:8888/myBlock1/callingTransformationService I see this exception:
Caused by: org.xml.sax.SAXParseException: Invalid byte 2 of 2-byte UTF-8 sequence.
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(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.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.apache.cocoon.core.xml.impl.JaxpSAXParser.parse(JaxpSAXParser.java:196)
at org.apache.cocoon.core.xml.impl.JaxpSAXParser.parse(JaxpSAXParser.java:204)
at org.apache.cocoon.core.xml.avalon.DefaultSAXParser.parse(DefaultSAXParser.java:54)
at org.apache.cocoon.components.source.util.SourceUtil.parse(SourceUtil.java:238)
at org.apache.cocoon.generation.FileGenerator.generate(FileGenerator.java:109)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
...
What's wrong? Where can I set correct encoding (UTF-8)?
I create two cocoon block such as in this article: "Modularize Cocoon apps (Using blocks)" (http://cocoon.zones.apache.org/dev-docs/2.2/1291_1_1.html) in section "Use a pipeline fragment".
Only difference is that file "demo/welcome.xml" contain russian symbols (but in UTF-8 encoding - 100%). After point my browser at http://localhost:8888/myBlock1/callingTransformationService I see this exception:
Caused by: org.xml.sax.SAXParseException: Invalid byte 2 of 2-byte UTF-8 sequence.
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(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.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.apache.cocoon.core.xml.impl.JaxpSAXParser.parse(JaxpSAXParser.java:196)
at org.apache.cocoon.core.xml.impl.JaxpSAXParser.parse(JaxpSAXParser.java:204)
at org.apache.cocoon.core.xml.avalon.DefaultSAXParser.parse(DefaultSAXParser.java:54)
at org.apache.cocoon.components.source.util.SourceUtil.parse(SourceUtil.java:238)
at org.apache.cocoon.generation.FileGenerator.generate(FileGenerator.java:109)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
...
What's wrong? Where can I set correct encoding (UTF-8)?