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