"&# 19" is an invalid XML character.

HI!
I have created a query template which runs an Oracle stored procedure:
CALL Stored_Proc_Name('[Param.1]','[Param.2]',:x).
When I test it and show result in "text/html" it works well.
Now, I have added an "SQL Query action bloc" in a BLS which referred to that last query template. When I'm trying to generate sample XML of the action bloc, I’m getting the following error message:
"There was an error generating sample XML.
Error message: Character reference
"& #19" is an invalid XML character."
I did a search in my result but I didn't find any weird character.
Also, I did try to output the result of my query template in "text/xml" format. I was able to see some results but i was getting a JAVA error on the page: Invalid character.
Any idea of what this could be and to resolve it without encoding database content?

Marie-Helene,
It may very well be that a non-unicode (unfriendly xml character) symbol ended up in the db through an import of some sort or a copy/paste.  If you can focus on the string fields like a comment field, etc. you may be able to filter your query a bit to see where or which record is not playing well with the query template.
It is possible that sending the saved query template results to an iGrid may work since xml is not in the mix.  If that works and you can narrow it down you may be able to see the strange character(s) visibly in the applet. 
Another thing to try would be to run a query in a format such as:  http://<servername>:<port>/Lighthammer/Illuminator?QueryTemplate=Folder/NameQuery&Content-Type=raw/binary
The raw binary feed is the same used by the applets, but when the browser gets the results it won't know what to do with the mime-type and IE will give you the Open/Save As dialog.  If you save it to disk you may be able to find the character and position by opening the saved file with a text editor.
Best Regards,
Jeremy Good

Similar Messages

  • Org.xml.sax.SAXParseException: An invalid XML character (Unicode: 0x80) was found in the CDATA section

              Hi,
              I,'m using c.tld tag libraries from Yakarta in order to use c:if functions.
              When I use non-unicode characters in my JSP pages, it crashes:
              java.io.IOException: javax.servlet.jsp.JspException: The taglib validator rejected
              the page: "org.xml.sax.SAXParseException: An invalid XML character (Unicode: 0x80)
              was found in the CDATA section., "
                   at weblogic.servlet.jsp.Jsp2Java.outputs(Jsp2Java.java:124)
                   at weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:258)
                   at weblogic.servlet.jsp.JspStub.compilePage(JspStub.java:353)
                   at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:211)
                   at weblogic.servlet.jsp.JspStub.checkForReload(JspStub.java:149)
                   at weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:521)
                   at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:351)
                   at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:306)
                   at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:5445)
                   at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:780)
                   at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3105)
                   at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2588)
                   at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:213)
                   at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:189)
              How can I force it to use ISO-8859-1? All my tries haven't work. What should I
              do? The c.tld libraries and jars are taken from JDK 1.4.1_02
              

    Hi Stefan,
       This is my source xml in moni..
    xmlns:prx="urn:sap.com:proxy:ECP:/1SAI/TAS5BFDF495190544E4B506:701:2008/06/06">
      <SiteId>0080</SiteId>
      <UCC>42027519 91029010015</UCC>
    My interface is SAP(Proxy) to Database(Synchronous).
       SAP (PROXY) --> PI --> DATABASE ( Synchronous Communication )
    Let me know if u need any information from my side...
    Thanks for ur help...
    Thanks,
    Siva..

  • Error in moni as invalid XML character (Unicode: 0x16) was found

    Hello Experts,
    I am facing an issue in Production interface is Proxy - -> JDBC data is passing in ECC successfully in PI moni it is showing error
    as                  Runtime Exception when executing application mapping program com/sap/xi/tf/_MaterialPlantFromSAP_to_MaterialPlantToDYNAMINE_; Details: com.sap.aii.utilxi.misc.api.BaseRuntimeException; An invalid XML character (Unicode: 0x16) was found in the element content of the document.
    when i try to open the payload it is showing data is too long when i click on open screen is getting hang showing as not responding.I have checked in the ECC it is also showing data is too long when i click on open after 1 min payload is opening when i try to copy the payload and paste in Message mapping test tab again screen is getting hanging when i try to test with 20 or 30 records in Mapping it going through.
    I have downloaded that XML file from ECC moni it is 8.83 MB .
    PI can process this huge file ? please suggest me how to pass data in chunks .And also i am not understanding error is due to Payload has not correct data or Payload is huge.
    Please throw some light on the issue any help is highly appreciated.
    Regards
    Praveen Reddy

    Hi Praveen,
                       you need a HEX editor. Please download one from this link
    http://www.chmaas.handshake.de/delphi/freeware/xvi32/xvi32.htm
    Here in the editor search for the HEX value 0X16 and see the corrosponding charcater in payload.
    Try getting rid of the character before it reaches Integrtaion engine possibly with java mapping.
    Regards
    Anupam
    Edited by: anupamsap on Jan 4, 2012 6:43 PM

  • An invalid XML character (Unicode: 0x0) was found in the prolog of the docu

    Hi folks,
    I'm using the SAX parser to parse a small xml file. If I use that file in IE, there its parsing correctly and displaying the xml in the tree structure.
    But in my Java code its throwing
    org.xml.sax.SAXParseException: An invalid XML character (Unicode: 0x0) was found in the prolog of the document.
    The xml parsing code of my program is
    XMLReader parser = XMLReaderFactory.createXMLReader(
    "org.apache.xerces.parsers.SAXParser");
    HelpPartHandler hp = new HelpPartHandler();
    parser.setContentHandler(hp);
    RandomAccessFile raf = new RandomAccessFile("sample.xml","r");
    byte Contents[] = new byte[(int)raf.length()];
    StringReader sr = new StringReader(new String(Contents));
    InputSource is = new InputSource(sr);
    parser.parse(is);
    The xml file is
    <?xml version="1.0"?>
    <ROOT>
    <NODE> Java </NODE>
    </ROOT>
    Please let me know the mistakes what I have done. Looking for the reply.
    Thanks in Advance
    Prabu

    The message seems clear to me. Your document contains a null character, which is not valid in an XML document. Take it out of the document, and change whatever produced the document to not put it there. (I hope you don't consider Microsoft software to be standards-compliant.)

  • Invalid XML character in web service answer of MS Exchange

    Hello Forum!
    We have to look up contacts in the global address list of a Microsoft Exchange server.
    The current solution uses the web services that have been introduced in version 2007 of MS Exchange.
    Unfortunately some records returned by the MS Server cause a javax.xml.stream.XMLStreamException. The Exception
    tells us that a parser error occurred. The Exception says:
    Message: Character reference "&#x7" is an invalid XML character.
    The Java classes used for accessing the Exchange web services are generated using the jaxws plugin and the application
    is running on the Glassfish application server v2 ur1.
    The only solution we can think of right now is to access the XML stream returned by the Exchange server before it is handed over
    to the parser in order to replace the invalid characters.
    Can anyone point me to some documentation or give me an example of how to intercept the XML parsing process used by the jaxws
    component?
    Any other ideas for a solution are of course also appreciated.
    Thanks for your help in advance,
    Henning Malzahn

    hm@collogia wrote:
    In addition to that MS is not very responsive when it comes to Java questions.Yes, but "Your software is producing malformed XML" is not a Java question.
    I can imagine that filtering the stream isn't very easy - are you able to provide some links to additional
    information that can help us getting started in that direction?A subclass of FilterInputStream whose read() method calls the superclass's read() method a second time when the input is between 0 and 19, or whatever are the invalid XML characters?

  • Com.sap.aii.utilxi.misc.api.BaseRuntimeException:An invalid XML character (Unicode: 0x1f) was found in the element content of the document

    Hi,
    I'm getting the below runtime exception during IDOC- SOAP message mapping in Integration engine.
    "Runtime exception occurred during application mapping com/sap/xi/tf/<<<\\Message mapping object name\\>>>; com.sap.aii.utilxi.misc.api.BaseRuntimeException:An invalid XML character (Unicode: 0x1f) was found in the element content of the document"
    I have no clue why this exception occurs. Could anyone say the reason of the exception?
    Thanks!
    Regards,
    Gopi

    Hi Gopinath
    Check this thread
    An invalid XML character (Unicode: 0x1d) was found in the element
    Kind regards
    Javi

  • RFC to JDBC - Character reference invalid XML character

    Dear all Gurus,
    I have developed a RFC to JDBC scenareo and when trying to pass data i get a error saying (sxmb_moni) - "Runtime exception occurred during application mapping com/sap/xi/tf/_MM_de_cx_xd01_va01_2_Siebel_; com.sap.aii.utilxi.misc.api.BaseRuntimeException:Character reference (&quot;&amp;#00&quot;) is an invalid XML character"
    I dont pass any blank values here & tried to pass one value(there is only one not null value in the table) to the Oracle Table again above error accurs.

    Hi,
    You can solve this problem performing following steps in your ECC system:
    1. Go to transaction sm59 and locate the RFC Destination for your PI system. Double-click to open it.
    2. Perform a "Unicode Test" using the button in top menu or pressing Ctrl+F5. The result will either say "Target is a unicode system" or "is NOT a unicode system".
    3. Go to "MDMP & Unicode" tab page and set Non-Unicode or Unicode connection mode, depending on the result of your test in step 2.
    Alternatively, you can also find your Sender Communication Channel in PI's ID and set the Unicode indicator there - it should be consistent with what is set in sm59 in your backend system.
    Hope this helps,
    Greg

  • Character reference "&#0" is an invalid XML character

    Hi When I am trying to parse the XMl using SAX , its giving me the following FATAL error
    FATAL Error while validating the XML document:
    Character reference "&#0" is an invalid XML character
    Pl shelp me to resolve this

    My xml file contains illegal char such as 0x00 0x10 am trying to
    remove them and replace them with " &#14 or &#16" he SAX parser says " &#14 or &#16" an illegal inavlid char.
    What would be the probable solution for this.
    Thanks
    Naveen
    Message was edited by:
    Naveen_Ratkal

  • Fix Invalid XML character (Unicode: 0x1c) before xml data parsing

    How to fix the error :- "An invalid XML character (Unicode: 0x1c) was found in the element content of the document."
    This error message is generated before parsing of xml data.
    So how to filter the unwanted characters like 0x1c during XML file generation?

    ASCII has nothing to do with it. XML is a text format and so an XML file may only include text characters. 0x7 isn't a text character, it's a control character, and it isn't allowed to occur in an XML file.
    As for how to identify which character is causing the problem, the error message tells you that.

  • Invalid XML character in castor XML

    I am using castor API for converting an object into XML. When I marshal the object, following exception occur:
    java.io.IOException: The character '' is an invalid XML character
         at org.apache.xml.serialize.BaseMarkupSerializer.characters(Unknown Source)
         at org.exolab.castor.xml.Marshaller.marshal(Unknown Source)
         at org.exolab.castor.xml.Marshaller.marshal(Unknown Source)
         at org.exolab.castor.xml.Marshaller.marshal(Unknown Source)
    Following is the code snippet which I am using:
    StringWriter writer = new StringWriter(500);
    Marshaller marshal = new Marshaller(writer);
    marshal.setEncoding("windows-1251"); //I have tried all these encodings as well: UTF-8, UTF-7, ASCII, ISO-8859-1, ISO-8859-5, windows-1251
    //marshal.marshal(token, writer);     // This is commented, since the encoding is not applied if I use this method, next statement works fine
    marshal.marshal(token);Here, token is the object which I am trying to marshal. I have tried different encodings, but the problem is not resolved. Could anyone help?
    Castor reference:
    [http://www.castor.org/xml-framework.html ]

    Do you want this encoding to be reversible? For example, that character \u001b which is in the string. You have to represent it by something different in your XML. If you want to get the same thing back when you convert your XML back into Java, then you can't just translate that character into an existing character, because then you have lost information. You have to translate it into some special series of codes. And then when you convert the XML back, you have to recognize that special series of codes and convert that into the \u001b character.
    So yeah, you could write your own custom encoding which did that. I'm not aware of any existing software that does that; it wouldn't be very useful, because it would result in XML documents which used non-standard encodings and hence couldn't be sent to anybody else.

  • Handle invalid xml character while serializing

    I have requirement where I need to serialize a document which contains a string like "ンᅧᅭ%ンᅨ &amp;". While serializing it throws the following exception
    java.io.IOException: The character ' ' is an invalid XML character
    Is there a way we can serialize this String as is with any workaround.
    StringWriter stringOut = new StringWriter();
      DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
      DocumentBuilder docBuilder = docFactory.newDocumentBuilder();
      Document doc = docBuilder.newDocument();
      Element rootElement = doc.createElement("company");
      doc.appendChild(rootElement);
      String xml = "ンᅧᅭ%ンᅨ &amp;";
      //String xml = "ンᅧᅭ%ンᅨ &amp;";
      Element junk = doc.createElement("replyToQ");
      junk.appendChild(doc.createCDATASection(xml));
      //junk.appendChild(doc.createTextNode(stripNonValidXMLCharacters(xml)));
      rootElement.appendChild(junk);
      //org.w3c.dom.Document doc = this.toDOM();
      //Serialize DOM
      OutputFormat format = new OutputFormat(doc,"UTF-8",true);
      format.setIndenting(false);
      format.setLineSeparator("");
      format.setPreserveSpace(true);
      format.setOmitXMLDeclaration(false);
      XMLSerializer serial = new XMLSerializer( stringOut, format );
      // As a DOM Serializer
      serial.asDOMSerializer();
      serial.serialize( doc.getDocumentElement() );

    As a guess because you are treating CDATA as meaning the same as 'binary' which it isn't.  The characters in CDATA still must be valid XML characters.
    If you want binary data then base64 encode it and put that in the document - and you won't need CDATA at all then, it will just be regular element text.

  • Getting invalid xml character while marshalling

    Hi
    I have a text which contains all characters including some special chars.I am replacing the html codes for &,>,<,\," characters. I am building the xml file and trying to marshall it. But i am getting "The character '' is an invalid XML character". I am using castor-0.9.6.jar. Can any one tell me how can i handle special chars like � is easy way rather than repacing each and every character.
    Please let me know why i am getting the above error (is the special char end of file char. actually i am reating from string not from file).
    Thanks & Regards,
    Prasanth

    As a guess because you are treating CDATA as meaning the same as 'binary' which it isn't.  The characters in CDATA still must be valid XML characters.
    If you want binary data then base64 encode it and put that in the document - and you won't need CDATA at all then, it will just be regular element text.

  • Invalid XML character

    Hi,
    I'm adding new functionality to an existing code. It generates an XML page with additional fields. It was working fine, when I added new fiels to this web page I'm getting the following error.
    I'm new to this and I don't know how to pin point the error.
    can any one please help me.
    Input XSL: 1, 20788: Invalid XML character. (Unicode: 0x1a)
    Input XSL: 1, 20956: Invalid XML character. (Unicode: 0x1a)
    Input XSL: 1, 21190: Invalid XML character. (Unicode: 0x1a)
    Input XSL: 1, 21370: Invalid XML character. (Unicode: 0x1a)
    thanks,

    I tried this but still no luck.
    int j = 0xa1, i;
                   while ((i = dis.readByte()) != -1) {
                        if (i == j) {
                             System.out.print("got it");
                             break;
                        } else {
                             System.out.print((char) i);
    [\code]
    thanks                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Mapping error: Character reference "&# 00" is an invalid XML character

    Hi All,
      Iam performing the RFC(R/3) -> PI(7.1) -> SOAP (third party software) ; Synchronous scenario.
    The messages are reaching the PI server , but the a mapping errors is occurring due to dummy characters ""& #00" been sent to the XI system.
    Is this due to the R/3 sending the invalid characters or these been generated in PI system. Would you suggest any notes,patches to resolve the issue?
    "MAPPING">EXCEPTION_DURING_EXECUTE
    com.sap.aii.utilxi.misc.api.BaseRuntimeException:
    Character reference "& # 00" is an invalid XML character
    Many thanks!
    guru

    Hi,
    If you go through this link last page and last para, which says..
    "The only solution is to use a Java mapping before the actual mapping to perform the escaping."
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/502991a2-45d9-2910-d99f-8aba5d79fb42
    Regards,
    Sarvesh

  • Invalid XML character. (Unicode: 0x7)

    Hi There,
    i get this Exception when i parse an XML file.
         Invalid XML character. (Unicode: 0x7)
    at com.ibm.xml.framework.XMLParser.handleError(XMLParser.java)
    at com.ibm.xml.framework.XMLParser.error1(XMLParser.java)
    at com.ibm.xml.internal.UTF8CharReader.skipInvalidChar(UTF8CharReader.java)
    at com.ibm.xml.internal.DefaultScanner.scanContent(DefaultScanner.java)
    at com.ibm.xml.internal.DefaultScanner.scanDocument(DefaultScanner.java)
    at com.ibm.xml.framework.XMLParser.parse(XMLParser.java)
    Basically, the data for the XML are picked from my 8i database and when i use a SAX parser to validate the formed XML, i get the exception above. The character do not appear to be outside ASCII range to me.
    Any idea how i cld overcome this problem or identify which/what character is causing this problem? Am using a xmk4j 2.x parser.
    Tks is advance.
    -Sakthi

    ASCII has nothing to do with it. XML is a text format and so an XML file may only include text characters. 0x7 isn't a text character, it's a control character, and it isn't allowed to occur in an XML file.
    As for how to identify which character is causing the problem, the error message tells you that.

  • Invalid xml character(0x0)

    Hi All,
    I am generating an xml file using JAXB using ISO-8859-1 encoding.
    While parsing that xml file using XmlReader , I am getting exception as "UnmarshallerException : invalid xml character(0x0) found in xml ".
    Can I put some filter before creating xml file using JAXB so that it wont allow an invalid character to be written into xml file ?
    Please provide some code ,

    Hi Xavi,
    " suppose we have to do it before to take the file, or another way could be to take the file without content conversion, and with a java mapping delete the nulls and create the message we send to R/3.
    What do you think about this?"
    Ans)
    Yes that's correct. You can follow this blog http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/4018
    where without FCC the mapping code directly creates the target XML.  you can add code to replace all null characters as example shown below
    String line = bin.readLine();
    String s="";
    for(int i=0;i<line.length();++i)
         if(line.charAt(i)!=)0X00)
            s=s+line.charAt(i);
    line=s;
    Any source interface is fine in interface mapping and no need to use FCC. Rest all setrtings will be normal as per the blog.
    Regards
    Anupam

Maybe you are looking for

  • Where to download SAPK-75009INCPMBPC

    Dear All, from this url [https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/spat/index.htm?sp1=SAPK-75009INCPMBPC|https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/spat/index.htm?sp1=SAPK-75009INCPMBPC] show all notes that will i

  • How to define a purchase order output print view as my element

    Dear all :          I have created a purchase order and want to print,but i found the details of print doc is not my requirements.So,I want to change it .I don't know where the path is .THKS                                               Brian

  • Issue with addPrincipal() of Interface DocumentAcl

    Hi all, There is an issue with the addPrincipal(String id, String format, int idType) method of interface DocumentAcl which creates/sets readers for a document and validates them on identity management system. When I use this method for small number

  • Itunes 6.0.4 (3) update - wont play music + no sound on other applications

    I have auto-update on and normally all the updates seem to be good... however I cant play any songs and therefore no sound from my speakers at all. All the music etc is there, press play and nothing... I had a look at Quicktime too and again no sound

  • Flex 14 Win 8.1 Atheros ar2012 bluetooth drivers

    Hello. My system: lenovo Flex 14 pentium processor, board bluetooth Atheros ar3012. Bought Juanuary 16th 2014, 3 days ago. Trouble: bluetooth find devices but the connection fall immediately. Error message: drive error. On the Lenovo web the only dri