Skip to Content
0
Former Member
Mar 24, 2008 at 10:15 AM

Problem in R3 Connection from portal

22 Views

Hi there,

I am making R3 connection from a portal application. I have created a system alias in portal and I am trying to access the same from my application. Following is the piece of code which we are using:

IConnectorGatewayService service = (IConnectorGatewayService) PortalRuntime.getRuntimeResources().getService(IConnectorService.KEY);

if(service == null){

throw new ConnectorException("Service not available in PortalRuntime");

}

ConnectionProperties props = new ConnectionProperties(req.getLocale(), req.getUser());

//ConnectionProperties props = new ConnectionProperties();

conn = service.getConnection(sysnr, props);

But whenever I execute the code I am gettnig the following exception:

java.lang.ClassCastException: com/sapportals/portal/ivs/cg/ConnectorService incompatible with com/sapportals/portal/ivs/cg/IConnectorGatewayService

The error occurs when I am trying to type cast into IConnectorGatewayService.

Can somone please throw some light on it.

Your help is highly appreciated.

Regards,

Ponraj M