Skip to Content
0
Former Member
Jan 26, 2007 at 11:08 PM

ClassCastException while getting IDestinationsService

25 Views

I have the following line of code in two different portal components. The first component is working fine. The second component is throwing a ClassCastException on this line.

IDestinationsService destinationsService = (IDestinationsService) PortalRuntime.getRuntimeResources().getService(IDestinationsService.KEY);

I've broken the statement down into multiple statements and stepped through them and found that

.getService(IDestinationsService.KEY)

is returning an object of type DestinationsService but for some reason can't be cast to IDestinationsService.

Does anyone have any thoughts on what could be causing this?