cancel
Showing results for 
Search instead for 
Did you mean: 

UriMapperService not found

Former Member
0 Kudos

Hi,

i am developing a portal service that needs to get the shortID of a km resource. I implemented the getCreateConstantID(RID rid) methode to achieve this. Unfortunetly i don´t know which service i need to enter in the portalapp.xml as

ServicesReference

, so this service is found at runtime.

i did try the com.sap.netweaver.bc.rf.service! But this didn´t work. But i don´t know if this is totally wrong or if the service isn´t started at all.

Can anybody help?

Thanx in advance

Accepted Solutions (1)

Accepted Solutions (1)

detlev_beutner
Active Contributor
0 Kudos

Hi Christian,

(a) You cannot use the UriMapperService implementation directly, for it is within the private part of the portal app you also referred to. Please submit the code fragment with the classes / interfaces used and causing the trouble.

(b) The general rule which SharingReference ("ServiceReference" is an old term from EP5, even if still valid) to use is easy: Fill in all portal application names which are also needed at compile time.

Hope it helps

Detlev

Former Member
0 Kudos

Hi Detlev,

thanks for your answer. I found another solution that fits for me. The reference to the knowledgemanagement is just enough. But i had to use a different way of initializing the Service:

IUriMapperService mapperService = (IUriMapperService) ResourceFactory.getInstance().getServiceFactory().getService(IUriMapperService.SERVICE_ID);

Best regards

Christian

detlev_beutner
Active Contributor
0 Kudos

Hi Christian,

> i had to use a different way of initializing the Service

You didn't tell your way, so no-one could help...

> The reference to the knowledgemanagement is just enough

Yes, that works for a lot of KM portal apps; anyhow, I explicitely discourage our developers of using this, for the following reason: The reference to Knowledgemanagement is a reference to an Alias to one portal application. The other km applications which are reached by this one reference are reached throughout transitiveness, see http://help.sap.com/saphelp_nw04/helpdata/en/95/1b1640a991c742e10000000a1550b0/frameset.htm

The disadvantage is that you don't know (except for testing via trial/error or checking the portalapp.xml references among each other for all SAP delivered EP apps) which portal apps you are reaching throughout this one reference.

So a more sophisticated approach is as described: Check at build time which JARs from which portal applications are used and put in all these different portal application names as SharingReference values. This way you have a 1:1 mapping between build and run time. Additionally, this way you can create plugins which automatically could set up the SharingsReference from the .classpath or vice versa... (We haven't done that yet, but still planning, if the time would allow...).

Hope it helps

Detlev

Former Member
0 Kudos

Hi Detlev,

i thought i did tell my solution. In the past i did use the PortalRuntime.getInstance().getService(...) Methode to instantiate the Services i wanted use. But unfortunately this resides in a NoClassDefFoundError, initiating the Service with over

ResoucerFactory.getInstance()...

i worked perfectly for me.

I agree with your sophiticated approach. But time ....

Thanks again

Best regards,

Christian

detlev_beutner
Active Contributor
0 Kudos

Hi Christian,

> thought i did tell my solution

Check above, you didn't

> i did use the PortalRuntime.getInstance().getService

That the way to access <i>portal services</i>; in the case discussed, it's a <i>KM service</i>, which is a complete different thing.

> sophiticated approach. But time ....

For complex scenarios, I think it can be a way to save time...

Hope it helps

Detlev

Answers (0)