Parser: Invalid Sequence error

I'm using the Google API's map web service to geocode some addresses. The program works fine for US addresses until it tries an address in Germany that causes this fatal error:
[Fatal Error] geo?output=xml&key=AB...Q&q=HOLBEINSTRASSE+GERMANY%2C:1:220: Invalid byte 2 of 2-byte UTF-8 sequence.
org.xml.sax.SAXParseException: Invalid byte 2 of 2-byte UTF-8 sequence.
     at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source)
     at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source)
     at javax.xml.parsers.DocumentBuilder.parse(Unknown Source)
     at Geocode.main(Geocode.java:77)
However, in the browser, the resulting XML shows up fine as:
<?xml version="1.0" encoding="UTF-8"?>
  <kml xmlns="http://earth.google.com/kml/2.0">
    <Response>
      <name>HOLBEINSTRASSE GERMANY,</name>
        <Status>
          <code>200</code>
          <request>geocode</request>
        </Status>
      <Placemark>
        <address>Holbeinstra�e, 55543 Bad Kreuznach, Germany</address>
           <AddressDetails Accuracy="6">
           <Country>
           <CountryNameCode>DE</CountryNameCode>
.... etc.It seems that the � symbol isn't part of UTF-8 and that causes the parser to crash. I've search high and low for any related solution but most seem to imply changing the document's encoding. I can't do that here because this XML document is returned by a web service.
This is my code:
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
factory.setNamespaceAware(true);
DocumentBuilder parser = factory.newDocumentBuilder();
// set up a document purely to hold the namespace mappings
DOMImplementation impl = parser.getDOMImplementation();
Document namespaceHolder = impl.createDocument("http://earth.google.com/kml/2.0", "f:namespaceMapping", null);
Element root = namespaceHolder.getDocumentElement();
root.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns:f", "http://earth.google.com/kml/2.0");
String strWebServiceURI = "http://maps.google.com/maps/geo?output=xml&key=AB..Q&q=";
strWebServiceURI += URLEncoder.encode("HOLBEINSTRASSE GERMANY,", "UTF-8");       
Node doc = parser.parse(strWebServiceURI);
...

Hi,
Just try this SQL Query.
SELECT 'C/' || :P2_MARKET_CODE|| '/' || TO_CHAR (TO_DATE(:P2_START_DATE, 'DD-MON-YY'), 'MMYY')|| '/' FROM DUAL;
Regards,
Kartik Patel
http://patelkartik.blogspot.com/
http://apex.oracle.com/pls/apex/f?p=9904351712:1
Edited by: Kartik Patel on Mar 7, 2011 11:53 AM

Similar Messages

  • Oracle Payables - APXIIMPT  - Invalid Sequence rejections

    Hello Guys:
    My Business users are complaining that they are getting lot of rejections while running APXIIMPT ( Payable Open Interface Report for Invoices) due to invalid sequence error. We logged a TAR with oracle and I am not getting any where after this. The support tech expects me to work with her as a functional consultant but I am not. I am pasting the response from the Support tech.
    Can any one give me more details on How to check this? I would really appreciate it.
    We are using Standard Invoice - STDINV
    The first statement says we need to check the document category code, but she never explains how to check this. I looked at the Oracle payables guide and it is completely text no diagrams.
    Regards,
    Bala
    UPDATE
    =======
    I gave you step by step on how to check the document catergory code that you are using for the invoice above.
    The rejection you are receiving is usually because you have not setup the document catergory code correctly
    Just replace the create with the name of the sequence you already have set up and
    check to see if it is setup as the above.
    For example:
    1. Application>Document>Define (query on sequence you are using for the invoice)
    A sequence can be Manual or Automatic.
    If it is Automatic an Oracle Sequence Object will be created starting
    at the designated beginning number and that sequence will be used to
    generate the document numbers. After a record in this form is
    saved, and type = Automatic, a Concurrent Process is submitted to create
    the Oracle Sequence.
    2. Examine Document Categories
    Application>Document> query on Categories assigned to sequence above
    There are numerous document categories already defined for Oracle Payables.
    The default category used in creating Voucher numbers for Payables Invoices
    in the Invoice Workbench is STD INV.
    If the Payables "Option Allow Document Category Override" in the
    Invoice region is checked, the Document Category can be changed to any category
    that has a Table Name of AP_INVOICES_ALL.
    3. Assign Document Sequence to a Category.
    Application>Document>query on Assign
    In the Documents Region, indicate the application, the document category,
    the set of books, and the method of entering the sequence number.
    The method is Automatic, Manual, or Null.
    THIS IS THE MOST COMMON SOURCE OF ERROR.
    The method is used to tell the system how the record is being created:
    a. Manual means that the record is being created by a form such
    as the Invoice Workbench.
    b. Automatic means the record is being created by a Concurrent
    Process such as Invoice Import.
    Setting the assignment as Automatic, will result in an error when
    trying to enter an invoice using the Invoice Workbench.

    For whatever it is worth....
    This is resolved by ledger set up--> Accounting Setups and adding the balancing segments for which the accounts relate to.

  • Encoding sequence error

    Hi Experts,
      We are having a synchronous scenario Websphere to PI. We are getting this error while parsing,
    "Encoding sequence error"
       Some special characters coming into PI box and they are unable to Parse by PI. This message is failing in Message Mapping with this error. The xml is of "UTF-8" codepage only.
    Now we need to get this mapping succesfull with out removing those special characters. Can you please help us in this?
    Thanks,
    Anudeep.

    Hi Raj,
      Websphere team is sending it in UTF-8 format only.

  • Error in mail sender channel : invalid sequence number

    Hello all,
    I'm having the following issue.
    I'm using the mail adapter to get messages from a mail server, which are attached to the mail.
    This interface is already productive, and is working fine most of the time.
    Only frequently I get the following error, which can be found in the java log.
    exception caught during processing mail message[630];
    java.io.IOException: the specified message not found: -ERR invalid sequence
    number
    This error seems only to appear when there are a lot of mails to be fetched.
    All the mail is read into PI and processed succesfully, only I also get a lot these errors.
    Does anyone know what causes this error?
    I also don't know where this sequence number is coming from, and what's the meaning of this.
    Is it possible it's trying to read the same mail more then once?
    The settings in the mail sender channel are:
    - transport protocol : POP3
    - message protocol : XIPAYLOAD
    - Use mail package : enabled
    - content encoding : none
    - Keep attachments : enabled
    - QOS : exactly once
    - Set adapter specific message attibutes : enabled
    The PI version is 7.01
    Thanks a lot in advance for the replies on this question.
    Kind regards,
    Marco van Iersel

    Hi
    Well we have used it with POP3 and it is working in the way as it should be.
    This feature is recommended  by sap when the number of emails to be read is large.
    You can set this additional parameter to restrict the number of mails fetched by sender mail adapter in one polling interval.
    Sometimes the mailbox configured for the sender mail adapter contains large number of unread mails, which exceeds the average expected number of mails in one polling interval. In such a case, processing of all the unread mails in the same polling interval by sender mail adapter degrades the system performance. To avoid this, set value of this parameter to the maximum number of mails to be fetched and processed in one polling interval. The remaining mails exceeding the limit would be processed in the next polling interval.
    That's why I have asked you to give it a try.

  • Error parsing feed: invalid XML: Error Line 1: Content isnot allowed in pr

    Hi I am trying t post a new podcast via iTunes but get an error
    Error parsing feed: invalid XML: Error Line 1: Content is not allowed in prolog
    this is my URL
    http://www.rolandjyoung.pwp.blueyonder.co.uk/podcast/dripodepisode1.mp3
    any ideas?

    That's not a feed, it's a web page. Your feed is at
    http://www.blogtalkradio.com/bluespot.rss
    and this can be subscribed to successfully in iTunes.

  • WHAT IS THE FIX TO THIS ERROR:  XML Parsing error: not well-formed (invalid token) (error code 4)

    Hello, looking to see if there's anyone out there who knows how to resolve this error from popping up when I open a previously saved adobe file with data populated inside (tax form). 
    The error states: 
    XML Parsing error: not well-formed (invalid token) (error code 4), line 16028, column 2 of file. 
    So when I go to open this file, THAT ERROR appears.  But then allows me to view the content inside the PDF (tax form) - however it will not allow further editing - this is an issue. 
    This began after working and populating certain files, then transferring to a hosting site.  Now when I open any PDF file from the hosting site, the error appears.  Could just be coincidental however throwing that out there in case it's useful.
    What causes this error & what is the fix?
    Cheers! 

    Unfortunately No.  This was a tax form downloaded from IRS.gov.  The PDF file has been populated and saved off.  I believe the file has somehow become corrupt.  Curious how to cleanse the file so it opens without issue (that error message).
    Thanks for your response

  • The following syntax error occurred during parsing: Invalid token, Line 1,

    Hello Experts,
    I hope someone could help me. I am trying to create a MDX formula in Account dimension (Cuenta).
    When formula created use "Iif" syntax, system give the following error:
      - [CUENTA].[H1].[#X000] Parser: The following syntax error occurred during parsing: Invalid token, Line 1, Offset 15, [.
    My Account dimension (Cuenta) has 3 parent, and the formula introduces is:
    'Iif([Cuenta].[H1].[BLOQ_FASEC]<0.5 and [Cuenta].[H1].[BLOQ_FASEC]>-0.5,0,[Cuenta].[H1].[BLOQ_FASEC])
    We try another syntax
    'Iif([Cuenta].[BLOQ_FASEC]<0.5 and [Cuenta].[BLOQ_FASEC]>-0.5,0,[Cuenta].[BLOQ_FASEC])
    But same error persist.
    Could you have any idea?
    Thanks

    Can you check into dimension properties what is the size of FORMULA propertiy?
    Make sure is bigger than number of chars from your formula.
    Do you have multiple hierarchies for CUENTA?
    The formula which you mentioned it has to be into column: FORMULAH1.
    Also make sure that your formula doesn't have an end of line at the end. That can cause again problems.
    Regards
    Sorin Radulescu
    Edited by: Sorin Radulescu on Apr 22, 2010 11:03 AM

  • Invalid InputSource Error using XML Parser V2

    I'm using the following code to read xml from
    a clob field in an Oracle database.
    try
    // Parse xsl and xml documents
    parser = new DOMParser();
    parser.setPreserveWhitespace(true);
    Statement sqlSel=conn.createStatement();
    ResultSet xmlDet=sqlSel.executeQuery("SELECT * FROM USER_XML WHERE IHC_USER_ID='123456789'");
    if (xmlDet.next())
    CLOB xmlCLOB= ((OracleResultSet)xmlDet).getCLOB(2);
    int index=0;
    Reader clobStream=xmlCLOB.getCharacterStream();
    parser.parse(clobStream);
    Everything seems to work fine, and I can
    create a String from the stream which contains the entire XML document. However, if I try to do the above and parse the Stream, or alternatively parse the String resulting from the stream, I get the following Error:
    nvalid InputSource.
    void oracle.xml.parser.v2.XMLError.flushErrors()
    void oracle.xml.parser.v2.XMLError.error(int, int, java.lang.String, java.lang.String, java.lang.String, int, java.lang.Exception, int, boolean)
    void oracle.xml.parser.v2.XMLError.error(oracle.xml.parser.v2.XMLReader, java.lang.String, int, java.lang.Exception, int, boolean)
    void oracle.xml.parser.v2.XMLReader.pushXMLReader(org.xml.sax.InputSource)
    void oracle.xml.parser.v2.XMLParser.parse(java.lang.String)
    void xmlquerydb.testParse()
    void xmlquerydb.main(java.lang.String[])
    Any ideas what could cause this?

    I'm quite sure the xml documents are valid.
    At present, I'm just using booklist.xml,
    which comes as an example with the XML SQL
    utility. The problem is not really with the
    parsing (If I convert the xml into a url then it parses fine).
    My real problem is pulling the document out
    of a CLOB field. Regardless of what I pass to the parser( a string or a stream), or which xml its parsing, I still get the Invalid inputsource error.

  • Error: "Invalid Sequence Flow: it connects a node located in main flow ...

    I have a error in BPM flow:
    Invalid Sequence Flow: it connects a node located in main flow (#1) to a node located in a Boundary Event flow (#2)
    The component is a "Manual Activity" (#1) connected a "Human Task" (#2)
    A another error with the same message is a "Exclusive Gateway" (#1) connected a another "Exclusive Gateway" (#2)
    Can help me?

    Thank you Jasmin and Diego. Your replies made me look carefully at my code and I found that I was not updating the repository with Document without the Policy added. I was doing the following:
    RMSecureDocumentResult protectDoc = documentManager.protectDocument(unproctDoc,                "yabby_traps_kill_platypus.pdf", policySet, lcPolicy.getName(), null, null, null);
    r.getContent().setDataDocument(unproctDoc);
    repositoryClient.updateResource(r.getPath(),r,false);
    Instead I should have been doing the following:
    RMSecureDocumentResult protectDoc = documentManager.protectDocument(unproctDoc,                "yabby_traps_kill_platypus.pdf", policySet, lcPolicy.getName(), null, null, null);
    r.getContent().setDataDocument(protectDoc.getProtectedDoc());
    repositoryClient.updateResource(r.getPath(),r,false);

  • XML Parsing error: not well-formed (invalid token) (error code 4) --- Urgent Help Needed!

    Hi all, what im doing now is im trying to create a database connection my my MS SQL 2005 database. I created a data source and went to my Adobe Lifecycle Designer 7.1, i created a new data connection, selected OLEDB and created the connection string using the build function.
    Ok, now the problem is, after creating the new data connection and i click on the preview tab, i will receive the error stated above.
    'XML Parsing error: not well-formed (invalid token) (error code 4), line 444, column 1 of file'
    Does anyone know why am i receiving this error and how do i go about solving this?
    I need this database connection to pre-fill my form when the user downloads the form =(

    I have a vital form that clients fill out, which is passed to many people in the company along the workflow. The form is a Planner and we have in the following PDF, Word Doc..
    Well before, the Planner.pdf was originally created in Word, since most people have access to Word.. but evolved to a PDF form created from the Word Doc via Adobe LiveCycle Designer 8.0 w/ User Rights enabled so that the form could be filled out and saved using Adobe Reader.. which was a step better than Word.. being that it is free. But this needed to be easier and more to the point b/c some clients don't particularly like installing the latest version of Reader, even if you provide them the link. Nor do they like saving the form, filling the form, and attaching the form to send back.
    My goal is to have the client fill an HTML version of the form, submit and be done with it, but everyone in the workflow be able to easily receive the filled Planner as a PDF form.
    So some months ago I ran into this post Chris Trip, "Populate Livecycle PDF from mySQL database using PHP" #8, 22 Sep 2007 4:37 pm
    which uses the command line Win32 pdftk.exe to merge an FDF file into an existing PDF on the remote server, and serve this to whoever.
    My problem was with shared hosting and having the ability to use the Win32 pdftk.exe along with PHP which is predominantly used on Linux boxes. And we used a Linux box.
    so i created the following unorthodox method, which a client fills the HTML version of the Planner, all field values are INSERTED into a table in MySQL DB, I and all filled planners that have been filled by clients to date can be viewed from a repository page where an XML file is served up of the corresponding client, but someone would have to have Acrobat Professional, to import the form data from the XML file into a blank form.. altoughh this is simple for me.. I have the PHP file already created so that when a Planner is filled and client submits. >> the an email is sent to me with a table row from the repository of the client name, #, email, and a link to d-load the XML file,
    But I also have the PHP files created so that the Planner can be sent to by email to various people in the workflow with certain fileds ommitted they they do not need to see, but instead of the XML file beiong served up i need the filled PDF Planner to be served.
    I can do this locally with ease on a testing server, but I am currently trying to use another host that uses cross-platform compatibility so i can use PHP and the pdftk.exe to achieve this, as that is why I am having to serve up an XML file b/c we use a Linux server for our website, and cant execute the exe.
    Now that I am testing the other server (cross-platform host), just to use them to do the PDF handling (and it's only $5 per month) I am having problems with getting READ, WRITE, EXECUTE permissions..
    Si guess a good question to ask is can PHP do the same procedure as the pdftk.exe, and i can eleminate it.
    or how in the heck can i get this data from the DB into a blank PDF form, like i have described??
    here are some link to reference
    Populating a LiveCycle PDF with PHP and MySQL
    http://www.andrewheiss.com/Tutorials?page=LiveCycle_PDFs_and_MySQL
    HTML form that passed data into a PDF
    http://www.mactech.com/articles/mactech/Vol.20/20.11/FillOnlinePDFFormsUsingHTML/index.htm l
    and an example
    http://accesspdf.com/html_pdf_form/

  • Xml parsing error: not well-formed (invalid token) (error code 4) - URGENT

    Hi all, i am doing an adobe form which requires me to pre-fill my form when a user downloads the form, but 1st i need a database connection, after creating a Data Source, i opened my intereactive form and created a new data connection, but after creating a data connection and i click on the preview tab, i will receive this error:
    'Xml parsing error: not well-formed (invalid token) (error code 4), line 444, column 1 of file'
    It really is a headach for me, i tried many ways of creating a database connection to my MS SQL 2005 database but failed, can anyone tell me why is am i receiving this error? and can someone guide me on solving this problem?
    POINTS AWARDED HANDSOMELY IF ANYONE IS WILLING TO HELP ME
    Thanks in advance

    Hi all, i am doing an adobe form which requires me to pre-fill my form when a user downloads the form, but 1st i need a database connection, after creating a Data Source, i opened my intereactive form and created a new data connection, but after creating a data connection and i click on the preview tab, i will receive this error:
    'Xml parsing error: not well-formed (invalid token) (error code 4), line 444, column 1 of file'
    It really is a headach for me, i tried many ways of creating a database connection to my MS SQL 2005 database but failed, can anyone tell me why is am i receiving this error? and can someone guide me on solving this problem?
    POINTS AWARDED HANDSOMELY IF ANYONE IS WILLING TO HELP ME
    Thanks in advance

  • Another ORA-01722: invalid number Error

    Hello All,
    I have 2 Validations on 1 Item, Not Null and Not Exists, very standard.
    select fk_session_name_id
    from hrt_session
    where fk_session_name_id = :p9_fk_session_name_id
      and fk_class_id = :p9_fk_class_id;My Item needs to be a Select List that returns the ID of FK_SESSION_NAME_ID.
    select distinct SESSION_NAME display_value, PK_SESSION_NAME_ID return_value
    from HRT_SESSION_NAME
    order by 1My Form Page throws the ORA-01722 in invalid number Error only when I make the Item a Select List. If Item is a
    Text Field and ID value entered and Create is clicked the data is saved but not when its a Select List. I have read alot
    of threads that talk about converting this Item to_number but I have not been successful in doing this. Once the Item is
    a Select List the Not Exists validation works but the Not Null Validation populates the Error Message. Can anyone
    assist me with this please? Thanks
    My Data Type is INTEGER for FK_SESSION_NAME_ID and SESSION_NAME is VARCHAR2.
    SESSION_NAME data....
    SESSION 1
    SESSION 2
    PMAS 1
    PMAS 2
    BASIC WORD 2003.....
    Edited by: Charles A on Jan 11, 2010 1:42 PM

    Hey Jari,
    The PK_SESSION_NAME_ID in the select statement is the value that is going to be returned. FK_SESSION_NAME_ID is the Foreign Key value that will get the value from the Primary Key PK_SESSION_NAME_ID.
    Yes, I do have an account that you can log into, thanks for assistance Jari.
    Once you log in Select link 'Hrt_Class' which will populate Page 2. Region 'Cascading LOVs has 4 Items. Class Meridiem, Class Name, Class End Date and Class Location. Select these values then click 'Search'. Once the values are populated click the red button at the bottom 'Add Session Info'. This will populate Page 9 which will allow you to test the Create button. You should not be able to add any Session Name that exists in the Report below and you should not be able to Create a Null FK_SESSION_NAME_ID. Let me know if this is clear, thanks again.
    The PK_SESSION_ID cannot be Null so just start with values 60116 on up to avoid that error message. I do not have any sequences or triggers created since this is just a testing app.
    Edited by: Charles A on Jan 11, 2010 4:05 PM

  • Backup Fails with Invalid RECID Error

    Hi All,
    Please help me to understand Caution -section
    below text is from
    [http://download.oracle.com/docs/cd/B10501_01/server.920/a96566/rcmtroub.htm#447765]
    Backup Fails with Invalid RECID Error: Solution 2
    This solution is more difficult than solution 1:
    To create the control file with SQL*Plus:
       1. Connect to the target database with SQL*Plus. For example, enter:
          % sqlplus 'SYS/oracle@trgt AS SYSDBA'
       2. Mount the database if it is not already mounted:
          SQL> ALTER DATABASE MOUNT;
       3. Back up the control file to a trace file:
          SQL> ALTER DATABASE BACKUP CONTROLFILE TO TRACE;
       4. Edit the trace file as necessary. The relevant section of the trace file looks something like the following:
          # The following commands will create a new control file and use it
          # to open the database.
          # Data used by the recovery manager will be lost. Additional logs may
          # be required for media recovery of offline data files. Use this
          # only if the current version of all online logs are available.
          STARTUP NOMOUNT
          CREATE CONTROLFILE REUSE DATABASE "TRGT" NORESETLOGS  ARCHIVELOG
          --  STANDBY DATABASE CLUSTER CONSISTENT AND UNPROTECTED
              MAXLOGFILES 32
              MAXLOGMEMBERS 2
              MAXDATAFILES 32
              MAXINSTANCES 1
              MAXLOGHISTORY 226
          LOGFILE
            GROUP 1 '/oracle/oradata/trgt/redo01.log'  SIZE 25M,
            GROUP 2 '/oracle/oradata/trgt/redo02.log'  SIZE 25M,
            GROUP 3 '/oracle/oradata/trgt/redo03.log'  SIZE 500K
          -- STANDBY LOGFILE
          DATAFILE
            '/oracle/oradata/trgt/system01.dbf',
            '/oracle/oradata/trgt/undotbs01.dbf',
            '/oracle/oradata/trgt/cwmlite01.dbf',
            '/oracle/oradata/trgt/drsys01.dbf',
            '/oracle/oradata/trgt/example01.dbf',
            '/oracle/oradata/trgt/indx01.dbf',
            '/oracle/oradata/trgt/tools01.dbf',
            '/oracle/oradata/trgt/users01.dbf'
          CHARACTER SET WE8DEC
          # Take files offline to match current control file.
          ALTER DATABASE DATAFILE '/oracle/oradata/trgt/tools01.dbf' OFFLINE;
          ALTER DATABASE DATAFILE '/oracle/oradata/trgt/users01.dbf' OFFLINE;
          # Configure RMAN configuration record 1
          VARIABLE RECNO NUMBER;
          EXECUTE :RECNO := SYS.DBMS_BACKUP_RESTORE.SETCONFIG('CHANNEL','DEVICE TYPE DISK
          DEBUG 255');
          # Recovery is required if any of the datafiles are restored backups,
          # or if the last shutdown was not normal or immediate.
          RECOVER DATABASE
          # All logs need archiving and a log switch is needed.
          ALTER SYSTEM ARCHIVE LOG ALL;
          # Database can now be opened normally.
          ALTER DATABASE OPEN;
          # Commands to add tempfiles to temporary tablespaces.
          # Online tempfiles have complete space information.
          # Other tempfiles may require adjustment.
          ALTER TABLESPACE TEMP ADD TEMPFILE '/oracle/oradata/trgt/temp01.dbf' REUSE;
          # End of tempfile additions.
       5. Shut down the database:
          SHUTDOWN IMMEDIATE
       6. Execute the script to create the control file, recover (if necessary), archive the logs, and open the database:
          STARTUP NOMOUNT
          CREATE CONTROLFILE ...;
          EXECUTE ...;
          RECOVER DATABASE
          ALTER SYSTEM ARCHIVE LOG CURRENT;
          ALTER DATABASE OPEN ...;
    Caution:
          If you do not open with the RESETLOGS option,
    then two copies of an archived redo log for a given log sequence number may
    exist--even though these two copies have completely different contents.
    For example, one log may have been created on the original host and the other on the new host.
    If you accidentally confuse the logs during a media recovery,
    then the database will be corrupted but Oracle and RMAN cannot detect the problem.

    Please help me to understand Caution -section
    Caution:
    If you do not open with the RESETLOGS option,
    then two copies of an archived redo log for a given log sequence number may
    exist--even though these two copies have completely different contents.
    For example, one log may have been created on the original host and the other on the new host.
    If you accidentally confuse the logs during a media recovery,
    then the database will be corrupted but Oracle and RMAN cannot detect the problem.As per my understanding it says. If you don't open database with RESETLOGS option then there may be archived logs with log sequence number which is already archived on the source host. This may happen due to difference in RECIDs. Now when the database needs media recovery for this particular log sequence, you may provide any of them. So in this case, RMAN and Oracle will not be able to differentiate the two files and can accept any of the archived log files during recovery. Since the contents of two archived logs are different, because they are generated at different times and they contains different transactions. So, internally it corrupts your database.
    Rgds.

  • FODC0002 [{bea-err}FODC0002a]: Error parsing input XML: Error at line:2 col

    I have an ODSI Physical Service that is based on a Java Function. The Java Function builds a SQL statement and uses JDBC to query for a ResultSet. One of the columns that is queried is a Clob. Sometimes, the data in this column causes an XMLBeans validation exception in ODSI: {err}XQ0027: Validation failed: error: decimal: Invalid decimal value: unexpected char '114'
    The issue is not consistently replicable with particular database record, the database records that present this issue at one point in time will be resolved after a restart of ODSI and replaced by another list of records that present the same error.
    As can be seen from the stack trace, it looks like the issue is happening after the database query has returned and while the process is assembling the SOAP response.
    Error at line:2 col:481 Line:2 '=' expected, got char[99]
    at weblogic.xml.babel.scanner.ScannerState.expect(ScannerState.java:241)
    at weblogic.xml.babel.scanner.OpenTag.read(OpenTag.java:60)
    at weblogic.xml.babel.scanner.Scanner.startState(Scanner.java:251)
    at weblogic.xml.babel.scanner.Scanner.scan(Scanner.java:178)
    at weblogic.xml.babel.baseparser.BaseParser.accept(BaseParser.java:533)
    at weblogic.xml.babel.baseparser.BaseParser.accept(BaseParser.java:510)
    at weblogic.xml.babel.baseparser.EndElement.parse(EndElement.java:34)
    at weblogic.xml.babel.baseparser.BaseParser.parseElement(BaseParser.java:457)
    at weblogic.xml.babel.baseparser.BaseParser.parseSome(BaseParser.java:326)
    at weblogic.xml.stax.XMLStreamReaderBase.advance(XMLStreamReaderBase.java:195)
    at weblogic.xml.stax.XMLStreamReaderBase.next(XMLStreamReaderBase.java:237)
    at weblogic.xml.stax.XMLEventReaderBase.parseSome(XMLEventReaderBase.java:189)
    at weblogic.xml.stax.XMLEventReaderBase.nextEvent(XMLEventReaderBase.java:122)
    at weblogic.xml.query.parsers.StAXEventAdaptor.queueNextTokens(StAXEventAdaptor.java:136)
    at weblogic.xml.query.parsers.StAXEventAdaptor.queueNextTokens(StAXEventAdaptor.java:124)
    at weblogic.xml.query.parsers.BufferedParser.fetchNext(BufferedParser.java:79)
    at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
    at weblogic.xml.query.runtime.navigation.ChildPath.fetchNext(ChildPath.java:308)
    at weblogic.xml.query.iterators.GenericIterator.hasNext(GenericIterator.java:133)
    at weblogic.xml.query.schema.BestEffortValidatingIterator$OpenedIterator.hasNext(BestEffortValidatingIterator.java:224)
    at weblogic.xml.query.schema.ValidatingIterator.fetchNext(ValidatingIterator.java:82)
    at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
    at weblogic.xml.query.xdbc.iterators.ItemIterator.fetchNext(ItemIterator.java:86)
    at weblogic.xml.query.iterators.LegacyGenericIterator.next(LegacyGenericIterator.java:109)
    at weblogic.xml.query.schema.BestEffortValidatingIterator.fetchNext(BestEffortValidatingIterator.java:85)
    at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
    at weblogic.xml.query.xdbc.iterators.ItemIterator.fetchNext(ItemIterator.java:86)
    at weblogic.xml.query.iterators.LegacyGenericIterator.next(LegacyGenericIterator.java:109)
    at weblogic.xml.query.runtime.typing.SeqTypeMatching.fetchNext(SeqTypeMatching.java:137)
    at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
    at com.bea.dsp.wrappers.jf.JavaFunctionIterator.fetchNext(JavaFunctionIterator.java:273)
    at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
    at weblogic.xml.query.runtime.querycide.QueryAssassin.fetchNext(QueryAssassin.java:54)
    at weblogic.xml.query.iterators.GenericIterator.peekNext(GenericIterator.java:163)
    at weblogic.xml.query.runtime.qname.InsertNamespaces.fetchNext(InsertNamespaces.java:247)
    at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
    at weblogic.xml.query.runtime.core.ExecutionWrapper.fetchNext(ExecutionWrapper.java:88)
    at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
    at weblogic.xml.query.xdbc.iterators.ItemIterator.fetchNext(ItemIterator.java:86)
    at weblogic.xml.query.iterators.LegacyGenericIterator.hasNext(LegacyGenericIterator.java:130)
    at weblogic.xml.query.xdbc.util.Serializer.serializeItems(Serializer.java:251)
    at com.bea.ld.server.ResultPusher$DSP25CompatibilityPusher.next(ResultPusher.java:236)
    at com.bea.ld.server.ResultPusher.pushResults(ResultPusher.java:112)
    at com.bea.ld.server.XQueryInvocation.execute(XQueryInvocation.java:770)
    at com.bea.ld.EJBRequestHandler.invokeQueryInternal(EJBRequestHandler.java:624)
    at com.bea.ld.EJBRequestHandler.invokeOperationInternal(EJBRequestHandler.java:478)
    at com.bea.ld.EJBRequestHandler.invokeOperation(EJBRequestHandler.java:323)
    at com.bea.ld.ServerWrapperBean.invoke(ServerWrapperBean.java:153)
    at com.bea.ld.ServerWrapperBean.invokeOperation(ServerWrapperBean.java:80)
    at com.bea.ld.ServerWrapper_s9smk0_ELOImpl.invokeOperation(ServerWrapper_s9smk0_ELOImpl.java:63)
    at com.bea.dsp.ws.RoutingHandler$PriviledgedRunner.run(RoutingHandler.java:96)
    at com.bea.dsp.ws.RoutingHandler.handleResponse(RoutingHandler.java:217)
    at weblogic.wsee.handler.HandlerIterator.handleResponse(HandlerIterator.java:287)
    at weblogic.wsee.handler.HandlerIterator.handleResponse(HandlerIterator.java:271)
    at weblogic.wsee.ws.dispatch.server.ServerDispatcher.dispatch(ServerDispatcher.java:176)
    at weblogic.wsee.ws.WsSkel.invoke(WsSkel.java:80)
    at weblogic.wsee.server.servlet.SoapProcessor.handlePost(SoapProcessor.java:66)
    at weblogic.wsee.server.servlet.SoapProcessor.process(SoapProcessor.java:44)
    at weblogic.wsee.server.servlet.BaseWSServlet$AuthorizedInvoke.run(BaseWSServlet.java:285)
    at weblogic.wsee.server.servlet.BaseWSServlet.service(BaseWSServlet.java:169)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3498)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(Unknown Source)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2180)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2086)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    <Apr 29, 2011 12:47:01 PM EDT> <Notice> <ODSI> <BEA-000000> <LabOrderDataServices> <Error occurred performing ODSI operation: {ld:LabOrder/logical/LabOrderReport}getLabOrderDetails:1
    weblogic.xml.query.exceptions.XQueryDynamicException: ld:LabOrder/logical/LabOrderReport.ds, line 34, column 6: {err}FODC0002 [{bea-err}FODC0002a]: Error parsing input XML: Error at line:2 col:481 Line:2 '=' expected, got char[99]
    at weblogic.xml.query.iterators.AbstractIterator.reportUserError(AbstractIterator.java:95)
    at weblogic.xml.query.iterators.AbstractIterator.reportUserError(AbstractIterator.java:147)
    at weblogic.xml.query.parsers.Parser.reportParseError(Parser.java:157)
    at weblogic.xml.query.parsers.StAXEventAdaptor.queueNextTokens(StAXEventAdaptor.java:225)
    at weblogic.xml.query.parsers.StAXEventAdaptor.queueNextTokens(StAXEventAdaptor.java:124)
    Truncated. see log file for complete stacktrace
    javax.xml.stream.XMLStreamException: Error at line:2 col:481 Line:2 '=' expected, got char[99]
    at weblogic.xml.stax.XMLStreamReaderBase.advance(XMLStreamReaderBase.java:206)
    at weblogic.xml.stax.XMLStreamReaderBase.next(XMLStreamReaderBase.java:237)
    at weblogic.xml.stax.XMLEventReaderBase.parseSome(XMLEventReaderBase.java:189)
    at weblogic.xml.stax.XMLEventReaderBase.nextEvent(XMLEventReaderBase.java:122)
    at weblogic.xml.query.parsers.StAXEventAdaptor.queueNextTokens(StAXEventAdaptor.java:136)
    Truncated. see log file for complete stacktrace
    Error at line:2 col:481 Line:2 '=' expected, got char[99]
    at weblogic.xml.babel.scanner.ScannerState.expect(ScannerState.java:241)
    at weblogic.xml.babel.scanner.OpenTag.read(OpenTag.java:60)
    at weblogic.xml.babel.scanner.Scanner.startState(Scanner.java:251)
    at weblogic.xml.babel.scanner.Scanner.scan(Scanner.java:178)
    at weblogic.xml.babel.baseparser.BaseParser.accept(BaseParser.java:533)
    Truncated. see log file for complete stacktrace
    >
    Can somebody shed some light on this issue?
    Thanks
    Edited by: user738507 on May 6, 2011 7:21 AM

    Here is the java function:
         * Iterate through the search results and build out the XmlBean response
         * @param helper A helper class used to simplify common JDBC commands
         * @param doc The XmlBean document to populate
         * @param isCollectionsIncluded True if Collection info should be included in results, False otherwise
         * @param isFullDetailsIncluded True if Result data should be included in results, False otherwise
         * @throws Exception
         private static void addOrders(XmlBeansJDBCHelper helper, LabOrderReportDocument doc,
                   boolean isCollectionsIncluded, boolean isFullDetailsIncluded) throws Exception {
              int rows = 0;
              ResultSet rs = helper.getResultSet();
              LabOrders labOrders = doc.getLabOrderReport().addNewLabOrders();
              LabOrder record = null;
              HashMap<Long, Collection> parentCollectionMap = null;
              // initialize variable used to track when child elements of the XML should be created
              long previousRowOrderId = 0;
              long previousRowParentOrderCollectionId = 0;
              long previousRowOrderCollectionId = 0;
              long previousRowResultId = 0;
              boolean isRootCollectionNode = false;
              LabOrder.Collections lastParentOuterCollectionsAdded = null;
              com.idexx.services.lde.laborder.Collection.Collections lastParentInnerCollectionsAdded = null;
              com.idexx.services.lde.laborder.Collection lastCollectionAdded = null;
              Result lastResultAdded = null;
              // Loop through the results and build XmlBean nodes for each row
              // Since the SQL is joining Orders to Collections (one-to-many) to Results (one-to-many),
              // and returning a flat structure, there will be duplicate Order data on each row when
              // multiple collections exist on the Order, and duplicate Collection data when multiple
              // Results exist. We can use this fact to determine when to create a new Collection, or
              // Result node.
              while (helper.getResultSet().next())
                   rows++;
                   long currentRowParentOrderCollectionId = 0;
                   long currentRowOrderCollectionId = 0;
                   long currentRowResultId = 0;
                   long currentRowResultRemarkId = 0;
                   //int rowno = helper.getResultSet().getRow();
                   // Get the Order ID
                   logDebug("Getting the OrderId.....");
                   BigInteger dbOrderId = JDBCHelper.getBigInteger(rs, DataConstants.ORDER_ID);
                   logDebug("DONE getting the OrderId.");
                   long currentRowOrderId = dbOrderId.longValue();
                   // Determine the Order ID, Order Collection ID, and Result ID currently being processed.
                   // These will be used to determine whether to start a new LabOrder Bean, Collections Bean, or Results Bean
                   if (isCollectionsIncluded || isFullDetailsIncluded) {
                        // Get the ParentOrderCollectionID
                        logDebug("Getting the Parent Collection Order ID.....");
                        BigInteger dbParentOrderCollectionId = JDBCHelper.getBigInteger(rs, DataConstants.PARENT_ORDER_COLLECTION_ID);
                        if ( dbParentOrderCollectionId != null )
                             currentRowParentOrderCollectionId = dbParentOrderCollectionId.longValue();
                        else
                             currentRowParentOrderCollectionId = 0;
                        // Get the OrderCollectionID
                        logDebug("Getting the Order Collection ID.....");
                        BigInteger dbOrderCollectionId = JDBCHelper.getBigInteger(rs, DataConstants.ORDER_COLLECTION_ID);
                        if ( dbOrderCollectionId != null )
                             currentRowOrderCollectionId = dbOrderCollectionId.longValue();
                        else
                             currentRowOrderCollectionId = 0;
                        if ( isFullDetailsIncluded ) {
                             // Get the ResultID
                             logDebug("Getting the Result Id.....");
                             BigInteger dbResultId = JDBCHelper.getBigInteger(rs, DataConstants.RESULT_ID);
                             if ( dbResultId != null )
                                  currentRowResultId = dbResultId.longValue();
                             else
                                  currentRowResultId = 0;
                             // Get the ResultRemarkID
                             BigInteger dbResultRemarkId = JDBCHelper.getBigInteger(rs, DataConstants.RESULT_REMARK_ID);
                             if ( dbResultRemarkId != null )
                                  currentRowResultRemarkId = dbResultRemarkId.longValue();
                             else
                                  currentRowResultRemarkId = 0;
                   isRootCollectionNode = (currentRowParentOrderCollectionId == 0);
                   logDebug("currentRowOrderId: " + currentRowOrderId);
                   logDebug("previousRowOrderId: " + previousRowOrderId);
                   logDebug("currentRowResultId: " + currentRowResultId);
                   logDebug("previousRowResultId: " + previousRowResultId);
                   logDebug("currentRowResultRemarkId: " + currentRowResultRemarkId);
                   logDebug("previousRowResultRemarkId: N/A");
                   logDebug("currentRowParentOrderCollectionId: " + currentRowParentOrderCollectionId);
                   logDebug("previousRowParentOrderCollectionId: " + previousRowParentOrderCollectionId);
                   logDebug("currentRowOrderCollectionId: " + currentRowOrderCollectionId);
                   logDebug("previousRowOrderCollectionId: " + previousRowOrderCollectionId);
                   if ( currentRowOrderId != previousRowOrderId ) {
                        parentCollectionMap = new HashMap<Long, Collection>();
                        lastParentOuterCollectionsAdded = null;
                        lastParentInnerCollectionsAdded = null;
                        lastCollectionAdded = null;
                        lastResultAdded = null;
                        // This is a new Order, generate a new Lab Order bean
                        record = addOrder(labOrders, helper, dbOrderId, isFullDetailsIncluded);
                        logDebug("Order Added!");
                        // If there is Parent Collection data and it should be included, build a Collections element,
                        // and populate the first one
                        if ( !isRootCollectionNode && (isCollectionsIncluded || isFullDetailsIncluded) ) {
                             lastParentOuterCollectionsAdded = record.addNewCollections();
                             lastCollectionAdded = addCollection(record, helper, lastParentOuterCollectionsAdded, true);
                             logDebug("Collection Added! Is it null? " + (lastCollectionAdded == null));
                        // If there is Collection data and it should be included, build a Collections element,
                        // and populate the first one
                        if ( currentRowOrderCollectionId > 0 && (isCollectionsIncluded || isFullDetailsIncluded) ) {
                             if ( isRootCollectionNode ) {
                                  lastParentOuterCollectionsAdded = record.addNewCollections();
                                  lastCollectionAdded = addCollection(record, helper, lastParentOuterCollectionsAdded, false);
                                  parentCollectionMap.put(new Long(currentRowOrderCollectionId), lastCollectionAdded);
                                  logDebug("parent collection added to map: " + currentRowOrderCollectionId);
                             else {
                                  lastParentInnerCollectionsAdded = lastCollectionAdded.addNewCollections();
                                  lastCollectionAdded = addCollection(record, helper, lastParentInnerCollectionsAdded, false);
                             logDebug("Collection Added! Is it null? " + (lastCollectionAdded == null));
                             // If there is Result data and it should be included, build a Results element,
                             // and populate the first one
                             if ( currentRowResultId > 0 && isFullDetailsIncluded ) {
                                  logDebug("Adding result....");
                                  lastResultAdded = addResult(record, helper, lastCollectionAdded);
                                  logDebug("Result Added!");
                                  // If there is Result Remark data and it should be included, build a ResultRemarks element,
                                  // and populate the first one
                                  if ( currentRowResultRemarkId > 0 && isFullDetailsIncluded ) {
                                       addResultRemark(record, helper, lastResultAdded);
                        logDebug("DONE getting first Collection and Result.");
                   else if ( currentRowParentOrderCollectionId != previousRowParentOrderCollectionId
                             && (isCollectionsIncluded || isFullDetailsIncluded) ) {
                        // This is a new, top level, Order Collection to be included
                        lastParentOuterCollectionsAdded = null;
                        lastParentInnerCollectionsAdded = null;
                        lastCollectionAdded = null;
                        lastResultAdded = null;
                        logDebug("Getting next Order Collection...");
                        // If there is Parent Collection data and it should be included, build a Collections element,
                        // and populate the first one
                        if ( !isRootCollectionNode ) {
                             lastCollectionAdded = (com.idexx.services.lde.laborder.Collection)parentCollectionMap.get(new Long(currentRowParentOrderCollectionId));
                             logDebug("A Collection Added! Is it null? " + (lastCollectionAdded == null));
                        // If there is Collection data and it should be included, build a Collections element,
                        // and populate the first one
                        if ( currentRowOrderCollectionId > 0 ) {
                             if ( isRootCollectionNode ) {
                                  //LabOrder.Collections collections = record.addNewCollections();
                                  lastParentOuterCollectionsAdded = record.getCollections();
                                  lastCollectionAdded = addCollection(record, helper, lastParentOuterCollectionsAdded, false);
                                  parentCollectionMap.put(new Long(currentRowOrderCollectionId), lastCollectionAdded);
                             else {
                                  lastParentInnerCollectionsAdded = lastCollectionAdded.addNewCollections();
                                  lastCollectionAdded = addCollection(record, helper, lastParentInnerCollectionsAdded, false);
                             logDebug("B Collection Added! Is it null? " + (lastCollectionAdded == null));
                             // If there is Result data and it should be included, build a Results element,
                             // and populate the first one
                             if ( currentRowResultId > 0 && isFullDetailsIncluded ) {
                                  lastResultAdded = addResult(record, helper, lastCollectionAdded);
                                  // If there is Result Remark data and it should be included, build a ResultRemarks element,
                                  // and populate the first one
                                  if ( currentRowResultRemarkId > 0 && isFullDetailsIncluded ) {
                                       addResultRemark(record, helper, lastResultAdded);
                   else if ( currentRowOrderCollectionId != previousRowOrderCollectionId
                             && (isCollectionsIncluded || isFullDetailsIncluded) ) {
                        // This is a new Order Collection to be included inside of a parent collection
                        logDebug("Getting next CHILD Order Collection...");
                        logDebug("isRootCollectionNode: " + isRootCollectionNode);
                        logDebug("Order ID: " + helper.getBigInteger(DataConstants.ORDER_ID));
                        logDebug("Order Collection ID: " + helper.getBigInteger(DataConstants.ORDER_COLLECTION_ID));
                        logDebug("Collection ID: " + helper.getBigInteger(DataConstants.COLLECTION_ID));
                        if ( isRootCollectionNode ) {
                             lastCollectionAdded = addCollection(record, helper, lastParentOuterCollectionsAdded, false);
                             parentCollectionMap.put(new Long(currentRowOrderCollectionId), lastCollectionAdded);
                        else {
                             com.idexx.services.lde.laborder.Collection parentCollection = (com.idexx.services.lde.laborder.Collection)parentCollectionMap.get(new Long(currentRowParentOrderCollectionId));
                             if(parentCollection == null) {
                                  log(LOG_LEVEL.WARN, "Parent Collection with id: " + currentRowParentOrderCollectionId + " is null for collection id: " + currentRowOrderCollectionId + " but isRootCollectionNode is " + isRootCollectionNode);
                             } else {
                                  lastParentInnerCollectionsAdded = parentCollection.getCollections();
                                  logDebug("Is lastParentInnerCollectionsAdded null? " + (lastParentInnerCollectionsAdded == null));
                                  lastCollectionAdded = addCollection(record, helper, lastParentInnerCollectionsAdded, false);
                        // If there is Result data and it should be included, build a Results element,
                        // and populate the first one
                        if ( currentRowResultId > 0 && isFullDetailsIncluded ) {
                             lastResultAdded = addResult(record, helper, lastCollectionAdded);
                             // If there is Result Remark data and it should be included, build a ResultRemarks element,
                             // and populate the first one
                             if ( currentRowResultRemarkId > 0 && isFullDetailsIncluded ) {
                                  addResultRemark(record, helper, lastResultAdded);
                   else if ( currentRowResultId != previousRowResultId
                             && isFullDetailsIncluded ) {
                        // There is a new Result to be included
                        logDebug("Getting next Result...");
                        // This is a new result to be included
                        lastResultAdded = addResult(record, helper, lastCollectionAdded);
                        // If there is Result Remark data and it should be included, build a ResultRemarks element,
                        // and populate the first one
                        if ( currentRowResultRemarkId > 0 && isFullDetailsIncluded ) {
                             addResultRemark(record, helper, lastResultAdded);
                   else if ( isFullDetailsIncluded ) {
                        // There is a new Result Remark to include
                        logDebug("Getting next Result Remark...");
                        // This is a new result remark to be included
                        addResultRemark(record, helper, lastResultAdded);
                   logDebug("Done building response.");
                   previousRowResultId = currentRowResultId;
                   previousRowParentOrderCollectionId = currentRowParentOrderCollectionId;
                   previousRowOrderCollectionId = currentRowOrderCollectionId;
                   previousRowOrderId = currentRowOrderId;
              logDebug("Found " + rows + " rows of data.");
         }

  • Running SQL Procedure with dg4msql errors: Function sequence error HY010

    I am trying to execute a stored procedure on a SQL database and get the error Function sequence error HY010.
    A simple query on a table returns teh expected result.
    I have a single Win2008R2 server with MSSQL Express 2008 and Oracle 11gR2 (32bit not 64bit version of Oracle)
    Below is the gateway init, listener and tnsnames files and the query I am trying to run:
    -- initORIONWASP.ora --
    HS_FDS_CONNECT_INFO=INGRDB//waspForGIS
    HS_FDS_TRACE_LEVEL=OFF
    HS_FDS_RECOVERY_ACCOUNT=RECOVER
    HS_FDS_RECOVERY_PWD=RECOVER
    HS_CALL_NAME=dbo.spTest;dbo.spQueryAsset;dbo.spQueryAssetDetails
    HS_FDS_PROC_IS_FUNC=TRUE
    HS_FDS_RESULTSET_SUPPORT=TRUE
    -- Listener.ora -- (partial)
    (SID_DESC =
    (SID_NAME = ORIONWASP)
    (ORACLE_HOME = C:\Oracle\product\11.2.0\dbhome_1)
    (PROGRAM=dg4msql)
    -- tnsnames.ora -- (partial)
    ORIONWASP =
    (DESCRIPTION=
    (ADDRESS=(PROTOCOL=tcp)(HOST=INGRDB)(PORT=1521))
    (CONNECT_DATA=(SID=ORIONWASP))
    (HS=OK)
    -- Simple Query --
    Running select "Asset_ID" from asset@ORIONWASP; returns the correct result
    Running select * from sys.procedures@ORIONWASP; returns a list of procedures including the procedure I want to run
    -- This pl/sql block returns the error ******* identifier 'spTest@ORIONWASP' must be declared *******
    declare
    begin
    "spTest"@ORIONWASP;
    end;
    -- This passthrough pl/sql block returns ******** [Oracle][ODBC SQL Server Driver]Function sequence error {HY010} ********
    DECLARE
    CRS BINARY_INTEGER;
    RET BINARY_INTEGER;
    v_COL1 VARCHAR2(50);
    v_COL2 VARCHAR2(50);
    BEGIN
    CRS := DBMS_HS_PASSTHROUGH.OPEN_CURSOR@ORIONWASP;
    DBMS_HS_PASSTHROUGH.PARSE@ORIONWASP(CRS, 'exec spTest');
    BEGIN
    RET := 0;
    WHILE (TRUE)
    LOOP
    ret := DBMS_HS_PASSTHROUGH.FETCH_ROW@ORIONWASP(CRS, FALSE);
    DBMS_HS_PASSTHROUGH.GET_VALUE@ORIONWASP(CRS, 1, v_COL1);
    DBMS_HS_PASSTHROUGH.GET_VALUE@ORIONWASP(CRS, 2, v_COL2);
    DBMS_OUTPUT.PUT_Line('Col1:'||v_COL1||' Col2:'||v_COL2);
    END LOOP;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    BEGIN
    DBMS_OUTPUT.PUT_LINE('End of Fetch');
    DBMS_HS_PASSTHROUGH.CLOSE_CURSOR@ORIONWASP(CRS);
    END;
    END;
    END;
    /

    The gateway configuration file contains:
    HS_FDS_PROC_IS_FUNC=TRUE
    HS_FDS_RESULTSET_SUPPORT=TRUE
    This setting commonly causes problems and you need to set
    HS_FDS_PROC_IS_FUNC=TRUE
    HS_FDS_RESULTSET_SUPPORT=FALSE
    for normal procedure calls and
    HS_FDS_PROC_IS_FUNC=FALSE
    HS_FDS_RESULTSET_SUPPORT=TRUE
    when calling the procedure with ref cursors.
    There's a note in My Oracle Support that gives you examples how to call remote SQl Server procedures
         Note.197192.1 Different Methods How To Call MS SQL Server Procedures Using TG4MSQL - DG4MSQL
    and another one for the Sybase gateway but this code is similar for the SQL Server:
    Article-ID: Note 351400.1
    Title: How to Call a Remote Sybase Procedure Using TG4SYBS

Maybe you are looking for