Re: [Servingxml-help] Not a valid value for the specified attribute
Brought to you by:
danielaparker
|
From: Daniel P. <dan...@sy...> - 2006-05-03 12:24:59
|
Rams,
The error message indicates that it's failing here, for the charset =
"Cp500":
Charset charset =3D null;
if (charsetName !=3D null) {
try {
charset =3D Charset.forName(charsetName);
} catch (IllegalCharsetNameException e) {
...
} catch (UnsupportedCharsetException e) {
...
}
}
An exception is being thrown in the Java Charset.forName method. So =
this doesn't appear to be a ServingXML issue.
Also, I can't reproduce it. Try creating a small Java program that just =
executes the lines above and verify that that fails. If it fails, check =
whether it throws an UnsupportedCharsetException or an =
IllegalCharsetNameException.
-- Daniel
----- Original Message -----=20
From: rams=20
To: Ser...@li...=20
Sent: Wednesday, May 03, 2006 5:10 AM
Subject: [Servingxml-help] Not a valid value for the specified =
attribute
Hi,
I am running a sample program to convert an ASCII file to EBCDIC file =
.
When I run the program i got the following exeption.
THE MESSAGE IS:
May 3, 2006 10:18:58 AM com.servingxml.util.system.DefaultLogger error
SEVERE: [system]Error in element sx:defaultStreamSource, attribute =
charset has invalid value.. Cp500
[rams@hariprasadp flat2flat]$
Can any one suggest any solution for that.
The resource file I am using is:
<?xml version=3D"1.0"?>
<sx:resources xmlns:sx=3D"http://www.servingxml.com/core">
<sx:service id=3D"ascii2ebcdic">=20
<sx:writeRecords>
<sx:flatFileWriter>
<sx:flatFile ref=3D"ebcdicBooksFile"/>
<sx:defaultStreamSink encoding=3D"Cp500"/>
</sx:flatFileWriter>
<sx:flatFileReader>
<sx:flatFile ref=3D"asciiBooksFile"/>
</sx:flatFileReader>
</sx:writeRecords>
</sx:service>
<sx:service id=3D"ebcdic2ascii">=20
<sx:writeRecords>
<sx:flatFileWriter>
<sx:flatFile ref=3D"asciiBooksFile"/>
</sx:flatFileWriter>
<sx:flatFileReader>
<sx:flatFile ref=3D"ebcdicBooksFile"/>
<sx:defaultStreamSource encoding=3D"Cp500"/>
</sx:flatFileReader>
</sx:writeRecords>
</sx:service>
<sx:flatFile id=3D"ebcdicBooksFile">
<sx:flatFileHeader>
<sx:flatRecordType ref=3D"ebcdicBookType"/>
</sx:flatFileHeader>
<sx:flatFileBody>
<sx:flatRecordType ref=3D"ebcdicBookType"/>
</sx:flatFileBody>
</sx:flatFile>=20
<sx:flatRecordType id=3D"ebcdicBookType" name=3D"ebcdicBookType">
<sx:fieldDelimiter value=3D"|"/>
<sx:delimitedField name=3D"author" label=3D"Author"/>
<sx:delimitedField name=3D"category" label=3D"Category"/>
<sx:delimitedField name=3D"title" label=3D "Title"/>
<sx:delimitedField name=3D"price" label=3D"Price"/>
</sx:flatRecordType>
<sx:flatFile id=3D"asciiBooksFile">
<sx:flatFileHeader>
<sx:flatRecordType ref=3D"asciiBookType"/>
<sx:annotationRecord/>
</sx:flatFileHeader>
<sx:flatFileBody>
<sx:flatRecordType ref=3D"asciiBookType"/>
</sx:flatFileBody>
<sx:flatFileTrailer>
<sx:annotationRecord></sx:annotationRecord>
<sx:annotationRecord>This is a trailer record</sx:annotationRecord>
</sx:flatFileTrailer>
</sx:flatFile>=20
<sx:flatRecordType id=3D"asciiBookType" name=3D"asciiBookType">
<sx:positionalField name=3D"category" width=3D"1"/>
<sx:positionalField name=3D"author" width=3D"30"/>
<sx:positionalField name=3D"title" width=3D"30"/>
<sx:positionalField name=3D"price" width=3D"10" justify=3D"right"/>
</sx:flatRecordType>
</sx:resources>
Pls suggest a solution for this.
Thanks and Regards
RamReddy.S
This e-mail and any files transmitted with it are for the sole use of =
the intended recipient(s) and may contain confidential and privileged =
information. If you are not the intended recipient or received it in =
error, please contact the sender by reply e-mail and destroy all copies =
of the original message. Please do not copy it for any purpose or =
disclose its contents.
Copyright Tarang Software Technologies Pvt. Ltd. 2004. All rights =
Reserved |