cancel
Showing results for 
Search instead for 
Did you mean: 

SSO - ClassCastException while getting information from system

Former Member
0 Kudos

Hi All,

I am trying to use SSO for my application.

I got sample codes from few of the threads related to SSO

Now I am getting ClassCastException , in the below line

ILandscapeService landSrv = (ILandscapeService) PortalRuntime.getRuntimeResources().getService(ILandscapeService.KEY);

Can some one guide me how to solve this issue, what are the api/jar that I need to include.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

try this SAP Note # 1147966...i don't think this is exact match...but related to this only.

Former Member
0 Kudos

The actual return type for

PortalRuntime.getRuntimeResources().getService(ILandscapeService.KEY)

I get is com.sapportals.portal.service.CompatibilityService

Former Member
0 Kudos

Hi

The com.sap.portal.compatibility50.systemlandscape_api.jar

has ILandscapeService

U can find that in Portal server SystemAdministration->support->portal runtime->portal deployment->ROOT/WEB-INF/portal/portalapps/com.sap.portal.compatibility50.systemlandscape/lib

Koti Reddy

Former Member
0 Kudos

Hi Reddy,

I have included the below mentioned jars already,

com.sap.portal.compatibility50.systemlandscape_api.jar

com.sap.portal.ivs.api_landscape_api.jar

com.sap.portal.ivs.systemlandscapeservice_api.jar

com.sap.portal.pcmbuilderservice_api.jar

lafapi.jar

prtapi.jar

prtconnection.jar

prtcoreservice.jar

prtdeploymentapi.jar

prtjsp_api.jar

prttest.jar

Is there anything else, do I need to add, any off my included jar conflicts.

Regards,

Bala

Former Member
0 Kudos

Hi.

did u check below thread?

Koti Reddy

Former Member
0 Kudos

Hi Reddy,

I saw the above mentioned thread, but still i could resolve the error

As I already have the above mentioned jar files with me,

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

is returning the object of type

"com.sapportals.portal.service.CompatibilityService" and the error is during the type casting to "ILandscapeService"

Also when tried with

ISystems mm_systemsService = (ISystems) PortalRuntime.getRuntimeResources().getService(ISystems.KEY);

I could not able to locate the interface ISystems

please advice

Regards,

Bala