Hello,
I have an Custom Menu Navigation implemented in our portal. There are lots of helpful Threads here for such a task. But now, my Logfile is Full of ClassCastExceptions. It works as follows:
INavigationNode currentNode = navHelperService.getCurrentNavNode(request);
currentNode = navHelperService.getParentNode(currentNode, request);
So, after I have the current Node, I want to retrieve the parent node. It seems to work, but I also get this ClassCastException:
#1.5#000E7FED022C004A0000018B00005E8C000427C9306796CD#1169644949851#com.sap.portal.roles.RoleNavigation#sap.com/irj#com.sap.portal.roles.RoleNavigation#schebesta_c#16988##obdvee6.burda.com_EE6_666051050#schebesta_c#675dc470abaa11dbc029000e7fed022c#Thread[PRT-Async 0,5,PRT-Async]##0#0#Error##Java###URL does not point to an object of type INavigationConnectorNode: portal_content/com.burda/com.burda.HBM
[EXCEPTION]
#1#java.lang.ClassCastException
at com.sapportals.portal.pcd.pcm.roles.RoleNavigationConnector.getNodes(RoleNavigationConnector.java:282)
at com.sapportals.portal.pcd.pcm.roles.RoleNavigationConnector.getNode(RoleNavigationConnector.java:151)
at com.sapportals.portal.navigation.NavigationConnectorProxy.getNode(NavigationConnectorProxy.java:54)
at com.sapportals.portal.navigation.NavigationService.getNavNode(NavigationService.java:1034)
at com.sapportals.portal.navigation.NavigationService.getNode(NavigationService.java:370)
at com.sapportals.portal.navigation.cache.CachedNavigationService.getNode(CachedNavigationService.java:164)
at com.sapportals.portal.navigation.NavigationEventsHelperService.getParentNode(NavigationEventsHelperService.java:1305)
at burda.com.NavigationKnotenAnzeigenHierarchisch2.doContent(NavigationKnotenAnzeigenHierarchisch2.java:131)
at com.sapportals.portal.prt.component.AbstractPortalComponent.serviceDeprecated(AbstractPortalComponent.java:209)
at com.sapportals.portal.prt.component.AbstractPortalComponent.service(AbstractPortalComponent.java:114)
at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:328)
at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:136)
at com.sapportals.portal.prt.core.async.AsyncIncludeRunnable$1$DoDispatchRequest.run(AsyncIncludeRunnable.java:377)
at java.security.AccessController.doPrivileged(Native Method)
at com.sapportals.portal.prt.core.async.AsyncIncludeRunnable.run(AsyncIncludeRunnable.java:390)
at com.sapportals.portal.prt.core.async.ThreadContextRunnable.run(ThreadContextRunnable.java:164)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:729)
at java.lang.Thread.run(Thread.java:534)
By currentNode.getClass().toString() I tried to find out, what Class it consists. The result was:
class com.sapportals.portal.navigation.cache.CacheNavigationNode
So, after I defined currentNode as INavigationNode why is it now CacheNavigationNode? And if I have to use this in my code, does anybody know, in what file I can find it?
I'm on NW04 SPS 19.
Hope anybody out there has any suggestion. Thanks for help,
best regards,
Christian