cancel
Showing results for 
Search instead for 
Did you mean: 

Getting nullpointer Exception in Webdynpro application.

Former Member
0 Kudos

hi All,

I am getting one NullPointerException in the screen, .

This message is only coming only when the form is loading first time. So when i put the debugg statments to trace the error where it is coming, i come to know that it is coming before calling the init() method.

So when i click on the any of the button or firing the event in the screen, , i am not getting that error in the screen. Can u please tell me anybody , what would be the problem.s

for your reference i have added that screen shot in the in the following path. Please look at the same. It is production. i am not able to find the problem, could any body help to find what is the problem.

My Home > Web Dynpro Java > Main > Attachments

file name is > NullPointerException Easy.GIF

Is this error coming any of the life cycle methods creating internally by webdynpro framework.?

What is the lifecycle process of the webdynpro application.

Regards

Vijay

Accepted Solutions (0)

Answers (2)

Answers (2)

luciano_leitedasilva
Contributor
0 Kudos

Hi Vishal,

This NullPointerException is happing in either the view init method or controller init method. Have a look at this two methods...

Where is the code print this exception? I'm 100% sure that isn't standard web dynpro functionality print this message.

<a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/13/aeeb41eda96624e10000000a1550b0/frameset.htm">The lifecycle process of the webdynpro application.</a>

Regards,

Luciano

Former Member
0 Kudos

Hi Luciano ,

thanks for the reply

I have put the debugg statments also in the component contoller and custom controller init methods.

After that when i run the application it is throwing the exception in the component controller inbetween init() and wdDoBeforeNavigation() methods.

For your reference i have attached screen shot in the following path. under wiki

My Home > Web Dynpro Java > Main > Attachments

Filename is > NullPointerException Easy1.GIF

Acutally i was not able to provide the stract trace bcz , when i went the log files i am not finding any exception or error.

Regards

Vijay

luciano_leitedasilva
Contributor
0 Kudos

Vishal

Can you post the code of the controller's init method?

I belive that the error can be inside it.

Regards,

Luciano

Former Member
0 Kudos

Hi Luciano,

Thanks for the quick reply.

In the component controller , there is no has written, for this error debugging purupose, i have put the debugging statements in all the methods in component controller. Only following statement in all the methods in the component contrller.

wdComponentAPI.getMessageManager().reportSuccess(" Component Controller wdDoBeforeNavigation()----


>");

i am not able to find where is the problem it is throwing the Nullpointer exception.

Regards

Vijay

Regards

Vijay.

luciano_leitedasilva
Contributor
0 Kudos

Vishal,

So, I'm sure that there is any mistake in your code. Try see all point where you write this code: "wdComponentAPI.getMessageManager().reportSuccess".

In any place the code is printing a exception.

Try post the init method code.

Regards,

Luciano

Former Member
0 Kudos

Hi

I am not undertstanding what u are telling. Now there is nothing in the init() method of controller, bcz i have commented that 'wdComponentAPI.getMessageManager().reportSuccess' code also.

So , what is the mean of 'Try post the init method code' means...

Regards

Vijay

abhijeet_mukkawar
Active Contributor
0 Kudos

Hi,

what is you application about? Does it deal with external mapping, or other component?

if you comment the code in component controller , are you still getting the exception?

post all the code written in compoenent controller' init() as well as custome controllers init() if it is present ..

regards

Former Member
0 Kudos

Hi Vishal,

Could you explain a bit clear as to what you are trying to do and where are you getting error. If possible attach the error stack trace.

Thanks