You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xalan.apache.org by Andreas Völker <av...@ap-ag.com> on 2004/07/09 16:33:06 UTC
java.lang.NumberFormatException when saving very simple xml file, using Xalan 2.6.0
HI,
When I try to generate and save a very simple xml file using the attached java program I get the following exception:
Exception in thread "main" java.lang.ExceptionInInitializerError
at org.apache.xml.serializer.ToStream.<init>(ToStream.java:112)
at org.apache.xml.serializer.ToXMLStream.<init>(ToXMLStream.java:57)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Sou
rce)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at org.apache.xml.serializer.SerializerFactory.getSerializer(SerializerF
actory.java:91)
at org.apache.xalan.transformer.TransformerIdentityImpl.createResultCont
entHandler(TransformerIdentityImpl.java:214)
at org.apache.xalan.transformer.TransformerIdentityImpl.transform(Transf
ormerIdentityImpl.java:278)
at TestXerces.testXerces(TestXerces.java:44)
at TestXerces.main(TestXerces.java:17)
Caused by: java.lang.NumberFormatException: For input string: "be found at http:
//www.iana.org/assignments/character-sets"
at java.lang.NumberFormatException.forInputString(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at java.lang.Integer.valueOf(Unknown Source)
at java.lang.Integer.decode(Unknown Source)
at org.apache.xml.serializer.Encodings.loadEncodingInfo(Encodings.java:3
93)
at org.apache.xml.serializer.Encodings.<clinit>(Encodings.java:429)
With Xalan 2.4.1 all worked fine.
The result should be an xml file called "test.xml" in the current directory with the following content:
<?xml version="1.0" encoding="UTF-8" ?>
<root />
Any help would be greatly appreciated.
Regards,
Andreas Völker
Re: java.lang.NumberFormatException when saving very simple xml file, using
Xalan 2.6.0
Posted by Henry Zongaro <zo...@ca.ibm.com>.
Hi, Andreas.
Andreas Völker <av...@ap-ag.com> wrote on 07/09/2004 10:33:06 AM:
> When I try to generate and save a very simple xml file using the
> attached java program I get the following exception:
>
> Exception in thread "main" java.lang.ExceptionInInitializerError
[Stack trace deleted. HZ]
> Caused by: java.lang.NumberFormatException: For input string:
> "be found at http://www.iana.org/assignments/character-sets"
[Stack trace deleted. HZ]
Someone reported this same problem two months ago, and then decided
that it was a problem in Sun's beta of J2SE 1.5.0. See bug report 28920
[1] for information.
If you're not using that level of J2SE, please let us know.
Thanks,
Henry
[1] http://issues.apache.org/bugzilla/show_bug.cgi?id=28920
------------------------------------------------------------------
Henry Zongaro Xalan development
IBM SWS Toronto Lab T/L 969-6044; Phone +1 905 413-6044
mailto:zongaro@ca.ibm.com