Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

DestinationService lookup from udf fails

A user defined function is utilizing the web-as destination service to obtain RFC connection information. The following class cast exception failure occurs when trying to retrieve the reference to the destination service.

com/sap/security/core/server/destinations/service/LocalDestinationServiceImpl incompatible with com/sap/security/core/server/destinations/api/DestinationService

The following code snipit is provided below. The line that fails is bolded.


Context ctx = null;

DestinationService dstService = null;

try {

ctx = new javax.naming.InitialContext();

// lookup destination service

<b>dstService = (DestinationService) ctx.lookup(DestinationService.JNDI_KEY_LOCAL);</b>

} finally {

if (ctx != null) {




// Retrieve the destination associated with the pool name

RFCDestination destination = (RFCDestination) dstService.getDestination(

"RFC", poolName);


I also tried changing the dstService variable from DestinationService to LocalDestinationServiceImpl, but the same exception occured stating the returned LocalDestinationServiceImpl class was not compatible with itself.

The PI version is 7.0 sp10.

Any help with this is deeply appreciated.

Former Member

Helpful Answer

Not what you were looking for? View more on this topic or Ask a question