BaseRuntimeException:Invalid byte 1 of 1-byte UTF-8 sequence

Hi experts,
I am getting error in MONI as :
Runtime exception occurred during application mapping com/sap/xi/tf/_MM_MES_TO_SAP_SHIPPING_REQ2_; com.sap.aii.utilxi.misc.api.BaseRuntimeException:Invalid byte 1 of 1-byte UTF-8 sequence
When i checked the payload i found :
The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
An invalid character was found in text content. Error processing resource 'file:///C:/Documents and Settings/snayak/Local S...
        <ns0:SalesOrderInformation>
But when I copy and paste the payload data from note pad and did testing in Messsage mapping, it became successful.
It is not opening in xml format but it is working in notepad.
Please advise what to do.
Thanks,
Swapnashree

Hi,
Stefan is correct. If you are unable to display it, then it is not a valid xml. Based on the error that you provided, the invalid character is located just above the <ns0:SalesOrderInformation>. So you should start from there.
But when I copy and paste the payload data from note pad and did testing in Messsage mapping, it became successful.
It is possible that you just selected a part of the payload and pasted it in the mapping, hence it was successful. Pasting the whole payload would more or less give the same error as what you have seen in moni.
If you can have your input XML validated by XML programs such as XMLSpy or XMLStudio, it would greatly help in troubleshooting your issue.
Hope this helps,
Mark

Similar Messages

  • Java.io.UTFDataFormatException: Invalid byte 1 of 1-byte UTF-8 sequence.

    Hi,
    I see the below error when I try to import bunch of email templates.
    com.waveset.util.WavesetException: ==> java.io.UTFDataFormatException: Invalid byte 1 of 1-byte UTF-8 sequence.
    Can any one explain me why is this happenining?
    Thanks,
    Siddiqui

    Hi Siddiqui,
    It looks like u r importing some characters those are not valid UTF-8 character set and some time this type of error comes when u try to import characters like *<,>* so use *& lt;* for < and *>* for >.
    sorry those Characters r not display properly :-(
    Thanx
    Shant
    Edited by: Shant on Jan 18, 2008 6:19 AM
    Edited by: Shant on Jan 18, 2008 6:23 AM

  • "Invalid byte 1 of 1-byte UTF-8 sequence" exception trying to display image

    Hi there!
    Last night I updated my project to open the <wellcome-file>. So I put this in my web.xml file:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <web-app
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns="http://java.sun.com/xml/ns/javaee"
        xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
        xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
        id="WebApp_ID"
        version="2.5">
    <context-param>
        <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
        <param-value>.jspx</param-value>
    </context-param>
    <welcome-file-list>
        <welcome-file>faces/login.jspx</welcome-file>
    </welcome-file-list>
    <servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>/faces/*</url-pattern>
    </servlet-mapping>
    [...]Now when I type http://localhost:8080/myproject the login.jspx is opened as expected.
    But after this change, exceptions started to shown when images from my template.jspx is loaded (?).
    Here's a piece of my template.jspx:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <jsp:root
         xmlns:jsp="http://java.sun.com/JSP/Page"
         xmlns:h="http://java.sun.com/jsf/html"
         xmlns:f="http://java.sun.com/jsf/core"
         xmlns:ui="http://java.sun.com/jsf/facelets"
         xmlns:r="http://richfaces.org/rich"
         xmlns:a4j="http://richfaces.org/a4j"
         version="2.0">
    <f:facet name="controls">
         <h:panelGroup>
              <h:graphicImage
                   value="../imagens/erro.png"
                   id="hidelink" />
         </h:panelGroup>
    </f:facet>
    [...]And here is the exception:
    SEVERE: Error Rendering View[/imagens/erro.png]
    com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: Invalid byte 1 of 1-byte UTF-8 sequence.
         at com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.invalidByte(Unknown Source)
         at com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.read(Unknown Source)
         at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.load(Unknown Source)
         at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.arrangeCapacity(Unknown Source)
         at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.skipString(Unknown Source)
         at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(Unknown Source)
         at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
         at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
         at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
         at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
         at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
    [...]And, of course, the image is not displayed.
    The images from pages that uses template.jspx works fine (even the same image that causes the exception).
    Only images from my template.jspx and pages that I use with <ui:include> throws the exception.
    My directory structure:
    web
    |___templates
    |___imagens
    |___pages
    login.jspxI tried with ISO-8859-1 and UTF-8 as encoding and the problem is the same.
    I need some help. Any help.
    If any more info is needed, please just ask me.
    Thank you in advace!
    I'm using:
    JSF 1.2; Facelets 1.1.14; Richfaces 3.3; Tomcat 6, Java 6
    Yoshimit

    I got the same error. It was because my application's .java files were saved as UTF-8 but the .xhtml files were saved as cp1255 encoding. I have also added a filter to set the charset to each response like described [here |http://www.coderanch.com/t/211549/JSF/java/JSF-Character-Sets-UTF-mainly] .
    PS: I had another error after that which was caused by copying the Richfaces xmlns definitions from a PDf provided by Refcardz. The " symbol turend to something that the SAX parser could not process.
    Hope this helps.
    Pavel Myshkin

  • Error: Invalid byte 2 of 3-byte UTF-8 sequence

    Hi Experts,
      We have a synchronous scenario from Websphere to PI, where once Websphere sends the request it is been executed by ABAP proxy and gives response with some special characters. But as the xml coding is in UTF-8 only, this is not throwing error in Response Mapping.
      But when it reaches the end system, it is giving this "Invalid byte 2 of 3-byte UTF-8 sequence." " error saying that enocoding to UTF-8 is not done correctly. How can I overcome this situtation. please suggest.
    Thanks,
    Anudeep

    Hi,
    Check the encoding to be used for the data..or else check whether the RFC connections used are set to unicode...
    if possible execute the request in SAP and check what is the output it is generating...if it is proper over there then you need to identify the encoding to be used when it comes to PI..
    HTH
    Rajesh

  • Invalid byte 2 of 2-byte UTF-8 sequence

    Hi everyone.
    I am trying to schedule a BI Publisher report using the PublicReportService web service.
    When I call the web service, I get the following error
    Invalid byte 2 of 2-byte UTF-8 sequence.
    I think the cause of the error is that one of the parameters has special characters (Ñ). Please look at the parameters section of the XML
    <parameterNameValues>
    <item>
    <name>P_CDEMPCSC</name>
    <multiValuesAllowed>false</multiValuesAllowed>
    <values>
    <string>15</string>
    </values>
    </item>
    <item>
    <name>P_CDPERMES</name>
    <multiValuesAllowed>false</multiValuesAllowed>
    <values>
    <string>01062011</string>
    </values>
    </item>
    <item>
    <name>P_DSEMPCSC</name>
    <multiValuesAllowed>false</multiValuesAllowed>
    <values>
    _<string>DISEÑO Y CONSTRUCCION</string>_
    </values>
    </item>
    </parameterNameValues>
    ¿Am I right about tha cause of the error?
    ¿How could I fix it? There is not an option for me to substitute the Ñ.
    Thans in advance

    Hi again.
    I've found the solution to this issue
    1.- The XML needs this line at the beginning
    '<?xml version="1.0" encoding="ISO-8859-1" ?>'
    If not, it is encoded by default as UTF-8, and apparently that's why some special characters like Ñ and é produce the error
    2.- In case of some parameter has an &, this character needs to be replaced by the expression &amp;.
    Bye.

  • Invalid byte 2 of 3-byte UTF-8 sequence.

    Hi All
    I have to read a xml file from a given URL, which consists some french characters in it. I am getting
    IOException :Invalid byte 2 of 3-byte UTF-8 sequence Exception.
    The code i am using is.
    SAXBuilder builder = new SAXBuilder();
    Document doc = builder.build(new URL(url));
    Thanks in Advance
    Amit Srivastava

    The original XML may have been coded in UTF-16, but then you have this code:xml.trim().getBytes()which says
    "Take that XML string and convert it to bytes, using my system's default encoding."
    The parser then attempts to parse those bytes, which are encoded in ISO-8859-1 or windows-1252 or some such. Since you didn't declare this fact in the XML's header, the parser assumes the bytes are encoded in UTF-8. When it comes to a sequence of bytes in the code that aren't valid UTF-8 encodings of anything then it complains.
    If you really have to convert the input to bytes then try this:xml.trim().getBytes("UTF-8")

  • ASDOC error : Invalid byte 2 of 3-byte UTF-8 sequence

    Hi everyone,
    I'm trying to use ASDOC and have some problems.
    1) The first and most anoying one is that I don't have the
    complete documentation generated for MXML files : the files appear
    in the documentation, but the description is empty. I however
    commented them correctly using /** */ in the <mx:Script> tag,
    but none of my methods appear... I just see the Events when
    declared as class metadata.
    2) I'm using Eric Feminella's ASDocAntTask and I experience a
    strange error message : Impossible to open the document, Invalid
    byte 2 of 3-byte UTF-8 sequence. It happens for a whole bunch of
    files in the asdoc/templates directory, including the
    asdoc-util.xsl file. Maybe this is the reason why point 1) appears
    3) The Index html files are not generated... Consequence of
    point 2) I guess
    4) I have a warning message (oddly appearing 4 times) : CSS
    type selectors are not supported in components. I know it's not
    possible to have a link to my CSS file in components. But my file
    declaration is in the <mx:Application> class...
    Thanks for your help, all these errors really put me in
    trouble as I must deliver the documentation soon...
    Thanks
    Edit : the complete list of files impossible to read is the
    following :
    asdoc-util.xsl
    package.xsl
    all-index.xsl
    class-list.xsl
    package-detail.xsl
    class-files.xsl
    Ben

    Hi again !
    I finally found how to (partially) solve my problem !
    In ASDocAntTask, there are two files the user has to fill in
    : the build.xml file and a properties file. In the properties file,
    you define, for example, the name that you want to appear in the
    browser window... And as my project is French, I used a French
    special character é... which messed everything up...
    So finally, I got rid of this problem and solved points 2)
    and 3)
    I have now a great documentation, but still nothing about
    mxml files !
    How can I solve this problem ?

  • Org.dom4j.DocumentException: Invalid byte 1 of 1-byte UTF-8 sequence. Neste

    Hi there,
    I'm getting following exception, when i try to parse xml containing french character like
    la valeur utilisée pour le paramètre ROWS est passée de 10000 à 5418*
    org.dom4j.DocumentException: Invalid byte 1 of 1-byte UTF-8 sequence. Nested exception: Invalid byte 1 of 1-byte UTF-8 sequence.
         at org.dom4j.io.SAXReader.read(SAXReader.java:353)
         at org.dom4j.io.SAXReader.read(SAXReader.java:264)
         at com.azure.sparkcommon.XMLHelper.loadDocument(XMLHelper.java:57)
         at com.test.Sample.main(Sample.java:41)
    Nested exception:
    java.io.UTFDataFormatException: Invalid byte 1 of 1-byte UTF-8 sequence.
         at org.apache.xerces.impl.io.UTF8Reader.invalidByte(Unknown Source)
         at org.apache.xerces.impl.io.UTF8Reader.read(Unknown Source)
         at org.apache.xerces.impl.XMLEntityScanner.load(Unknown Source)
         at org.apache.xerces.impl.XMLEntityScanner.scanLiteral(Unknown Source)
         at org.apache.xerces.impl.XMLScanner.scanAttributeValue(Unknown Source)
         at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanAttribute(Unknown Source)
         at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.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.DTDConfiguration.parse(Unknown Source)
         at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
         at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
         at org.dom4j.io.SAXReader.read(SAXReader.java:334)
         at org.dom4j.io.SAXReader.read(SAXReader.java:264)
         at com.azure.sparkcommon.XMLHelper.loadDocument(XMLHelper.java:57)
         at com.test.Sample.main(Sample.java:41)
    Nested exception: java.io.UTFDataFormatException: Invalid byte 1 of 1-byte UTF-8 sequence.
         at org.apache.xerces.impl.io.UTF8Reader.invalidByte(Unknown Source)
         at org.apache.xerces.impl.io.UTF8Reader.read(Unknown Source)
         at org.apache.xerces.impl.XMLEntityScanner.load(Unknown Source)
         at org.apache.xerces.impl.XMLEntityScanner.scanLiteral(Unknown Source)
         at org.apache.xerces.impl.XMLScanner.scanAttributeValue(Unknown Source)
         at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanAttribute(Unknown Source)
         at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.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.DTDConfiguration.parse(Unknown Source)
         at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
         at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
         at org.dom4j.io.SAXReader.read(SAXReader.java:334)
         at org.dom4j.io.SAXReader.read(SAXReader.java:264)
         at com.test.XMLHelper.loadDocument(XMLHelper.java:57)
         at com.test.Sample.main(Sample.java:41)
    Can any body help me out.
    Thanks,
    S

    Hey...
    I got the solution..... it's all because of charset UTF-8 used in xml doctype/CharEncoding, As my JVM is running on OS for French locale i need to make use of 'ISO-8859-1' as CharEncoding.
    This resolved my problem.
    Anyways thanks.
    Sid
    Edited by: hiremath47 on May 20, 2010 5:48 PM

  • Invalid byte 1 of 1 byte utf 8 sequence(BI Mobile 4.0)

    hi..
    i want to try open a report from my ipad..
    in the report the only prompt is the day.
    but when i try the refresh report i see "invalid byte 1 of 1 byte utf 8 sequence"
    so i cant refresh report..
    what can i do..
    thanks in advance.

    The problem is in the file format. I do not know exact solution for this since I'm not familiar with BI Mobile 4.0. The report you try to open is really not in UTF-8 format. I would quess it is in ISO-8859-1 or similar format so you need to change this into the UTF-8 format somehow.
    Edited by: Mika Karvonen on Sep 15, 2011 2:27 PM

  • Invalid byte 2 of 3-byte UTF-8 sequence error

    I'm writing a java program that accesses an XML file and do some computation on it. The problem is that the program works on small sample XML files, but when trying to work with big XML files (which was generated by other program) I get "Invalid byte 2 of 3-byte UTF-8 sequence" parsing error. Any tips?

    Hi,
    Check the encoding to be used for the data..or else check whether the RFC connections used are set to unicode...
    if possible execute the request in SAP and check what is the output it is generating...if it is proper over there then you need to identify the encoding to be used when it comes to PI..
    HTH
    Rajesh

  • ConvertToClob and byte order mark for UTF-8

    We are converting a blob to a clob. The blob contains the utf-8 byte representation (including the 3-byte byte order mark) of an xml-document. The clob is then passed as parameter to xmlparser.parseClob. This works when the database character set is AL32UTF8, but on a database with character set WE8ISO8859P1 the clob contains an '¿' before the '<'AL32UTF8');
    I would assume that the ConvertToClob function would understand the byte order mark for UTF-8 in the blob and not include any parts of it in the clob. The byte order mark for UTF-8 consists of the byte sequence EF BB BF. The last byte BF corresponds to the upside down question mark '¿' in ISO-8859-1. Too me, it seems as if ConvertToClob is not converting correctly.
    Am I missing something?
    code snippets:
    l_lang_context number := 1;
    dbms_lob.createtemporary(l_file_clob, TRUE);
    dbms_lob.convertToClob(l_file_clob, l_file_blob,l_file_size, l_dest_offset,
                                       l_src_offset, l_blob_csid, l_lang_context, l_warning);
    procedure fetch_xmldoc(p_xmlclob in out nocopy clob,
                                       o_xmldoc out xmldom.DOMDocument) is
    parser xmlparser.Parser;
    begin
      parser := xmlparser.newParser;
      xmlparser.parseClob(p => parser, doc => p_xmlclob);
      o_xmldoc := xmlparser.getDocument(parser);
      xmlparser.freeParser(parser);
    end;The database version is 10.2.0.3 on Solaris 10 x86_64
    Eyðun
    Edited by: Eyðun E. Jacobsen on Apr 24, 2009 8:58 PM

    can this be of some help? http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/functions027.htm#SQLRF00620
    Regards
    Etbin

  • Converting bytes to unsigned bytes

          int u=0;
          int i=32;
    byte []  data1 = new byte[1024];
    int[] unsignedValue=new int[1024];
    while(u<100){
                        unsignedValue[u] =data1[i] & 0xff;
                          u++;
                          i++;
                       } from input stream iam storing bytes in data1.now i want to convert specific bytes to unsigned bytes.
    here i tryed in the above way but i want to convert
    2 to 8
    12 to 18
    22 to 28
    bytes to unsigned and i want to store how can i do this?

    nanda_java wrote:
    in my fist post only i multiplyes with 0xff .and i gave code ...my question is how to multiply only specific
    2 to 8
    12 to 18
    22 to 28
    bytes with 0xff .the bytes are in data1.I have no idea what you're saying, and I have no idea what the significance of those ranges is.
    Look, you've already been told this twice: Say you get the byte 0xFE. That byte is neither signed nor unsigned. Get that into your head. It's simply a byte. The concept of signed/unsigned only comes into play when you decide to treat that as an integer value. You might want it to represent -2, or you might want it to represent 254. If you store it in a Java byte, it will represent -2. You cannot change that. If you want 0xFE to mean 254, then mask it with 0xFF and store it in an int.
    byte b = -2;
    System.out.println(b & 0xFF); // prints 254Furthermore, as already stated, in many cases it doesn't matter if it's signed or unsigned. If you do addtion, subtraction, multiplication (I think), AND, OR, XOR, you'll get the same byte result, regardless of whether you consider it signed or unsigned, and again, signed/unsigned only matters if you care about the numerical value of that signed result, rather than simply its bit pattern. 0xFE - 0x01 = 0xFD, and you can take that as -2 -1 = -3 or as 254 - 1 = 253. The bytes are the same regardless.
    What part are you not understanding? Don't just keep repeating the same thing about how it's unsigned and 2 to 8 and all that nonsense.
    So please, define your problem more clearly.
    Edited by: jverd on Jan 10, 2008 8:53 AM

  • [svn:osmf:] 11205: Fix bug FM-169: Trait support for data transfer sample doesn' t display bytes loaded and bytes total for SWF element

    Revision: 11205
    Author:   [email protected]
    Date:     2009-10-27 15:04:26 -0700 (Tue, 27 Oct 2009)
    Log Message:
    Fix bug FM-169: Trait support for data transfer sample doesn't display bytes loaded and bytes total for SWF element
    Ticket Links:
        http://bugs.adobe.com/jira/browse/FM-169
    Modified Paths:
        osmf/trunk/apps/samples/framework/PluginSample/src/PluginSample.mxml
        osmf/trunk/apps/samples/framework/PluginSample/src/org/osmf/model/Model.as

    The bug is known, and a patch has been submitted: https://bugs.freedesktop.org/show_bug.cgi?id=80151. There's been no update since friday, so I wonder what the current status is, or if it's up for review at all.
    Does anyone know how we can be notified when this patch hits the kernel?

  • To find out whether a character is of Single byte or Double bytes

    hi,
    is there any built-in class to find whether a character is a single byte or double byte. is there any method to do so?? If possible can someone provide a sample code snippet to do a check for single byte and double byte characters.
    thanx in advance.....

    If you are asking what size the char primitive is, it's 16 bits.
    If you want to know the numerical value of a char, you can cast it to an int and compare it to 255 to see if it fits in 1 byte.

  • Form English Char ( Single Byte  ) TO Double Byte ( Japanese Char )

    Hello EveryOne !!!!
    I need Help !!
    I am new to Java ,.... I got assignment where i need to Check the String , if that string Contains Any Non Japanse Character ( a~z , A~Z , 0 -9 ) then this should be replaced with Double Byte ( Japanese Char )...
    I am using Java 1.2 ..
    Please guide me ...
    thanks and regards
    Maruti Chavan

    hello ..
    as you all asked Detail requirement here i an pasting C code where 'a' is passed as input character ..after process it is giving me Double Byte Japanese "A" .. i want this to be Done ..using this i am able to Convert APLHA-Numeric from singale byte to Doubel Byte ( Japanse ) ...
    Same program i want to Java ... so pleas guide me ..
    #include <stdio.h>
    int main( int argc, char *argv[] )
    char c[2];
    char d[3];
    strcpy( c, "a" ); // a is input char
    d[0] = 0xa3;
    d[1] = c[0] + 0x80;
    printf( ":%s:\n", c ); // Orginal Single byte char
    printf( ":%s:\n", d ); // Converted Double Byte ..
    please ..
    thax and regards
    Maruti Chavan

Maybe you are looking for

  • New folder is not visible inside my project but shows in Windows Explorer.

    I created a new folder under another folder.  The new folder is not visible inside my project but shows in Windows Explorer.  Also, if I try to add another folder of that same name, it denies the action since the folder (although invisible) already e

  • Badi or Exit for changing subscreen in PO

    Hi Friends, Is there any Badi or Exit for changing shipping subscreen at item level for Purchase order.actualy my requirement is to supress all fields on shipping subscreen(Item Level) except route.How can I do it???? Please help...

  • Itunes was not installed properly, please reinstall - how do I do this?

    itunes has stopped working - I get an error message stating that itunes was not properly installed, please reinstall how do I do this?   I have only been having problems since the last upgrade..... HELP!

  • Custom Icon Not Appear in iTune

    I am ready to submit my apps but I am stuck because of one simple problem that I cannot solve. When I go through Project > Export Release, the custom icon does not show up in iTune, but they are shown in my iPhone, iPod and iPad The default icon appe

  • How to make download window open to front

    When I download a file, how can I make the download window automatically come to the front?