cancel
Showing results for 
Search instead for 
Did you mean: 

Null Pointer error with IWDPageService

Former Member
0 Kudos

Experts,

I am encountering a development scenario where it makes sense to use IWDPageService. However, while the Web Dynpro project builds just fine on my local machine, when I run it in EP, I get a NullPointerException.

Here is some sample code that generates the exception:


IWDPageService pageService = (IWDPageService) WDPortalUtils.getService(WDPortalServiceType.PAGE_SERVICE);
String[] iViews = pageService.getVisibleIViews();

Is there some sort of library reference that I need to specify before deploying?

Thank you for any help you can provide.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

IWDPageService is deprecated in the new release of NW. So, it is advisable to use IPageService. You may refer [this|http://help.sap.com/saphelp_nwce10/helpdata/en/42/e0cfcfb2636ffbe10000000a1553f6/content.htm] one which also mentions the dependencies (tc/ep/pagebuilder/api).

Bala

Former Member
0 Kudos

Bala,

Thank you for the helpful answer. We are not currently running NetWeaver CE (our EP installation is on Kernel Version 7.00 PatchLevel 108458.44 ), so it appears that I will have to use the deprecated API, correct? If so, can you point me to the Web Dynpro library reference that I would use to support IWDPageService?

If I am mistaken and we can use the EP_RUNTIME SC, where do I get it? I checked SDM and it is most definitely not installed on our portal right now.

Thanks again for your help.

Regards,

Doug

Former Member
0 Kudos

I think you may continue to use IWDPageService but a portal service could only be used if the Web Dynpro application and the SAP NetWeaver Portal run on the same SAP NetWeaver installation. Please check if this is the case in your setup.

You may refer this [link|http://help.sap.com/saphelp_nw04s/helpdata/en/d2/0357425e060d53e10000000a155106/frameset.htm] for further details.

Bala

Former Member
0 Kudos

Bala,

In our environment, I verified that Web Dynpro and EP are indeed running on the same server. And, based on the [help document|http://help.sap.com/saphelp_nw04s/helpdata/en/d2/0357425e060d53e10000000a155106/frameset.htm] you linked to, I shouldn't have to create a library or sharing reference in order for the code in my original post to work:


For services whose interfaces are provided by Web Dynpro (such as IWDPageService and IWDTrayService), you do not need to perform Steps 1 and 2.

I am going to close this thread and post an OSS message.

Thanks again for your help.

Doug

Former Member
0 Kudos

If you are interested, I found the solution: the Web Dynpro component needs to be tested after being embedded on a portal page that contains other iViews (Duh!). Just deploying and running from NetWeaver Developer Studio will cause a NullPointerError because there are no iViews yet to refer to.

Edited by: Doug McLaughlin on Sep 18, 2008 4:52 PM

Former Member
0 Kudos

Hi Dough,

I have tested the scenario as mentioned in this blog and it is working for me.

have a look and see whether is this any helpful?

http://nanobitinc.com/education/training/SAP/Tutorials/Web%20Dynpro/Portal%20Integration%20of%20Web%...

Thanks

Krishna