IBM Sterling Transformation Extender

Sterling Transformation Extender

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


#Sterling
#Supplychain
 View Only
  • 1.  Multiple Map creation fails

    Posted 04/10/07 12:27 PM

    Originally posted by: SanjayPanchal



    code
    import com.ibm.websphere.dtx.dtxpi.MConstants;
    import com.ibm.websphere.dtx.dtxpi.MException;
    import com.ibm.websphere.dtx.dtxpi.MMap;

    public class Example1
    {
    public static void main(String[] args)
    {
    try
    {
    runMap();
    runMap();
    }
    catch( Exception e )
    {
    e.printStackTrace();
    }
    }

    private static void runMap() throws MException {
    // Initialize the API
    MMap.initializeAPI(null);

    // Create a map
    MMap map = new MMap("data/map/ns1ns2.mmc");

    // Run the map
    map.run();

    // Check the return status
    int iRC = map.getIntegerProperty(MConstants.MPIP_OBJECT_ERROR_CODE, 0);
    String szMsg = map.getTextProperty(MConstants.MPIP_OBJECT_ERROR_MSG, 0);
    System.out.println("Map status: " + szMsg + " (" + iRC + ")");

    // Clean up
    map.unload();
    MMap.terminateAPI();
    }
    }
    [/code]

    I tried the above code with test1.mmc given in example. It works fine but when i try it with the custom mmc created it fails with below output.

    code
    Map status: Source not available (12)
    com.ibm.websphere.dtx.dtxpi.MException: Loading map failed - Native function: CMpiMapSet::CMpiMapSet
    at com.ibm.websphere.dtx.dtxpi.MMap._init(Native Method)
    at com.ibm.websphere.dtx.dtxpi.MMap.<init>(Unknown Source)
    at Example1.runMap(Example1.java:37)
    at Example1.main(Example1.java:24)
    [/code]

    The strange thing is the first call to runMap is sucessfull while the second throws an exception.

    Can somebody throw some light on this?

    I am attaching the mms.

    Sanjay


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


  • 2.  Re: Multiple Map creation fails

    Posted 04/10/07 12:28 PM
      |   view attached

    Originally posted by: SanjayPanchal


    missed the attachment
    #DataExchange
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender

    Attachment(s)



  • 3.  Re: Multiple Map creation fails

    Posted 04/10/07 12:52 PM

    Originally posted by: SystemAdmin


    The key is the first line of the error:

    "Map status: Source not available (12)"

    The map is failing because it cannot find the input for one of the input cards. Try running the map with the Command Server on the UNIX box. Make sure it runs okay before trying to put it in your code.

    What is interesting is that you say the first time it worked fine, then after there was a problem. Perhaps the input card is set to delete on success. So, the input file might not exist after the first run. Something to check ... this might be proper behavior for a production map so instead you might just want to copy the input file back up.

    Yvonne Ricard
    Resistance is NOT futile.
    #DataExchange
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender


  • 4.  Re: Multiple Map creation fails

    Posted 04/11/07 01:18 PM

    Originally posted by: SanjayPanchal


    The input file is not getting deleted. The call to first runMap is getting executed while the same call on second attempt is failing.
    #DataExchange
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender


  • 5.  Re: Multiple Map creation fails

    Posted 04/10/07 09:46 PM

    Originally posted by: jvanboga


    Input could also be locked when you are trying to access it in the second execution. How far apart were the first and subsequent runs? Were they using the same input? From the same source? Is there more than one input card? What did the mmc log file say?
    #DataExchange
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender


  • 6.  Re: Multiple Map creation fails

    Posted 04/11/07 01:19 PM

    Originally posted by: SanjayPanchal


    I tried putting a sleep between two calls still it fails.
    #IBMSterlingTransformationExtender
    #DataExchange
    #IBM-Websphere-Transformation-Extender


  • 7.  Re: Multiple Map creation fails

    Posted 04/11/07 05:13 PM

    Originally posted by: SystemAdmin


    I just took a look at your maps. Does the problem occur if you do not have the functional maps as referenced maps? Could you test by converting them to local maps and see what happens?

    Yvonne Ricard
    Resistance is NOT futile.
    #IBM-Websphere-Transformation-Extender
    #DataExchange
    #IBMSterlingTransformationExtender


  • 8.  Re: Multiple Map creation fails

    Posted 04/12/07 09:05 AM

    Originally posted by: SanjayPanchal


    I tried it, still it fails
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender
    #DataExchange


  • 9.  Re: Multiple Map creation fails

    Posted 09/25/08 06:19 AM

    Originally posted by: SystemAdmin


    Hi SanjayPanchal:
    were u able to solbe this problem, I have a similar problem except that it doesn't say "Source not available ", it only says "
    com.ibm.websphere.dtx.dtxpi.MException: Loading map failed - Native function: CMpiMapSet::CMpiMapSet"
    #DataExchange
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender


  • 10.  Re: Multiple Map creation fails

    Posted 09/25/08 05:44 PM

    Originally posted by: Mr.WebSphreTX


    Try creating same map with sequence number at the end like map1.mmc, map2.mmc, map3.mmc map4.mmc.

    Now in the loop initialize and run the maps with incrementing the sequence number. Program should not call same map twice. Now even if you are running in loop it should work.

    I believe Command server does not support to run the same map concurrently. it can run only one instance at a time. If you have launcher you can run multiple instances.

    Try this and let group know.

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