on 09-14-2011 1:57 PM
Hi experts:
I am trying to use MAPPING_TRACE in my java mapping. My code as below.
private Map param = null;
private AbstractTrace trace = null;
public void setParameter(Map param) {
this.param = param;
}
public void execute(InputStream in, OutputStream out)
throws StreamTransformationException {
trace = (AbstractTrace) param
.get(StreamTransformationConstants.MAPPING_TRACE);
}
But it seems that method setParameter never called when java mapping executed, so the attribute param is always null. As a result, java.lang.NullPointerException was thrown. I have configured the TRACE_LEVEL correct on integration engine, also have searched a lot of SDN posts, but still now work now. Is there any additional configuration needed for operation mapping in ESR?
Hi,
setParameter(Map param){} is called after the default constructor and before the exceute() method of java mapping.
private Map param = null;
private AbstractTrace trace = null;
public void setParameter(Map param) {
this.param = param;
}
public void execute(InputStream in, OutputStream out)
throws StreamTransformationException {
trace = (AbstractTrace) param
.get(StreamTransformationConstants.MAPPING_TRACE);
}
Here, param is Map object and by using the get method we are calling the MAPPING_TRACE variable which is in StreamTransformationConstants class to access the values like message header.
Might be u are getting some null values from the message..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
11 | |
11 | |
10 | |
10 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.