Originally posted by: muralee
I have generated type tree for the following classes
package com.test;
public class LookupDALService {
public TranslationDTO convertToISV(TranslationDTO transDTO1)
{
if(transDTO1.getGender().equalsIgnoreCase("M"))
transDTO1.setGender("Male");
if(transDTO1.getClaimType().equalsIgnoreCase("P"))
transDTO1.setGender("Professional");
return transDTO1;
}
}
package com.test;
public class TranslationDTO {
public String gender;
public String claimType;
public String getClaimType() {
return claimType;
}
public void setClaimType(String claimType1) {
this.claimType = claimType1;
}
public String getGender() {
return gender;
}
public void setGender(String gender1) {
this.gender = gender1;
}
}
And I have used generated type trees as output cards in my map by assigning “SetDataToLookupDALService_ID” to
this field of LookupDALService and “SetDataToTranslationDTO_ID” to TranslationDTO.
And used “SetDataToTranslationDTO_ID” value in convertToISV of LookupDALService.mtt
br />
When I run the map I am not getting any errors.
But in the javatrace.log file,I have find following exceptions.
<2012-2732>: | | | Preparing method : convertToISV
<2012-2732>: | | |
convertXmlNodeToClass <2012-2732>: | | |
convertXmlNodeToClass (rc = 0) OK
<2012-2732>: | | |
convertXmlNodeToObject <2012-2732>: | | | | Retriving object from the pool, MapInstance:2 Reference:SetDataToTranslationDTO_ID
<2012-2732>: | | | | Failed to obtain the object from the pool
<2012-2732>: | | |
convertXmlNodeToObject (rc = 0) OK
<2012-2732>: | | | Method parameter 0 : com.test.TranslationDTO prepared successfully
<2012-2732>: | | | Invocation error while calling convertToISV
<2012-2732>: | |
performClassOperation (rc = -2) *** ERROR ***
<2012-2732>: | | Exception caught : class java.lang.reflect.InvocationTargetException
<2012-2732>: | | Localized Message : null
<2012-2732>: | | Message : null
<2012-2732>: | | Stack trace :
<2012-2732>: | | java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60)
at java.lang.reflect.Method.invoke(Method.java:391)
at com.ibm.websphere.dtx.m4java.MAdapterImpl.invokeMethodsAndGenerateOutput(MAdapterImpl.java:1079)
at com.ibm.websphere.dtx.m4java.MAdapterImpl.performClassOperation(MAdapterImpl.java:730)
at com.ibm.websphere.dtx.m4java.MAdapterImpl.get(MAdapterImpl.java:252)
Caused by: java.lang.NullPointerException
at com.test.LookupDALService.convertToISV(LookupDALService.java:43)
... 8 more
<2012-2732>: | | Java exception occurred: java.lang.reflect.InvocationTargetException
<2012-2732>: |
get (rc = -1001) *** ERROR ***
<2012-2732>: |
onNotify <2012-2732>: | | OnNotify called for GETSTOP
<2012-2732>: |
onNotify (rc = 0) OK
<2012-2828>:
onNotify <2012-2828>: | OnNotify called for PREPARE_DESTROY
<2012-2828>:
onNotify (rc = 0) OK
<2012-2732>: |
disconnect <2012-2732>: | | Closing trace file and exiting function
<2012-2732>: |
disconnect (rc = 0) OK
Can any one please help to out,to resolve this problem.
Message was edited by: muralee
#IBM-Websphere-Transformation-Extender#IBMSterlingTransformationExtender#DataExchange