Skip to Content
avatar image
Former Member

SSO - ClassCastException while getting information from system

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    Sep 05, 2008 at 12:45 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      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

  • avatar image
    Former Member
    Sep 05, 2008 at 12:46 AM

    The actual return type for

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

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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 05, 2008 at 08:53 PM

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

    Add comment
    10|10000 characters needed characters exceeded