Test cases for File to JDBC scenario?

Hi Experts,
I would like to know what are the things needs to be tested to ensure that the File to JDBC scenario holds good in the PI box. Your valuable inputs are required to verify /check my scenario configuration is free of errors.
Thanks & Regards,
Pcv.

Hi,
You can try the following:
1) If the end systems require authentication and the same is not provided in PI then it should throw an error.
2) Check what happens when you dont give a mandatory field.
3) check what result you will get when you give a wrong input.
4) Check whether all your restrictions (in mapping and/or in receiver determination) are working properly.
5) Check what you need to do when the target system is down.
6) If using any FCC then check whether the conversion is done properly.....
7) See to it that you have defined a proper DB structure when you are communication with JDBC
8) Check with the end system whether your statement (Insert/Update/Delete etc) is performed properly
Regards,
Abhishek.
Edited by: abhishek salvi on Dec 4, 2008 9:58 AM

Similar Messages

  • How to write test case for ViewController project using JUnit ?

    Hi All,
    JDev ver : 11.1.1.5
    JUnit : 1.9 jar added.
    I am writing test cases for my ViewController project. View project contains beans and other business logic files.
    So, for that I want to write test cases.
    In lot of codes I have FacesContext instance, there I am getting null pointer error.
    ex:
    public static String getFromHeader(String key) {
    FacesContext ctx = getFacesContext();
    ExternalContext ectx = ctx.getExternalContext();
    return ectx.getRequestHeaderMap().get(key);
    How to write cases for this scenario ?
    I came to know to use mockito, But I dont know how to mock the FacesContext.
    Anyone please help.
    Thanks,
    Gopinath

    Gopinath,
    Although I've not used it and cannot therefore say anything about whether it's useful or not - have you looked at JSFUnit?
    John

  • Error in running juit test case for struts2 action class

    Hi,
    I am getting error when i am running my junit test case for struts2 action class. Here is the code.
    public class RoleMasterNewActionTest extends StrutsTestCase {
         public void setUp() throws Exception {
            super.setUp();
            ObjectFactory.setObjectFactory( new ObjectFactory() );
         public void testDoSomeThing()throws Exception {
              RoleMasterNewAction action = new RoleMasterNewAction();
              assertTrue(action.doSomeThing());
    }I am getting error at testDoSomeThing(). the error is
    2010-04-30 15:07:12,263 INFO [com.opensymphony.xwork2.config.providers.XmlConfigurationProvider] - Parsing configuration file [struts-default.xml]
    2010-04-30 15:07:12,325 INFO [com.opensymphony.xwork2.config.providers.XmlConfigurationProvider] - Parsing configuration file [struts-plugin.xml]
    2010-04-30 15:07:12,388 INFO [com.opensymphony.xwork2.config.providers.XmlConfigurationProvider] - Parsing configuration file [struts.xml]
    2010-04-30 15:07:12,388 WARN [org.apache.struts2.config.Settings] - Settings: Could not parse struts.locale setting, substituting default VM locale
    2010-04-30 15:07:12,388 INFO [org.apache.struts2.config.BeanSelectionProvider] - Loading global messages from ipl.comm.resources.comman-Lookup
    2010-04-30 15:07:12,388 INFO [org.apache.struts2.config.BeanSelectionProvider] - Loading global messages from ipl.comm.resources.comman-label
    2010-04-30 15:07:12,388 INFO [org.apache.struts2.config.BeanSelectionProvider] - Loading global messages from ipl.comm.resources.comman-headings
    2010-04-30 15:07:12,388 INFO [org.apache.struts2.config.BeanSelectionProvider] - Loading global messages from ipl.comm.resources.comman-messages
    2010-04-30 15:07:12,388 INFO [org.apache.struts2.config.BeanSelectionProvider] - Loading global messages from ipl.comm.resources.comman-setup
    2010-04-30 15:07:12,388 INFO [org.apache.struts2.config.BeanSelectionProvider] - Loading global messages from ipl.comm.resources.common-errors
    2010-04-30 15:07:12,388 INFO [org.apache.struts2.config.BeanSelectionProvider] - Loading global messages from ipl.admin.resources.admin-label
    2010-04-30 15:07:12,388 INFO [org.apache.struts2.config.BeanSelectionProvider] - Loading global messages from ipl.admin.resources.admin-lookup
    2010-04-30 15:07:12,388 INFO [org.apache.struts2.config.BeanSelectionProvider] - Loading global messages from ipl.admin.resources.admin-headings
    2010-04-30 15:07:12,388 INFO [org.apache.struts2.config.BeanSelectionProvider] - Loading global messages from ipl.admin.resources.admin-jndinames
    2010-04-30 15:07:12,388 INFO [org.apache.struts2.config.BeanSelectionProvider] - Loading global messages from ipl.birthCertificate.resources.birth-jndinames
    2010-04-30 15:07:12,388 INFO [org.apache.struts2.config.BeanSelectionProvider] - Loading global messages from ipl.birthCertificate.resources.birth-labels
    2010-04-30 15:07:12,388 INFO [org.apache.struts2.config.BeanSelectionProvider] - Loading global messages from ipl.birthCertificate.resources.birth-headings
    2010-04-30 15:07:12,388 INFO [org.apache.struts2.config.BeanSelectionProvider] - Loading global messages from ipl.admin.resources.admin-alert
    2010-04-30 15:07:12,388 INFO [org.apache.struts2.config.BeanSelectionProvider] - Loading global messages from ipl.comm.resources.form
    2010-04-30 15:07:12,419 INFO [org.apache.struts2.spring.StrutsSpringObjectFactory] - Initializing Struts-Spring integration...
    2010-04-30 15:07:12,419 FATAL [org.apache.struts2.spring.StrutsSpringObjectFactory] - ********** FATAL ERROR STARTING UP STRUTS-SPRING INTEGRATION **********
    Looks like the Spring listener was not configured for your web app!
    Nothing will work until WebApplicationContextUtils returns a valid ApplicationContext.
    You might need to add the following to web.xml:
        <listener>
            <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
        </listener>but already i have the listener configuration in my web.xml.
    Thanks in advance..

    I guess it wasn't reading the right web.xml file.
    You may prove it by deleting your web.xml file (don't forget to make a backup), and then run the test again to see whether the error is the same.

  • Alert Configuration for File to IDoc scenario

    I have followed Alerts : Step-by-Step /people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions
    and configured Alerts for file to IDoc scenario.
    But the problem is, I did not notice any alerts being generated. I could notice the IDocs being posted to destination system. So I was going through Alerts-Troubleshoute Guide. In intension to maintain monitoring level, I clicked Configuration tab. But I did not notice my sender and receiver system there to maintain.
    Can any body help me to detail out the procedure to add sender and receiver systems to maintain the monitoring level?
    Regards,
    Suraj Kumar

    hi Suraj,
    WHich SP version are you on??
    If you are on Sp14 or above, then unfortunately, Michal's Trouble Shooting for Alerts will not help.
    From SP14 onwards, activation of end to end monitoring is not needed for Alerting. Refer to this note <b>870232</b> for this info.
    Next, to test if your Alerts have been defined correctly, go to SE38. In the program , type RSALERTTEST and then click on EXECUTE button ( F8 ). In the next window, it will ask you for your ALERTCATEGORY. Just give the name of your ALERT CATEGORY and click EXECUTE.
    If you have configured your alerts correctly, you will receive a message that tells ALERT IS GENERATED and will give the ALERT ID.
    Now, go to your Run TIme workbench and then select ALERT INBOX and see if you have got the ALERT message in your ALERT INBOX.
    If this is working fine, then the last step, implement the note 913858.
    Regards,
    Bhavesh

  • Error in File-XI-JDBC Scenario

    Dear All,
    I am working on File-XI-JDBC scenario which is using stored procedure (SP_UPDATE). When I am processing the file it is giving me the following error in the message monitoring:
    Unable to execute statement for table or stored procedure. 'SP_UPDATE' (Structure 'Statement') due to java.sql.SQLException: ERROR: Invalid XML document format for stored procedure: 'type="<SQL-type>"' attribute is missing for element 'access' (Setting a SQL-type (e.g. INTEGER, CHAR, DATE etc.) is mandatory !)
    Please guide me what is this error all about and how this can be resolved.
    Warm Regards,
    N.Jain

    Dear All,
    Now, I am able to update the SQL Server database but only one record is coming at the target. Can anyone please guide me what is he error in my Data types o in my mappings. Following is the source Data Type:
    MT_TEST_FILE_T179T      1..1     DT_TEST_FILE_T179T
         ROOT                         1..unbounded
            PRODH                    1..unbounded     xsd:string
            VTEXT                      1..unbounded     xsd:string
            DATUM                     1..unbounded     xsd:string
    Following is the target Data Type:
    MT_TEST_JDBC_T179T      1..1     DT_TEST_JDBC_T179T
         STATEMENT                1..1
            SP_UPDATE             1..1
                action                    required     xsd:string
                TABLE                  1..1                     xsd:string     
                    PRODH             1..unbounded     xsd:string
                       type               optional            xsd:string
                    VTEXT               1..unbounded     xsd:string
                       type               optional            xsd:string
                    DATUM              1..unbounded     xsd:string
                       type               optional            xsd:string
    Following are the mappings done:
    EXECUTE-->@action
    storedprocedurename-->TABLE
    PRODH-->PRODH
    VTEXT-->VTEXT
    DATUM-->DATUM
    CHAR-->@type.
    With this stucture and mapping i am able to insert only one recored in the database even though there are multiple entries in the file.
    Please guide me in solving this error so that multiple records can be inserted.
    Warm Regards,
    N.Jain

  • Strange error in File-XI-JDBC scenario

    Dear All,
    I am working currently on File-XI-JDBC scenario and is facing with a stange problem.
    I have writtern one simple query which is downloading the data from R/3 and is sending to XI Server local folder. From that folder File is getting picked by XI and is posted into SQL database.
    Now, when I am generating the required file from R/3-DEV server then my scenario is getting executed successfully but if file is generated thru R/3-QAS Server then the scenario is giving the following error "Message processing failed. Cause: com.sap.aii.af.ra.ms.api.RecoverableException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'MARA_UPDATE' (structure 'Statement'): java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Error converting data type nvarchar to smalldatetime."
    Also, if I am copying the complete data from the error file and paste it into a new file and executing again then the scenario is executing correctly.
    I have checked the payload and didn't find anything there.
    Kindly help me in solving this error.
    Regards,
    N.J

    Hi Farooq,
    Thanx for your reply. But this scenario is running when we are sending the file from R/3-DEV Server and also if I am copying all the contents of the error file and pasting it into a new file and then processing the file then the scenario is getting executed and I am getting no error with the same data which I have processed earlier and has thrown error.
    Reg,

  • File to Jdbc Scenario

    Hi All,
           I am doing a File to JDBC scenario, where sender side message type occurance is 0..unbounded and receiver side message type occurance is 1 in message mapping. The whole scenario working fine when both sender and receiver side message type occurance is 1 in message mapping.
    When Sender side occurance is 1.
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:mt_smtjdbc_sender xmlns:ns0="http://SmartJDBC">
       <NAME>A</NAME>
       <DEPT>B</DEPT>
    </ns0:mt_smtjdbc_sender>
    When Sender side occurance is 0..unbounded.
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
       <ns0:Message1>
          <ns1:mt_smtjdbc_sender xmlns:ns1="http://SmartJDBC">
             <NAME>Dip</NAME>
             <DEPT>xi</DEPT>
          </ns1:mt_smtjdbc_sender>
       </ns0:Message1>
    </ns0:Messages>
    If I use Sender side occurance as 0..unbounded I am getting the following error in adapter engine Communication channel monitor (for receiver communication channel)
    Error while parsing or executing XML-SQL document: Error processing request in sax parser: No 'action' attribute found in XML document (attribute "action" missing or wrong XML structure)
    Can anybody please help me how to solve this problem?
    Dipankar

    Hi,
    My Sender side structure as follows.
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
       <ns0:Message1>
          <ns1:mt_smtjdbc_sender xmlns:ns1="http://SmartJDBC">
             <NAME>DIp</NAME>
             <DEPT>XI</DEPT>
          </ns1:mt_smtjdbc_sender>
       </ns0:Message1>
    </ns0:Messages>
    My corresponding Receiver side structure as follows.
    <?xml version="1.0" encoding="UTF-8" ?>
    <ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
    <ns0:Message1>
    <ns1:mt_smtjdbc_receiver xmlns:ns1="http://SmartJDBC">
    <Statement>
    <dbTableName action="INSERT">
    <TABLE>SMARTOP</TABLE>
    <access>
      <NAME>DIp</NAME>
      <DEPT>XI</DEPT>
      </access>
      </dbTableName>
      </Statement>
      </ns1:mt_smtjdbc_receiver>
      </ns0:Message1>
      </ns0:Messages>

  • Error comming in File to JDBC scenario.

    Hi Frnds,
    I am trying to do the File to JDBC scenario and is using the SQLServer.
    After processing the message, it is showing executed successfully in moni but for the receciver communication channel  i am getting the error like---->
    Error during database connection to the database URL 'jdbc:sqlserver://10.112.132.211:1433;databaseName=DemoDB' using the JDBC driver 'com.microsoft.jdbc.sqlserver.SQLServerDriver': 'com.sap.aii.adapter.jdbc.sql.DriverManagerException: Cannot establish connection to URL 'jdbc:sqlserver://10.112.132.211:1433;databaseName=DemoDB': SAPClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDriver'
    What could be the possible solution for it.
    Thnx
    Raj.

    Hi Raj,
    As Prateek mentioned, the error you are getting is because of an improper installation of a driver.
    Check out the doc for the driver installtion steps : [How To Install and Configure External Drivers for the JDBC & JMS Adapters|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f04ce027-934d-2a10-5a8f-fa0b1ed4d88f]
    Also, the following thread contains some more useful links : Re: What's necessary to connect SQL server to XI?
    Thanks,
    Pooja Pandey

  • File to JDBC Scenario using stored procedure Question

    Does anyone have an aswer (or have you seen a Blog that covers it) to the problem of having to do a table refresh before doing inserts in a file 2 jdbc scenario?
    Essentially the details are as follows:
    I have an input file that has all the data for a table (it's a complete table dump) of lets say userdata (username, name, hiredate).
    I need to pass that to an oracle database via stored procedure(s).  But before I start issuing my insert (via insert stored procedure) I have to somehow issue a delete statement to delete all the contents of the table I'm about to update.  I'm on XI 3.0 and aren't sure what the best solution to this may be.
    Again if there is a blog that covers this then if you could point me in that direction it would be great.  Otherwise if anyone has any good ideas it would be appreciated.

    Hi,
    For structure refer this blog..
    /people/sap.user72/blog/2005/06/01/file-to-jdbc-adapter-using-sap-xi-30
    Use two <Statement> tags as shown here and there you may have separate tablenames.
    http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/frameset.htm
    Thanks,
    Jogula Ramesh

  • Multiline Error for File To JDBC

    Hi All,
    I am doing a File to JDBC Sync Scenario Multi line Scenario.
    my data structure outbound is .....
    <Record>
    <Row>
    <Id></Id>
    <Name></Name>
    <Job></Job>
    <Company></Company>
    </Row>
    </Record>
    and Inbound data structure is.......
    <Employee>
    <acction>TableName</acction>
    <access>
         <Id></Id>
         <Name></Name>
         <Job></Job>
         <Company></Company>
    </access>
    </Employee>
    <key>
         <Id></Id>
    </key>
    Error while parsing or executing XML-SQL document: Error processing request in sax parser: Error when executing statement for table/stored proc. 'Employee' (structure 'Table'): java.sql.SQLException: FATAL ERROR: Column 'Key' does not exist in table 'Employee'
    I am using to send the data through Text File. File is picking but there is no response. The above Error is showing. Could you please help me to solve the problem.
    Thanks,
    Ashok.

    Hi Ashok,
         In this File to JDBC Scenario,In receiver JDBC having standard structure u can follow,
    Standard structure for receiver JDBC is:
    Example:
    STATEMENT NAME
        Action         Attribute
        TableName  Element
        Access       Element
          empid
          empname
          address
    , I thought u mistake in structure itself, because the TableName can be passed to Action field.Please check it and do it.
    Regards,
    Sateesh

  • File-XI-JDBC Scenario

    Dear All,
    I am working on File-XI-JDBC scenario. I am able to update the SQL database with the file.
    My SQL database is having following columns:
    MATNR MATXT DATUM
    Now, I want is that even if the MATNR is already existing in the database then again that entry should not be inserted into the database with the different date although the same MATNR exists in the flat file.
    Please guide me on how this can be done.
    Warm Regards,
    N.Jain

    HI,
    Check out the weblog and help for writing stored procedure:
    /people/siva.maranani/blog/2005/05/21/jdbc-stored-procedures
    /people/sriram.vasudevan3/blog/2005/02/14/calling-stored-procs-in-maxdb-using-sap-xi
    http://www.ics.com/support/docs/dx/1.5/tut6.html
    http://java.sun.com/docs/books/tutorial/jdbc/basics/sql.html
    http://www.sqlteam.com/article/stored-procedures-an-overview
    Thnx
    Chirag

  • Facing Problems in File to JDBC scenario

    Hi Folks,
        I am trying to configure a file to jdbc scenario where I'm getting the below error.
    Error during database connection to the database URL 'jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=D:\usr\sap\PRD\SYS\global\Receive\Student.mdb' using the JDBC driver 'sun.jdbc.odbc.JdbcOdbcDriver': 'com.sap.aii.adapter.jdbc.sql.DriverManagerException: Cannot establish connection to URL 'jdbc:odbc:Driver={Microsoft Access Driver (.mdb)};DBQ=D:\usr\sap\PRD\SYS\global\Receive\Student.mdb'*: SQLException: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified'
    I Have done the below configuration for the receiver JDBC adapter
    Driver : sun.jdbc.odbc.JdbcOdbcDriver
    Connection : jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=D:\usr\sap\PRD\SYS\global\Receive\Student.mdb
    tried to provide the user id & password as well as the password and also tried with with keep them blank. My Ms access 2007 database table is in the application server itself.
    I've also checked with the below blogs & forums:
    MS  ACCESS 2007 to PI 7.01
    /people/sameer.shadab/blog/2005/10/24/connecting-to-ms-access-using-receiver-jdbc-adapter-without-dsn
    http://www.riyaz.net/blog/jdbc-adapter-configuration/technology/1200/
    Thanks Experts.

    Hi Santosh,
    If also could be possible that, you have not added proper JDBC dirver and hence i think you are getting following error:
    Data source name not found and no default driver specified'
    So first add the JDBC driver( .jar) to the SAP PI JDBC library and redeploy the .sda file and then retest your scenario. Here is a link to PDF which explain how to add external drivers to use new DB drivers in the JDBC adapter.
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f04ce027-934d-2a10-5a8f-fa0b1ed4d88f?quicklink=index&overridelayout=true
    Regards,
    RK

  • Exception in File To JDBC Scenario

    Hi,
    I am getting the Exception "Error ID     EXCEPTION_DURING_EXECUTE" while working with File to JDBC Scenario.
    Pl Let me know why this exception is raised?
    Thanks,
    Srini

    Hi Srinivasaphani,
    This indicates that your message mapping failed.
    Copy the XML message from monitoring and exectute the mapping in Integration Builder with maximal trace to get the reason.
    If Source is a flat file then maybe your encoding is not ok....
    if so have a look at
    File Encoding section:
    http://help.sap.com/saphelp_nw04/helpdata/en/e3/94007075cae04f930cc4c034e411e1/content.htm
    Also go through this link:
    /people/michal.krawczyk2/blog/2005/09/16/xi-how-to-test-your-mapping-in-real-life-scenarios
    Also go thru XI pipeline services-
    http://help.sap.com/saphelp_nw2004s/helpdata/en/41/b714f85ffc11d5b3ea0050da403d6a/content.htm
    Regards,
    Abhy

  • What are the connections to be done for file-to-RFC scenario in XI & R3 ?

    Hi,
    What are the connections to be done for file-to-RFC scenario in XI & R3 & also if it is RFC-to-File .
    I need to know what type connections used for  file-to-RFC in backend .
    In SLD it should be Third Party or  WEB AS ABAP..

    Hi Nandan,
    Perform the following configurations...
    <b>SAP XI</b>
    <b>1) RFC Destination (SM59)</b>
    a) Choose create.
    b) Specify the name of the RFC destination
    c) Select connection type as 3 and save
    d) In the technical settings tab enter the details SAP SID/URL and system number#.
    e) Enter the Gateway host as same details above SID/URL.
    f) Gateway service is 3300+system number#.
    g) In the Logon /Security tab, enter the client user & Password details of Destination system.
    h) Test the connection and remote logon.
    <b>2) Create Port (IDX1)</b>
    a) Select create new button
    b) Enter the port name as SAP+SID (The starting char should be SAP)
    c) Enter the destination client.
    d) Enter the RFC Destination created in SAP R/3 towards other system.
    e) Save
    <b>SAP R/3</b>
    <b>1) RFC Destination (SM59)</b>
    a) Choose create.
    b) Specify the name of the RFC destination
    c) Select connection type as 3 and save
    d) In the technical settings tab enter the details SAP SID/URL and system number#.
    e) Enter the Gateway host as same details above SID/URL.
    f) Gateway service is 3300+system number#.
    g) In the Logon /Security tab, enter the client user & Password details of Destination system.
    h) Test the connection and remote logon.
    <b>2) Create Port (We21)</b>
    a) First Select Transactional RFC and then click create button
    b) Enter the destination port name as SAP+SID (The starting char should be SAP)
    c) Enter the destination client.
    d) Enter the RFC Destination created in SAP R/3 towards other system.
    e) Save
    Regards
    San
    Remember to set the thread to solved when you have received a solution there is a Way.

  • Regarding File 2  JDBC Scenario

    Hi Friends,
                  can anybody help me on file 2 jdbc scenario. here my input file is not picked but in moni it is showing black flag. and in message monitoring in adapter engine sender side interface status is successful but receiver side interface status is waiting and i am not getting the output in my database table.please help me one this issue

    Hi Uday
    Kindly check your server and port whether they are up
    go to transaction SM49 and click on PING then in the next string give your server and port address and press F8
    you will get the actual status of your server
    also
    You have to deploy the required JDBC drivers for the database before making connection. Ask the database provider or your vendor for the divers. That should be deployed using SDM tool
    Start visual admin of XI and select service "Deploy" and then select option "Deploy and start" to select file and deploy it
    now here is the steps to deploy this module.
    How to deploy adapter module in production
    Three option available:
    1. Using SDM
    2. Using Visual Admin
    3. Using NW development studio (Not available for Production)
    We will use Visual Admin “Deploy” deploy service to deploy EAR file of adapter module.
    Steps:
    1. Goto VM->Deploy service
    2. Select option “Deploy and start”
    3. Select EAR file provided for deployment
    4. Restart the service.
    5. Done
    follow this guide
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/70ffd890-0201-0010-708f-d5dad2dfcf3a
    good luck
    regards
    Sandeep
    If helpful kindly reward points
    Edited by: sandeep sharma on Apr 19, 2008 7:46 AM

Maybe you are looking for