Fw: [Servingxml-help] Not a valid value for the specified attribute
Brought to you by:
danielaparker
|
From: Daniel P. <dan...@sy...> - 2006-05-05 06:20:40
|
----- Original Message -----
From: "rams" <ra...@ta...>
To: "Daniel Parker" <dan...@sy...>
Sent: Thursday, May 04, 2006 3:16 AM
Subject: Re: [Servingxml-help] Not a valid value for the specified attribute
> Hi Daniel,
> Thanks for the reply..
> I have tested with the program code that you sent.
> I got UnsupportedCahrsetException..
> It seems my system is not supporting the Cp1047 encoding scheme.
> have a good day.
> Regards
> Ram
> On Wednesday 03 May 2006 17:54, you wrote:
>> Rams,
>>
>> The error message indicates that it's failing here, for the charset
>> "Cp500":
>>
>> Charset charset = null;
>> if (charsetName != null) {
>> try {
>> charset = 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 -----
>> From: rams
>> To: Ser...@li...
>> 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="1.0"?>
>>
>>
>> <sx:resources xmlns:sx="http://www.servingxml.com/core">
>>
>>
>> <sx:service id="ascii2ebcdic">
>>
>> <sx:writeRecords>
>>
>> <sx:flatFileWriter>
>>
>> <sx:flatFile ref="ebcdicBooksFile"/>
>>
>> <sx:defaultStreamSink encoding="Cp500"/>
>>
>> </sx:flatFileWriter>
>>
>> <sx:flatFileReader>
>>
>> <sx:flatFile ref="asciiBooksFile"/>
>>
>> </sx:flatFileReader>
>>
>> </sx:writeRecords>
>>
>> </sx:service>
>>
>>
>> <sx:service id="ebcdic2ascii">
>>
>> <sx:writeRecords>
>>
>> <sx:flatFileWriter>
>>
>> <sx:flatFile ref="asciiBooksFile"/>
>>
>> </sx:flatFileWriter>
>>
>> <sx:flatFileReader>
>>
>> <sx:flatFile ref="ebcdicBooksFile"/>
>>
>> <sx:defaultStreamSource encoding="Cp500"/>
>>
>> </sx:flatFileReader>
>>
>> </sx:writeRecords>
>>
>> </sx:service>
>>
>>
>> <sx:flatFile id="ebcdicBooksFile">
>>
>> <sx:flatFileHeader>
>>
>> <sx:flatRecordType ref="ebcdicBookType"/>
>>
>> </sx:flatFileHeader>
>>
>> <sx:flatFileBody>
>>
>> <sx:flatRecordType ref="ebcdicBookType"/>
>>
>> </sx:flatFileBody>
>>
>> </sx:flatFile>
>>
>>
>> <sx:flatRecordType id="ebcdicBookType" name="ebcdicBookType">
>>
>> <sx:fieldDelimiter value="|"/>
>>
>> <sx:delimitedField name="author" label="Author"/>
>>
>> <sx:delimitedField name="category" label="Category"/>
>>
>> <sx:delimitedField name="title" label= "Title"/>
>>
>> <sx:delimitedField name="price" label="Price"/>
>>
>> </sx:flatRecordType>
>>
>>
>> <sx:flatFile id="asciiBooksFile">
>>
>> <sx:flatFileHeader>
>>
>> <sx:flatRecordType ref="asciiBookType"/>
>>
>> <sx:annotationRecord/>
>>
>> </sx:flatFileHeader>
>>
>> <sx:flatFileBody>
>>
>> <sx:flatRecordType ref="asciiBookType"/>
>>
>> </sx:flatFileBody>
>>
>> <sx:flatFileTrailer>
>>
>> <sx:annotationRecord></sx:annotationRecord>
>>
>> <sx:annotationRecord>This is a trailer record</sx:annotationRecord>
>>
>> </sx:flatFileTrailer>
>>
>> </sx:flatFile>
>>
>>
>> <sx:flatRecordType id="asciiBookType" name="asciiBookType">
>>
>> <sx:positionalField name="category" width="1"/>
>>
>> <sx:positionalField name="author" width="30"/>
>>
>> <sx:positionalField name="title" width="30"/>
>>
>> <sx:positionalField name="price" width="10" justify="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
>
>
>
> 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
|