cancel
Showing results for 
Search instead for 
Did you mean: 

need service reference value

Former Member
0 Kudos

Hi, Iam using the following code,

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

but at run time it ie giving error that

java.lang.NoClassDefFoundError: com.sapportals.portal.prt.service.landscape.ILandscapeService

means i have to add service reference to solve this,

what is the value of service reference that i have to add to resolve this.

currently I am using this....

<property name="SharingReference"

value="com.sap.portal.ivs.api_iview, com.sap.portal.ivs.api_landscape "/>

</application-config>

Regards,

venki.

Accepted Solutions (1)

Accepted Solutions (1)

siddharth_jain
Active Contributor
0 Kudos

Hi Venki,

You can use this approach for getting the right name to give in the webdynpro Referance:

if you know the jar file name which houses the service class

you can search that file on Portal server.

when you will get the path where the jar file resides

then your service reference string will formulate like this:--

PORTAL:sap.com/<Folder name on server which houses the jar file>

Don't forget to add the service in shared reference.

Right click ur webdynpro project -> Properties -> Webdynpro references ->shared reference -> Add ->

PORTAL:sap.com/<Folder name on server which houses the jar file>

I would suggest not deploying the jar file along with Webdynpro project because later on it can cause some class loader problems.

Hope this Helps..

Please award points for an helpfull answer.

Regards,

Siddharth J.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi venki,

That class will be under landscapeapi.jar file. Add this jar file in lib folder. So that your problem will be solved.

Thanks

Former Member
0 Kudos

Hi,

Could you please let me know what is the fully qualified name of the portal service "Application Locking".

thanks & regards,

Manoj

Former Member
0 Kudos

I didn't get what you are asking.

No need to use any sharing reference.

Just copy the .jar file into lib folder of portal application project.

Former Member
0 Kudos

Hi,

When you need to use a portal service you need to give the sharing reference. I am talking about the list of the services available in the visual admin. In that only there is a service called "Application Locking" for which i want to know the fully qualified name. I have done the rest of the things.

thanks & regards,

Manoj

former_member182374
Active Contributor
0 Kudos

Hi,

Copy the jar to the lib folder and adding a sharing reference has the same result: the application will work.

However, adding a sharing reference is the correct way because it points to the portal service which is already deployed to the server. Additionally, the project size stays small because no external jars are added...

See this thread for jars/sharing references:

/thread/523012 [original link is broken]

Omri