cancel
Showing results for 
Search instead for 
Did you mean: 

Web dynpro using a portal service

Former Member
0 Kudos

Hello All,

We are using the JDI.

We want to use a portal service DC from a web dynpro DC.

The web dynpro DC is part of a software component.

When the portal service is a local DC it is working fine (except failing later on the CBS build)

but when the service is part of a software component as well I get a runtime exception: a java.lang.NullPointerException.

The WD sharing reference I'm using is: PORTAL:sap.com/<dc service prefix>.<service name>

I assume that this is the right reference because without this exact phrase I get a java.lang.NoClassDefFoundError: com/sap/<name of service>

<b>Does anybody know how to use a portal service that is part of software component?</b>

Thanks a lot in advance, Adi.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Add the portal service DC in used DCs , with build,deploy and runtime dependencies selected.

Regards

Bharathwaj

Former Member
0 Kudos

Thanks Bharathwaj , but I already solved my problem.

The solution was to change the next code line in the service client code :

Idb_srv DB_Service = (Idb_srv) WDPortalUtils.getServiceReference(Idb_srv.KEY)

to:

Idb_srv DB_Service = (Idb_srv) WDPortalUtils.getServiceReference(""<PARFilename>.<service name>");

Regards, Adi.

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Adi,

Please go through the links below

regards

Anil

Former Member
0 Kudos

Could you try changing the reference to the following:

PORTAL:sap.com/<portal service DC name>

Try it and let me know.

Regards,

Laxmi

Former Member
0 Kudos

Thanks Laxmi Malyala,

I tried your suggestion and it brings me back to the exception:

java.lang.NoClassDefFoundError

Then I guess that my reference was correct.

Thanks, Adi.