Mantis Bugtracker
  

Viewing Issue Simple Details [ Jump to Notes ] [ View Advanced ] [ Issue History ] [ Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0000022 [Resin] minor always 03-08-05 00:00 05-11-05 00:00
Reporter borisk View Status public  
Assigned To
Priority immediate Resolution fixed  
Status closed   Product Version
Summary 0000022: Resin stops working in KOI8_R enviroment
Description RSN-13
Have upgraded from Resin 3.0.9 to 3.0.12 and it stops working in my koi8-r enviroment. I always get an exception java.nio.charset.UnsupportedCharsetException: KOI8_R. Am I missed something? But have not find related to this changes in ChangeLog
Additional Information FreeBSD 5.3-STABLE, JDK 1.4.2p7 (native for FreeBSD), Resin 3.0.12
Attached Files

- Relationships

- Notes
(0000025)
borisk
03-08-05 00:00

Not sure, but may be problem is in com.caucho.vfs.Encoding:465 where
    _javaName.put("KOI8-R", "KOI8-R"); should be used instead of original
    _javaName.put("KOI8-R", "KOI8_R");
 
(0000026)
borisk
03-08-05 00:00

Ok, I have recompiled Encoding.java with above changes and the problem has gone. But I still not sure I break something more. Someone of Resin gurus should look at this.
 
(0000027)
ferg
03-08-05 00:00

Resin changed to use Charset, but the canonical mapping still used the old java name.

server/054g
 
(0000028)
dicr
03-08-05 00:00

I have this similar problen in all other Java application with JDK 1.5.
This is the Xerces problem whith validating=true parser.
I try to parse simple document with DOM API:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE jmxserver SYSTEM "jmxserver.dtd">
<jmxserver/>

And get Error:

org.xml.sax.SAXParseException: Invalid encoding name "KOI8_R".
    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.XMLEntityManager.createReader(Unknown Source)
    at org.apache.xerces.impl.XMLEntityManager$ScannedEntity.setReader(Unknown Source)
    at org.apache.xerces.impl.XMLEntityScanner.setEncoding(Unknown Source)
    at org.apache.xerces.impl.XMLDTDScannerImpl.scanTextDecl(Unknown Source)
    at org.apache.xerces.impl.XMLDTDScannerImpl.scanDTDExternalSubset(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.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.DOMParser.parse(Unknown Source)
    at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
    at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:146)
    at org.dicr.jmx.server.config.ServerConfig.parseXML(ServerConfig.java:245)
 
(0000029)
dicr
03-08-05 00:00

Resolving this problem:

DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
factory.setAttribute("http://apache.org/xml/features/allow-java-encodings",Boolean.TRUE); [^]
 

- Issue History
Date Modified Username Field Change
03-08-05 00:00 borisk New Issue


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
33 total queries executed.
31 unique queries executed.
Powered by Mantis Bugtracker