Jdbc receiver: SQL Exception

Hi all,
We got the below system error in jdbc receiver scenario:
Unable to execute statement for table or stored procedure. 'xxx_001' (Structure 'Statement') due to java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Invalid object name 'systm.MasterTracking'
What can be the possible reason and solution?
Thanks,
Durga

Hi,
Make sure that you are passing the Correct Table name according to the Database Table name. This is case sensitive.And also abt the Field names
Every thing we have to take care abt case sensitice in JDBC adapter.
Regards
Seshagiri

Similar Messages

  • JDBC PL/SQL exception not shown in System Alert email

    Hi expert,
    The PL/SQL exception caught in the communication channeli  do not show up in the alert emails.  What could be  the reason behind it?
    We configured the SXMS_TO_ADAPTER_ERRLINES to capture the error message in alert category and configured the alert rule accordingly also. The system alert mail is show as below:
    If that is the PL/SQL error(Adapter Framework exception: null):
    Adapter type: JDBC
    Error text from the Adapter Engine:
    If that is the exception captured in Adapter Framework, not PL/SQL error:
    Adapter type: JDBC
    Error text from the Adapter Engine: Error when attempting to get processing resources: com.sap.aii.af.lib. util.concurrent.ResourcePoolException: Unable to create new pooled res ource: DriverManagerException: Can not establish connection:: SQLExcep tion: ORA-01034: ORACLE not available
    ORA-27101: shared memory realm does not exist IBM AIX RISC System/6000 Error: 2: No such file or direc tory
    Is that because the system alert only can print out the detail error message captured in Adapter Framework? Is there any way to capture all of the possible errors in adapter engine?

    Hi Ruby,
    Please use the container variable  "SXMS_TO_ADAPTER_ERRTXT" in your alert category configuration to get the error text from Adapter Engine.
    The details of the container variable can be found at this link:
    http://help.sap.com/saphelp_nw04/helpdata/en/d0/d4b54020c6792ae10000000a155106/content.htm
    Regards, Gaurav.

  • JDBC Reiver - SQL Exception

    I get a sql exception when I am trying to do a select using sql-xml syntax. The exception says that the column does not exist in the database. But the columns exists. This column is being used in the key tag.
    It works fine if I use any other column in the table in teh key tag. I am not able to find out what is so strange about this column.
    Is there any way I can find out what sql is being sent to the database. I did set up additional parameters as per Note 801367. But I am not able to see the sql statement. Where do I see the sql statement.

    Hi,
    Make sure that you are passing the Correct Table name according to the Database Table name. This is case sensitive.And also abt the Field names
    Every thing we have to take care abt case sensitice in JDBC adapter.
    Regards
    Seshagiri

  • Help on JDBC receiver Sql

    Hi all,
    I am using receiver jdbc adapter to insert data into oracle database, but I need to use single quote to make value as string, for example:
    insert into ztable (id , name, description) values( 1, 'Jonathan', 'this is description(simple)'  );
    if I don't use QUOTE here, I will get error because there are "(" ")" in the DESCRIPTION value.
    I see some threads mentioned to add attribute hasQuot= YES to realize this function, but I have tried, nothing happened, is there any tricks to make this happen?

    please see the following XML, I both used YES and Yes, but both not work
    <?xml version="1.0" encoding="UTF-8"?>
    <ns1:MT_HPQA xmlns:ns1="http://mes/so_download">
       <insert1>
          <R_ERP_SO_HEADER action="INSERT">
             <table>R_ERP_SO_HEADER</table>
             <access>
                <MESSAGE_NO/>
                <DATI_MESSAGE>20070627143132</DATI_MESSAGE>
                <MESSAGE_CODE>2030</MESSAGE_CODE>
                <SENDER/>
                <RECEIVER/>
                <MD_SEQ_NO hasQuot="Yes">0000121051#</MD_SEQ_NO>
                <SONO>0000121051</SONO>
                <USERID>CAOBO</USERID>
                <SOSAPTYPE>1</SOSAPTYPE>
                <PONO>123</PONO>
                <PODATE>00000000</PODATE>
                <SALESORG>5000</SALESORG>
                <SALESORGDESC hasQuot="YES">&#36801;&#38050;&#38050;&#38081;&#20135;&#21697;&#38144;&#21806;</SALESORGDESC>
                <DISTCHAN>20</DISTCHAN>
                <DISTCHANDESC>&#32463;&#38144;&#21830;</DISTCHANDESC>
                <DIVISION>16</DIVISION>
                <DIVISIONDESC>&#38050;&#26448; --- &#28909;&#36711;</DIVISIONDESC>
                <SALESGRP>042</SALESGRP>
                <SALESGRPDESC>&#38144;&#21806;&#20844;&#21496;:&#20998;&#38144;&#31185;(&#28909;&#36711;</SALESGRPDESC>
                <SALESOFFICE>0015</SALESOFFICE>
                <SALESOFFICEDESC>&#38144;&#21806;&#20844;&#21496;&#65306;&#28909;&#36711;&#38144;&#21806;&#22788;</SALESOFFICEDESC>
                <TRANSPORTCONDITIONCODE>01</TRANSPORTCONDITIONCODE>
                <TRANSPORTCONDITION/>
                <SOLDTO/>
                <SHIPTO/>
                <INVTO/>
                <DATEMOD>00000000</DATEMOD>
                <DATEENT>20070524</DATEENT>
                <TIMESTAMP>20070627143132</TIMESTAMP>
                <CUSTCERTFICATEID/>
                <CUSTPAYERID/>
             </access>
             <key>
                <SONO>0000121051</SONO>
             </key>
          </R_ERP_SO_HEADER>
       </insert1>
       <insert2>
          <R_ERP_SO_ITEM action="UPDATE_INSERT">
             <table>R_ERP_SO_ITEM</table>
             <access>
                <MESSAGE_NO/>
                <DATI_MESSAGE>20070627143132</DATI_MESSAGE>
                <MESSAGE_CODE>2030</MESSAGE_CODE>
                <SENDER/>
                <RECEIVER/>
                <MD_SEQ_NO>0000121051#</MD_SEQ_NO>
                <DETAIL_POS>000010</DETAIL_POS>
                <SONO>0000121051</SONO>
                <SOITEM>0010</SOITEM>
                <MATNO>38000001</MATNO>
                <RAILWAY/>
                <UNLOADPOINT/>
                <DKUNNR1/>
                <SOQUAN>0</SOQUAN>
                <UNIT>KG</UNIT>
                <DISPDATE>0000-00-00</DISPDATE>
                <DISPATCHREADYMAX>0000-00-00</DISPATCHREADYMAX>
                <DISPATCHREADYMIN>0000-00-00</DISPATCHREADYMIN>
                <CANCELTYPE/>
             </access>
             <key>
                <SONo>0000121051</SONo>
                <SOITEM>000010</SOITEM>
             </key>
          </R_ERP_SO_ITEM>
       </insert2>
    </ns1:MT_HPQA>

  • JDBC Receiver adapter-java.sql.SQLException: ORA-00904: "BATCH_ID": invalid

    Hi
    I am trying insert rows in Oracle database using JDBC receiver adapter setup in PI 7.1. However this receiver adapter is throwing following exception.
    Delivering the message to the application using connection JDBC_http://sap.com/xi/XI/System failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'PRADEEP_OTC_ORDERS' (structure 'statement'): java.sql.SQLException: ORA-00904: "BATCH_ID": invalid identifier .
    <?xml version="1.0" encoding="UTF-8" ?>
    <ns0:mt_sql_writer xmlns:ns0="http://rdbms_poc">
    <statement>
         <dbtablename action="INSERT">
                <table>PRADEEP_OTC_ORDERS</table>
              <access>
                     <order_id>19126</order_id>
                     <version>1</version>
                     <batch_id>132</batch_id>
                </access>
           </dbtablename>
    </statement>
    </ns0:mt_sql_writer>
    PRADEEP_OTC_ORDERS table has just 3 columns as specified the access segment. However I stil get this ORA-00904 error message.
    Any idea on what could be wrong.?
    Thanks
    -Pradeep

    Hi All,
    Thanks a lot for responding...
    I verified the table structure, table just contains those 3 coulms all varchar type.
    I modified the column name as well, But was still getting ORA-00904. Then I went directly to the the database and executed below insert statement,
    insert into PRADEEP_OTC_ORDERS (mps_order_id, mps_version,mps_batch_id) Values(1,2,3)
    I got exact SQL Error: ORA-00904: "MPS_BATCH_ID": invalid identifier.
    So ISAP JDBC adapter is not enclosing the string values in quotes.
    SAP documentation says it puts quotes for values and treats everything as string(text).
    Anybody has any idea, why JDBC receiver adapter not enclosing the values in quotes?
    Thanks
    -Pradeep

  • JDBC receiver error:ORA-06550: line 1, column 7: PL/SQL

    Hi,
    I am geting this error in JDBC Receiver adapter. when  i call the stored procedure.
    Last week it works fine.But i today i faced this error.
    Error Unable to execute statement for table or stored procedure. 'spec_utilities.SP_DELETE(Structure 'unassign') due to java.sql.SQLException: ORA-06550: line 1, column 7: PLS-00201: identifier 'SPEC_UTILITIES.SP_DELETE' must be declared ORA-06550: line 1, column 7: PL/SQL: Statement ignored 
    Error JDBC message processing failed; reason Error processing request in sax parser: Error when executing statement for table/stored proc. 'spec_utilities.SP_DELETE(structure 'unassign'): java.sql.SQLException: ORA-06550: line 1, column 7: PLS-00201: identifier 'SPEC_UTILITIES.SP_DELETE' must be declared ORA-06550: line 1, column 7: PL/SQL: Statement ignored 
    Error MP: Exception caught with cause com.sap.aii.af.ra.ms.api.RecoverableException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'spec_utilities.SP_DELETE (structure 'unassign'): java.sql.SQLException: ORA-06550: line 1, column 7: PLS-00201: identifier 'SPEC_UTILITIES.SP_DELETE'must be declared ORA-06550: line 1, column 7: PL/SQL: Statement ignored 
    My stored procedure structure is:
    <unassign>
    <SP_DELETE action="EXECUTE">
      <table>spec_utilities.SP_DELETE</table>
      <PAE isInput="true" type="VARCHAR">447848</pAEIC>
      <SKEY isInput="true" type="NUMERIC">4548545</pSKEY>
      <USER isOutput="true" type="VARCHAR" />
      <UNIT  isOutput="true" type="VARCHAR" />
      <EMAIL isOutput="true" type="VARCHAR" />
      </SP_DELETE>
      </unassign>
    Can you suggest me where is this error.
    Thank you
    Sateesh

    Hi,
       if it was executing fine earlier then check the below
    1. user permissions level at the database..whether it has access to the required SP or not..
    2. Check if there was any change in the SP..which has not been communicated...
    HTH
    Rajesh

  • MS SQL Server Stored Procedure - JDBC Receiver Adapter

    Hi,
    I am calling a stored procedure in MS SQL Server using the JDBC Receiver Adapter.  The stored procedure takes 1 input parameter which is a VARCHAR field.  The stored procedure's input parameter and the input parameter are identical.  My target structure looks like:-
    <STATEMENT>
    <storedProcedureName action="EXECUTE">
    <TABLE>SP_REPROCESS</TABLE>
    <input1 isInput="true" type="VARCHAR">1</input1>
    </storedProcedureName>
    </STATEMENT>
    I am getting the following error:-
    Message processing failed. Cause: com.sap.engine.interfaces.messaging.api.exception.MessagingException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'SP_REPROCESS' (structure 'STATEMENT'): com.microsoft.sqlserver.jdbc.SQLServerException: String or binary data would be truncated.
    Any suggestions.
    Thanks.
    Krishnan
    Edited by: Krishnan on Jul 17, 2008 7:07 AM
    Edited by: Krishnan on Jul 17, 2008 7:07 AM
    Edited by: Krishnan on Jul 17, 2008 7:48 AM

    hi,
    can anyone help me to fix this issue.
    In MONI, i am able to see the output xml as :-
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:REPROCESS_DATA_MT xmlns:ns0="http://abc.com/db/integration">
    <STATEMENT>
    <storedProcedureName action="EXECUTE">
    <TABLE>SP_REPROCESS</TABLE>
    <input1 isInput="true" type="VARCHAR">1</input1>
    </storedProcedureName>
    </STATEMENT>
    </ns0:REPROCESS_DATA_MT>
    in the communication channel monitoring --> in the JDBC receiver channel, I am getting the following error:-
    Message processing failed. Cause: com.sap.engine.interfaces.messaging.api.exception.MessagingException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'SP_REPROCESS' (structure 'STATEMENT'): com.microsoft.sqlserver.jdbc.SQLServerException: String or binary data would be truncated.
    thanks.
    krishnan

  • JDBC SQL Exception while updating an SQL database

    Hi Experts,
    Recently i have encountered a JDBC SQL exception while updating aSQL database as below,
    com.sap.aii.af.ra.ms.api.DeliveryException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'SAP_UPLOAD' (structure 'Statement'): java.sql.SQLException: No more data to read from socket
    the above system error didn't occur for all messages (so far happened twice), but i need to find an fix to overcome this system error.
    did anybody came across the above system error, please help me to resolve.
    Thanks

    Hi bandana,
    From SAP Note --> 831162
    17. Receiver: java.sql.SQLException During First Message Processing
    Q: When sending a message to a JDBC receiver channel for the first time after an extended inactivity period, I am observing a java.sql.SQLException in the adapter's processing, which refers to a closed connection or a timeout? What is causing this and how do I work around this problem?
    A: The database server has apparently closed the adapter's JDBC connection from the server side. Nevertheless, the message should be processed successfully during the next retry. If you want to completely eliminate the symptoms, enable the setting "Advanced Mode" -> "Disconnect from database after each message processing". Note that this might have a negative performance impact for high-volume processing.
    I would recommend you to go through the complete note !!! Very Informative .
    Regards,

  • How to use Native SQL statement in JDBC receiver interface

    Dear All,
    Can any one please help us in using Native SQL statement in a JDBC receiver channel. The reason why I need to use Native SQL statement instead of standard XML structure is that I need to execute a dynamic SQL query in third party database system lke:-
    Select Field1 Field2 from TABLE Where Field3 like "%Name'
    I expect the the response in the form of XML file which I can pick up using synchornous interface as mentioned on help.sap.com:-
    http://help.sap.com/saphelp_nw04/helpdata/en/64/ce4e886334ec4ea7c2712e11cc567c/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/64/ce4e886334ec4ea7c2712e11cc567c/frameset.htm
    The value for %Name can change dynamically according to the transaction and hence cannot be inluded as a KEY element in standard XLM structure,
    Hence I need to know:-
    1. What message mapping I should use in case if I have to use Native SQL statement.
    2.What operation mapping I should use in case if I have to use Native SQL statement.
    If guess correclty I may have to use Java mapping to do the above activities. Hence I want to know
    3 .How do to go about it to do the Java mapping.
    Thanks
    Ameet

    >
    Ameet Deshpande wrote:
    > Dear All,
    >
    > Can any one please help us in using Native SQL statement in a JDBC receiver channel. The reason why I need to use Native SQL statement instead of standard XML structure is that I need to execute a dynamic SQL query in third party database system lke:-
    >
    > "
    > Select Field1 Field2 from TABLE Where Field3 like "%Name'
    > "
    > I expect the the response in the form of XML file which I can pick up using synchornous interface as mentioned on help.sap.com:-
    >
    > http://help.sap.com/saphelp_nw04/helpdata/en/64/ce4e886334ec4ea7c2712e11cc567c/frameset.htm
    > http://help.sap.com/saphelp_nw04/helpdata/en/64/ce4e886334ec4ea7c2712e11cc567c/frameset.htm
    >
    > The value for %Name can change dynamically according to the transaction and hence cannot be inluded as a KEY element in standard XLM structure,
    >
    > Hence I need to know:-
    >
    > 1. What message mapping I should use in case if I have to use Native SQL statement.
    > 2.What operation mapping I should use in case if I have to use Native SQL statement.
    > If guess correclty I may have to use Java mapping to do the above activities. Hence I want to know
    > 3 .How do to go about it to do the Java mapping.
    >
    > Thanks
    > Ameet
    You can use a stored procedure, and call it from jdbc receiver adapter.
    I also solve this issue, with a DBLookup in message mapping. You can refer to my blog, and this usefull 3d:
    http://simonlesflex.wordpress.com/2010/12/07/pi-oracle-dblookup/
    /people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer
    /people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler

  • PI 7.0 - jdbc receiver issue with MS SQL Server

    Hello Experts,
    I have a jdbc receiver scenario on PI 7.0 for just one table on MS SQL Server and I'm using the update_insert action.
    When the entry does not exist it is created normally and returns insert_count=1 and update_count=0.
    When the entry already exists, it's generated the statements for insert and for update (the 2 statements are visible on RWB) and returns insert_count=0 and update_count=0.
    Any error occurs and in the RWB the log shows the request was processed with success.
    I've already enabled the log for sql statements on the channel, but the statements are correct.
    I've reviewed also the <key> tag on the mapping and it's ok.
    Any suggestion to try fix this issue?
    Thank you very much.

    Can you please check in the database the format of the specified fields in the update statement. Sometime we can have situations that the insert works but the subsequent update fails. An example:
    Suppose key field1 value being passed from XI is  '1234' in characters but in db it is stored as '00001234'.
    Regards,
    Indranil

  • JDBC Receiver - Message Protocol = Native SQL String

    Hi Friends
    Has any one worked on JDBC Receiver with Message Protocol as <b>Native SQL String</b>?
    If so, can you please send me a detailed scenario of it...like
    the datatypes, message types, mappping.
    Because if I use the Native SQL String, then I think I have to pass a simple SQL string to the receiver..
    So how can I do that?
    Regards,
    Raju...

    Hi Raju,
    This can be done using the following format,
    <root>
      <stmt>
        <Customers action="SQL_DML">
          <access> UPDATE Customers SET Name=’$NAME$’ WHERE Number='$NUMBER$’
          </access>
          <key>
            <NAME>ABC</NAME>
            <NUMBER>000</NUMBER>
          </key>
        </Customers>
      </stmt>
    </root>
    Just pass map the value to the correspondung fields in the KEY FIELD and it will work like you want, dynamically.
    Regards,
    bhavesh

  • JDBC Receiver: exact SQL statement

    Hi,
    I'm in an IDoc-JDBC scenario, using XML-SQL messages to feed a JDBC Receiver and I am getting <i>weird messages</i> returned by Oracle.
    Question: is there a way to log/trace/audit <b>the exact SQL statement</b> that my channel is sending to Oracle??
    Thanks.
    Alex

    hi Alessandro,
    try: logSQLStatement
    from SAP note: 801367
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions">XI FAQ - Frequently Asked Questions</a>

  • JDBC Receiver Adapter with Native SQL String

    Hi experts
    I need to use a JDBC Receiver Adapter with Message Protocol of Native SQL String, but I don´t understand how to create my data type for XML Document Format. I studied the following example from the SAP Library,
    INSERT INTO tableName (column-name1, column-name2, column-name3) VALUES(u2018column-value1u2019, u2018column-value2u2019, u2018column-value3u2019)
    i´ll be very thankful of your recommendations.

    Another simple way is..
    Create receiver data structure like this....
    <StatementName>
    <anyName action=u201DSQL_DMLu201D>
    <access>INSERT INTO tableName (column-name1, column-name2, column-name3) VALUES('$column-value1$', '$column-value2$', '$column-value3$')
    </access>
    <key>
      <column-value1>value1</column-value1>
      <column-value2>value2<column-value2>
       <column-value3>value3<column-value3>
    </key>
    </anyName > 
    </StatementName>
    Rest are all same.

  • Sql.exception using jdbc:odbc Sqlserver 7

    hi
    i use java jdk 1.3 and sqlserver 7.0 on windows98 and establish a connection over jbc:odbc. I use executeUpdate() statement and insert something to a table. there is a trigger defined and sometimes i got an sql.exception, that no rowcount returned.
    can you help me ?
    thanks jens

    The trigger does a rollback in some cases.
    Obviously - try this out! - this causes that JDBC exception then.
    Now I see a problem in this, that the trigger does rollbacks concering the connection, but your Java program does not know that its connection's actual transaction has been rolled back. Imagine, if you have done several steps before without commitng yet, they are rolled back as well.
    So I would use this only with AutoCommit set to true.
    I think it's not a good idea in general to let a trigger do a rollback. But in this area I have few experiences.
    I assume you have to use this table schema and its trigger definition and can't change it.
    So I would find out the error code which this DBException contains.
    So in case of exceptions you can identify if this case has happened and react on it in your logic. You must interpretate this as an error or maybe as an expected condition - that depends on your logic.
    Another thought: can't you validate the values before you do the insert. Then this logic would not longer be encapsulated in the trigger, but maybe it is really a validation rule which the program should know anyway. What do you tell the user if it has occured?

  • CORBA, JDeveloper3112, JDBC SQL Exception

    Hello
    I have implemented the following in a CORBA server class and deployed it on Oracle 8.1.6.
    >>
    public String getHelloJDBC() {
    try
    { DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    java.sql.Connection conn = DriverManager.getConnection
    ("jdbc:oracle:oci8:@O41R", "SYSTEM", "MANAGER");
    return "OCI 8 driver found";
    catch (SQLException e) { return e.toString(); }
    >>
    The developmment and the deployment was done via JDeveloper 3.1.1.2.
    The connection O41R has been setup using Connection Manager of JDeveloper as
    JDBC Driver = Oracle JDBC OCI-8 driver
    Connection Method = Existing TNS Names
    When I test this connection, it says "success".
    If I write a program WITHOUT using CORBA - JDBC access works fine.
    BUT - If I test this server method from the client code,
    System.out.println(corbaInterface.getHelloJDBC());I get error "java.sql.SQLException: No suitable driver".
    WHY?
    What must I have in my PATH, CLASSPATH for the Oracle JVM to find the OCI-8 driver?
    I have D:\OraNT\Bin (Oracle Server) and D:\JD3112\Bin (JDeveloper) in my PATH.
    I also have classes12 in my CLASSPATH.
    TIA
    Anil Apte
    null

    Hi bandana,
    From SAP Note --> 831162
    17. Receiver: java.sql.SQLException During First Message Processing
    Q: When sending a message to a JDBC receiver channel for the first time after an extended inactivity period, I am observing a java.sql.SQLException in the adapter's processing, which refers to a closed connection or a timeout? What is causing this and how do I work around this problem?
    A: The database server has apparently closed the adapter's JDBC connection from the server side. Nevertheless, the message should be processed successfully during the next retry. If you want to completely eliminate the symptoms, enable the setting "Advanced Mode" -> "Disconnect from database after each message processing". Note that this might have a negative performance impact for high-volume processing.
    I would recommend you to go through the complete note !!! Very Informative .
    Regards,

Maybe you are looking for

  • Tiger 10.4.11 to leopard to snow leopard

    I wish to up date my machine, a power mac g5 running tiger 10.4.11 to run the latest Life 09. This program only runs on Snow Leopard? It it true I have to install the leopard software before Snow leopard??? Message was edited by: max glleeson

  • Java 7 problem

    Blocked Plu-in problem: I was told by an Apple Techy this AM, that the Plug-in problem is caused by Java. Any fixes?

  • Duplication in files

    Hi We have a below scenario 1.Sales orders are created autamatically through Web interface... and the engineering drawing files are getting attached to the each item of sales order using DMS... When the orders are created autamatically in system ,we

  • Photoshop trial version with Creative Cloud

    I downloaded creative cloud, and now I'm trying to download the trial version of Photoshop, but I keep getting an error message saying there's a problem with either the internet or adobe servers. My internet is working. It says download failed. What

  • Installed Elements on my Mac...where did it go?

    I'm using the Akamai installer to install Elements on my new Mac desktop.  I open it, it runs through the steps, gives me a "your software has been installed" message...so, where did the software get installed??? I do not see it anywhere on my comput