cancel
Showing results for 
Search instead for 
Did you mean: 

no class def found error - PortalRuntime ?????????

Former Member
0 Kudos

Hi all,

I have created a Web Dynpro application in which i am retrieving the mapped user id and password of the portal user.

I have imported all the necessary jar files.

However on deploying the code it gives me this error message.

********************************************

java.lang.NoClassDefFoundError: com/sapportals/portal/prt/runtime/PortalRuntime

at com.lti.TestApplView.wdDoInit(TestApplView.java:117)

at com.lti.wdp.InternalTestApplView.wdDoInit(InternalTestApplView.java:105)

at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.doInit(DelegatingView.java:61)

at com.sap.tc.webdynpro.progmodel.controller.Controller.initController(Controller.java:215)

********************************************

The code written in the init() method is as follows -

try {

IWDClientUser clientUser = WDClientUser.getCurrentUser();

IUser user = clientUser.getSAPUser();

IUserMappingService umserv =

(IUserMappingService) PortalRuntime.getRuntimeResources().getService(IUserMappingService.KEY);

IUserMappingData umdata=umserv.getMappingData(sysalias,user);

Map map = new HashMap();

try {

umdata.enrich(map);

} catch (NoLogonDataAvailableException e1) {

e1.printStackTrace();

}

String userid = (String) map.get("user");

String passwd = (String) map.get("mappedpassword");

wdComponentAPI.getMessageManager().reportSuccess("userid = " + userid );

wdComponentAPI.getMessageManager().reportSuccess("pswd = " + passwd);

} catch (WDUMException e) {

// TODO Auto-generated catch block

e.printStackTrace();

}

Kindly help.

Thanks and Regards,

Samta Nichani

Accepted Solutions (1)

Accepted Solutions (1)

former_member182372
Active Contributor
0 Kudos

Hi Samta,

Did you specify shared reference to portal runtime in WD project? Check this http://help.sap.com/saphelp_nw04/helpdata/en/d2/0357425e060d53e10000000a155106/frameset.htm

Best regards, Maksim Rashchynski.

Former Member
0 Kudos

Hi Maksim,

I added the following in the Sharing Reference -

PORTAL:sap.com/com.sap.km.application

However, it is now giving this error -

java.lang.NoClassDefFoundError: com/sapportals/portal/prt/service/usermapping/IUserMappingService

at com.lti.TestApplView.wdDoInit(TestApplView.java:117)

at com.lti.wdp.InternalTestApplView.wdDoInit(InternalTestApplView.java:105)

at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.doInit(DelegatingView.java:61)

Please help.

Thanks and Regards,

Samta Nichani

former_member182372
Active Contributor
0 Kudos

Hi Samta,

Check this

Best regards, Maksim Rashchynski.

Former Member
0 Kudos

Hi,

For accesing User Mapping data, the UME offers two Interfaces: IUserMappingService and IUserMappingData.

IUserMappingService is available via ServiceReference="com.sap.portal.usermapping"

Add PORTAL:sap.com/com.sap.portal.usermapping in servicereferece tab.

Hope that helps

Divakar

Answers (0)