IBM Sterling Transformation Extender

Sterling Transformation Extender

Come for answers, stay for best practices. All we're missing is you.

 View Only
  • 1.  Runtime execution failure of map for WTX 8.2 and SEPA extender pack

    Posted Mon January 21, 2008 01:50 AM

    Originally posted by: SystemAdmin


    We had installed WTX 8.2 and the extender pack for sepa 4.2.2.All the requisites interim pack are installed.
    When we executed sepa validation map from the designer studio we have no issues.
    If we tried to execute from Java it gave us the error

    com.ibm.websphere.dtx.dtxpi.MException: Failed to allocate memory - Native function: CMpiCard::_EnsureAdapterLoaded
    at com.ibm.websphere.dtx.dtxpi.MMap.run(Native Method)

    I tried to execute from Java in a WTX 8.1 environment machine but got the same error.

    Below is the sample execution code . Kindly validate it and if possible please mail us a sample implementation project for the same.

    MMap map = new MMap("E:/Projects/Content Packs/6.1.0.1/banking/WTX/sepa_v4.2.2/mapsandschemas/sepvalid.mmc");
    //Get the adapter object handle for input card #1
    MCard card = map.getInputCardObject(1);

    // Override the adapter in input card #2 to be a stream
    card.overrideAdapter(null, MConstants.MPI_ADAPTYPE_STREAM);

    // Get the handle to the stream object
    MAdapter adapter = card.getAdapter();
    MStream stream = adapter.getOutputStream();

    // Input DATA :: Get the bytes from the file/
    byte[] EDIbytes = getEDIBytes(); // validationRequest.getEdiFile().getData();

    // Send a single large page
    stream.write(EDIbytes, 0, EDIbytes.length);
    // Get the adapter object handle for output card #1
    // output card #1
    card = map.getOutputCardObject(1);

    // Override the adapter in output card #1 to be a stream
    card.overrideAdapter(null, MConstants.MPI_ADAPTYPE_STREAM);

    //Run the map
    map.run();

    In the above code on map.run() we get the above said error.
    Thanks,
    Jignesh
    #DataExchange
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender


  • 2.  Re: Runtime execution failure of map for WTX 8.2 and SEPA extender pack

    Posted Mon January 21, 2008 09:37 AM

    Originally posted by: SystemAdmin


    Hi Jignesh!

    The same is for version 8.1. The problem is with input card 3, which uses ECHO adapter.
    If you replace the ECHO with the file adapter it will work fine.
    Unfortunately there is some problem with calling maps with ECHO input cards from Java api.

    Regards,
    Piotr
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender
    #DataExchange


  • 3.  Re: Runtime execution failure of map for WTX 8.2 and SEPA extender pack

    Posted Mon January 21, 2008 10:21 AM

    Originally posted by: SystemAdmin


    Hi Piotr,

    Thanks that worked......but after doing that and overiding the input card # 1 and 3 it gave me the error.....

    Map status: One or more inputs was invalid (8)
    following is the code

    MMap.initializeAPI(null);

    MMap map = new MMap("F:/Program Files/IBM/WebSphere Transformation Extender 8.1/packs/sepa_v4.2.2/mapsandschemas/sepValid.mmc");
    MCard card = map.getInputCardObject(1);
    MAdapter adapter = card.getAdapter();
    MStream stream = adapter.getOutputStream();

    // Override the adapter in input card #1 to be a stream
    card.overrideAdapter(null, MConstants.MPI_ADAPTYPE_STREAM);
    // Get the handle to the stream object

    // Input DATA :: Get the bytes from the file/
    byte[] EDIbytes = getEDIBytes("F:/Program Files/IBM/WebSphere Transformation Extender 8.1/packs/sepa_v4.2.2/mapsandschemas/pacs811c.xml");
    // Send a single large page
    stream.write(EDIbytes, 0, EDIbytes.length);
    System.out.println(EDIbytes.length+" : EdiBytes.length");
    MCard card3 = map.getInputCardObject(3);
    MAdapter adapter3 = card3.getAdapter();
    MStream stream3 = adapter3.getOutputStream();
    // Override the adapter in input card #3 to be a stream
    card3.overrideAdapter(null, MConstants.MPI_ADAPTYPE_STREAM);
    // Get the handle to the stream object

    // Input DATA :: Get the bytes from the file/
    byte[] EDIbytes1 = getEDIBytes("F:/Program Files/IBM/WebSphere Transformation Extender 8.1/packs/sepa_v4.2.2/mapsandschemas/sepaIpCard3.dat");
    // Send a single large page

    stream3.write(EDIbytes1, 0, EDIbytes1.length);
    System.out.println(EDIbytes1.length+" : EdiBytes1.length");
    // Get the adapter object handle for output card #1

    // Run the map
    System.out.println("b4 execution");
    map.run();
    System.out.println("After execution");


    Thanks,
    Jignesh

    Message was edited by: JigneshSampat
    #DataExchange
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender


  • 4.  Re: Runtime execution failure of map for WTX 8.2 and SEPA extender pack

    Posted Mon January 21, 2008 10:33 AM

    Originally posted by: SystemAdmin


    Hi!

    That's normal WTX repsponse, to locate what is wrong just check on the trace for input data and look for invalid data.
    You will quickly find out, where the problem is.

    Regards,
    Piotr
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender
    #DataExchange


  • 5.  Re: Runtime execution failure of map for WTX 8.2 and SEPA extender pack

    Posted Mon January 21, 2008 11:17 AM

    Originally posted by: SystemAdmin


    attached the trace file...

    needed ur comments. i tried to remove the encoding line from the data still no effect....will also attaching sample file.

    Thanks,
    Jignesh
    #DataExchange
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender


  • 6.  Re: Runtime execution failure of map for WTX 8.2 and SEPA extender pack

    Posted Mon January 21, 2008 11:24 AM
      |   view attached

    Originally posted by: SystemAdmin


    attached herewith is the data.....
    kindly refer the code ...
    // Initialize the API
    MMap.initializeAPI(null);

    MMap map = new MMap("F:/Program Files/IBM/WebSphere Transformation Extender 8.1/packs/sepa_v4.2.2/mapsandschemas/sepValid.mmc");
    // for i/p card # 1
    MCard card = map.getInputCardObject(1);
    MAdapter adapter = card.getAdapter();
    MStream stream = adapter.getOutputStream();

    // Override the adapter in input card #1 to be a stream
    card.overrideAdapter(null, MConstants.MPI_ADAPTYPE_STREAM);
    // Get the handle to the stream object

    // Input DATA :: Get the bytes from the file/
    byte[] EDIbytes = getEDIBytes("F:/Program Files/IBM/WebSphere Transformation Extender 8.1/packs/sepa_v4.2.2/mapsandschemas/pacs811c.xml");
    // Send a single large page
    stream.write(EDIbytes, 0, EDIbytes.length);
    System.out.println(EDIbytes.length+" : EdiBytes.length");

    // for i/p card # 3
    card = map.getInputCardObject(3);
    // Override the adapter in input card #3 to be a stream
    card.overrideAdapter(null, MConstants.MPI_ADAPTYPE_STREAM);
    // Get the handle to the stream object

    // Input DATA :: Get the bytes from the file/
    EDIbytes = getEDIBytes("F:/Program Files/IBM/WebSphere Transformation Extender 8.1/packs/sepa_v4.2.2/mapsandschemas/sepaIpCard3.dat");
    // Send a single large page

    stream.write(EDIbytes, 0, EDIbytes.length);
    System.out.println(EDIbytes.length+" : EdiBytes1.length");
    // Get the adapter object handle for output card #1
    // output card #3
    card = map.getOutputCardObject(3);

    // Override the adapter in output card #3 to be a stream
    card.overrideAdapter(null, MConstants.MPI_ADAPTYPE_STREAM);


    // Run the map
    System.out.println("b4 execution");
    map.run();
    System.out.println("After execution");
    Thanks,
    Jignesh
    #IBM-Websphere-Transformation-Extender
    #DataExchange
    #IBMSterlingTransformationExtender

    Attachment(s)



  • 7.  Re: Runtime execution failure of map for WTX 8.2 and SEPA extender pack

    Posted Tue January 22, 2008 05:45 AM

    Originally posted by: SystemAdmin


    The problem got resolved when I change the override adapter for input card # 1 to MPI_ADAPTYPE_FILE

    Thanks,
    Jignesh
    #IBM-Websphere-Transformation-Extender
    #DataExchange
    #IBMSterlingTransformationExtender


  • 8.  Re: Runtime execution failure of map for WTX 8.2 and SEPA extender pack

    Posted Thu March 24, 2016 09:10 AM

    Originally posted by: steverats


    Hello,

     

    I am working on the same code but I am getting another error.

     

    com.ibm.websphere.dtx.dtxpi.MException: Illegal function call - Native function: CMpiCard::_EnsureAdapterLoaded.

     

    at   // Get the handle to the stream object 
                MAdapter adapter = card.getAdapter();

     

    for the first time execution , it is working fine. But when i trigger the same for the second time I am getting the error above mentioned.

    my theme: MQ---------------------------->WTX_API-------------------------------MQ.

     


    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender
    #DataExchange


  • 9.  Re: Runtime execution failure of map for WTX 8.2 and SEPA extender pack

    Posted Mon March 18, 2019 02:13 PM

    Originally posted by: DaveFerguson


    I am having the same issue. Did you ever get this resolved?

     


    #IBMSterlingTransformationExtender
    #DataExchange
    #IBM-Websphere-Transformation-Extender