cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot access Portal Service DC from standalone Portal application DC

Former Member
0 Kudos

Hi all,

1. I have created a portal service(say TestService) in a Stand alone Portal Application DC(say publicdc).

2. I have specified the key of the portal service as KEY = "publicdc.TestService" (in this portalapp.xml, I added the startup property too)

3. Build and deployed the portal service DC and it started too.

4. Now, I created another standalone Portal Application DC(say testdc) and in the used DCs I have added the above portal service dc with buildtime, runtime and with strong qualifier.

5. I also added the epbc_prtapi_api

6. In my abstractportalcomponent I accessed the portal service as follows:

ITestService serv = (ITestService) PortalRuntime.getRuntimeResources().getService(ITestService.KEY);

7. In my portalapp.xml file of testdc, I specified the sharing reference as follows:

<application>

<property name="SharingReference" value="publicdc"/>

<application-config/>

In the value section of the SharingReference, I gave the name of the portal service DC.

8.Now I build and deployed my maindc but at runtime I get NoClassDefFoundError on the portal service(TestService).

Am I doing something wrong at any of the steps or am I missing something.

Please do let me know.

Thanks

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Changed

<application>

<property name="SharingReference" value="publicdc"/>

<application-config/>

TO

<application>

<application-config>

<property name="SharingReference" value="publicservice"/>

</application-config>