|
Quick Lists
|
|
Bug ID:
|
6333923
|
|
Votes
|
1
|
|
Synopsis
|
Using javax.xml.transform causes an annoying warning message to be written to System.err
|
|
Category
|
jaxp:xslt
|
|
Reported Against
|
|
|
Release Fixed
|
mustang(b61)
|
|
State
|
10-Fix Delivered,
bug
|
|
Priority:
|
2-High
|
|
Related Bugs
|
6275348
,
6321950
|
|
Submit Date
|
07-OCT-2005
|
|
Description
|
The most trivial use of the javax.xml.transform API in Mustang causes the
message "Warning: Could not get charToByteConverterClass!" to be written to
System.err. This is extremely annoying. It's also a compatibility issue since
most existing applications probably aren't expecting random libraries to write
unsolicited messages to System.err.
Code to reproduce the problem:
----
import java.io.*;
import javax.xml.transform.*;
import javax.xml.transform.stream.*;
public class Bug {
public static void main(String[] args) throws Exception {
TransformerFactory tff = TransformerFactory.newInstance();
Transformer tf = tff.newTransformer();
byte[] in = new byte[] { (byte)'<', (byte)'x', (byte)'/', (byte)'>' };
tf.transform(new StreamSource(new ByteArrayInputStream(in)),
new StreamResult(new FileOutputStream("/dev/null")));
}
}
----
Posted Date : 2005-10-07 04:51:21.0
|
|
Work Around
|
N/A
|
|
Evaluation
|
There's some unfortunate code in org.apache.xml.internal.serializer.Encodings
which assumes the existence of the sun.io package, and in particular of a class
named CharToByteConverter within that package.
These are internal APIs that should never be used by code outside of the core
of Sun's Java SE implementations. We've been warning developers about this for
nearly ten years (http://java.sun.com/products/jdk/faq/faq-sun-packages.html).
In any case that the CharToByteConverter class, and indeed the entire sun.io
package, were removed early in Mustang (6237353). The Xalan code that depends
upon them should be removed, or at the very least silenced.
Posted Date : 2005-10-07 04:51:22.0
|
|
Comments
|
PLEASE NOTE: JDK6 is formerly known as Project Mustang
|
|
|
 |