Skip to Content
0
Former Member
Jan 15, 2009 at 07:04 PM

Error while running a portal component.

10 Views

Hi,

I am not able to access portal service from an abstract portal component that I created in the same project as the portal service. Here is the error I am getting:

Portal runtime error.

"An exception occurred while processing your request. Send the exception ID to your portal administrator.

Exception ID: 11:45_15/01/09_0068_15350950

Refer to the log file for details about this exception."

Here is the portalapp.xml:

<?xml version="1.0" encoding="utf-8"?>

<application>

<application-config/>

<components>

<component name="AOSTestComp">

<component-config>

<property name="ClassName" value="com.gfc.ume.service.AOSTestComp"/>

</component-config>

<component-profile/>

</component>

</components>

<services>

<service name="OfficeListService">

<service-config>

<property name="className" value="com.gfc.ume.service.OfficeListService"/>

<property name="startup" value="false"/>

</service-config>

</service>

</services>

</application>

Here is the code for the service:

public interface IOfficeListService extends IService

{

public static final String KEY = "OfficeListService";

public String testMyService(String user);

}

Here is the code for the component:

package com.gfc.ume.service;

import com.sapportals.portal.prt.component.*;

import com.sapportals.portal.prt.runtime.IPortalRuntimeResources;

import com.sapportals.portal.prt.runtime.PortalRuntime;

import com.sapportals.portal.prt.service.IService;

public class AOSTestComp extends AbstractPortalComponent

{

public void doContent(IPortalComponentRequest request, IPortalComponentResponse response)

{

IPortalRuntimeResources runtimeResources = PortalRuntime.getRuntimeResources();

IService aService = runtimeResources.getService(IOfficeListService.KEY);

IOfficeListService myService = (IOfficeListService)aService;

response.write(myService.testMyService("Longivity"));

}

}

Thanks

Tony