cancel
Showing results for 
Search instead for 
Did you mean: 

IUWLService throwing class cast exception.

former_member185029
Active Contributor
0 Kudos

Hello experts,

Following code is causing class cast exception.


IUWLService uwlService = (IUWLService) WDPortalUtils.getServiceReference(IUWLService.ALIAS_KEY);

Any idea?

-Ashutosh

Accepted Solutions (1)

Accepted Solutions (1)

siddharth_jain
Active Contributor
0 Kudos

Hi,

You can use this approach for getting the right name to give in the webdynpro Referance:

if you know the jar file name which houses the service class

you can search that file on Portal server.

when you will get the path where the jar file resides

then your service reference string will formulate like this:--

PORTAL:sap.com/<Folder name on server which houses the jar file>

add the service in shared reference.

Right click ur webdynpro project -> Properties -> Webdynpro references ->shared reference -> Add ->

PORTAL:sap.com/<Folder name on server which houses the jar file>

I would suggest not deploying the jar file along with Webdynpro project because later on it can cause some class loader problems.

Hope this Helps..

Siddharth

former_member185029
Active Contributor
0 Kudos

COOL

-Ashutosh

Former Member
0 Kudos

Hi,

could you please post, what you have entered exactly?

Thank you and kind regards, Patrick.

Answers (1)

Answers (1)

siddharth_jain
Active Contributor
0 Kudos

Hi,

Have you given the Shared reference entry for UWLservice in Webdynpro Shared Reference Tab ,if not then try giving it.

Also check the following link:

Regards,

Siddharth

former_member185029
Active Contributor
0 Kudos

Hi,

I have gone through the link you sent.

I get PortalRuntime.getRuntimeResources(); as null.

Also, please tell me EXCALTLY what should I enter as a reference?

-Ashutosh