Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Null-Pointer Exception adding Methods to a Model

Hello Community,

i have a mysterious error which frustrates me a lot at the moment.

i have a wd-application using a ejb-model for a java bean with some methods. everything works fine with that application. but after that i wanted to add a new method to my bean and to use it in my model. so i reimported the model. but then i got the following exception from wd-runtime:

java.lang.NullPointerException:

at com.sap.tc.cmiimpl.base.model.BaseModel.<init>(BaseModel.java:63)

at com.sap.tc.webdynpro.model.ejb.model.EJBModel.<init>(EJBModel.java:40)

at com.huelsta.kall.mdata.model.currencies.MDCurrencies.<init>(MDCurrencies.java:121)

at com.huelsta.kall.mdata.wdcomponents.currencies.Currencies.<init>(Currencies.java:443)

at com.huelsta.kall.mdata.wdcomponents.currencies.wdp.InternalCurrencies.<init>(InternalCurrencies.java:253)

... 60 more

after spending hours for finding the problem i discovered, that only adding (not using!) the method of the ejb to my model is enough to produce the error. when i reimport the model and deselect the method in the model, everything works fine again. i further discovered that it has nothing to do with the ejb-method because the the method is very simple. the following method is enough to produce the exception:

public int getDemoCId ()

{

return 0;

}

selecting this method in my model causes the exception, deselecting it causes the application to run.

Any ideas about this strange behavior?

I use Netweaver CE 7.1 SP05

regards

m.hayk

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question