on 05-07-2008 4:50 AM
Hi,
Can u please explain what is a null pointer exception
and when it comes into picture
Thanks
guna
Hi sekhar,
Null pointer exception is occured when you perform some operation on an object which is null or calling some method on the object that is null, you should not try to handle that exception i.e., DONT try ...catch the null pointer exception. It is nothing but patching the problem and it is not the right way. You should try to avoid performing any operation on null object.
In XI it will occure only in mapping (Graphical mapping and java mapping) if u used any UDF in it.
refer the following link
http://c2.com/cgi/wiki?NullPointerException
Regards,
Rohit
Reward points if helpful
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi
thanks for the answer
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Frnds,
Null Pointer Exception in SAP XI is similar in JAVA also,Because NetWeaver Based on JAVA,ABAP Stack...
when you are writing any UDF don't forget to catch the exception, How to catch the exception showed below...
When you encounter a NULL pointer exception ( Null pointer exception is the exception that is thrown by the JVM when you perform some operation on an object which is null or calling some method on the object that is null), you should not try to handle that exception i.e., DONT try ...catch the null pointer exception. It is nothing but patching the problem and it isin't the right way. You should try to avoid performing any operation on null object.
Eg:
object.method();
Assume this statement generates a null pointer exception.
Wrong method :
try {
object.method();
} catch ( Exception Ex) {
// handle the exception
}
Correct Method :
if ( object != null) {
object.method();
}
plz explain where u r getting this error ,mapping or any java function developement.
This error comes when any object that holds null value calls any method.
i think what u done,u initalized a object by null and calling a mehod using that object.
so,initialize your object by proper value then call method.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.