04-27-2019 08:14 PM - edited 04-27-2019 08:47 PM
private static void traverse(NavuNode curr) throws Exception
{
if (curr instanceof NavuContainer)
{
NavuContainer currContainer = (NavuContainer)curr;
Iterator<NavuNode> iter = currContainer.children.iterator();
while(iter.hasNext())
{
traverse(iter.next());
}
}
else if (curr instanceof NavuList)
{
NavuList currList = (NavuList)curr;
Iterator<NavuContainer> listChildIter = currList.elements().iterator();
while (listChildIter.hasNext())
{
NavuContainer listChild = listChildIter.next();
traverse(listChild);
}
}
Why do I get this error on trying to call elements() on NavuList?
com.tailf.navu.NavuException: com.tailf.navu.NavuException: /ncs:devices/authgroups/group: internal
at com.tailf.navu.NavuList.refresh(NavuList.java:942)
at com.tailf.navu.NavuList.elements(NavuList.java:826)
at com.cisco.hsm.hsmgetkeyRFS.getListElements(hsmgetkeyRFS.java:341)
at com.cisco.hsm.hsmgetkeyRFS.traverse(hsmgetkeyRFS.java:302)
at com.cisco.hsm.hsmgetkeyRFS.traverse(hsmgetkeyRFS.java:296)
at com.cisco.hsm.hsmgetkeyRFS.saveData(hsmgetkeyRFS.java:248)
at com.cisco.hsm.hsmgetkeyRFS.hsmgetkey(hsmgetkeyRFS.java:152)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.tailf.dp.annotations.ActionCallbackProxy.action(ActionCallbackProxy.java:125)
at com.tailf.dp.DpActionTrans.protoCallback(DpActionTrans.java:315)
at com.tailf.dp.DpActionTrans.read(DpActionTrans.java:221)
at com.tailf.dp.DpActionTrans.run(DpActionTrans.java:128)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
at com.tailf.dp.DpThread.run(DpThread.java:41)
Caused by: com.tailf.navu.NavuException: /ncs:devices/authgroups/group: internal
at com.tailf.navu.NavuContext.initMaapiCursor(NavuContext.java:1280)
at com.tailf.navu.NavuCursor.<init>(NavuCursor.java:49)
at com.tailf.navu.NavuList.refresh(NavuList.java:913)
I also tried using NavuTreeTraversal. Even that throws an error:
<ERROR> 27-Apr-2019::16:40:06.080 TreeIterator Did-65-Worker-50: - child could not be added to stack adding null
com.tailf.navu.NavuException: com.tailf.navu.NavuException: /ncs:devices/authgroups/snmp-group: internal
at com.tailf.navu.NavuList.refresh(NavuList.java:942)
at com.tailf.navu.NavuList.children(NavuList.java:837)
at com.tailf.navu.traversal.TreeIterator.addChildren(TreeIterator.java:67)
at com.tailf.navu.traversal.TreeIterator.next(TreeIterator.java:45)
at com.tailf.navu.traversal.TreeIterator.next(TreeIterator.java:26)
at com.cisco.hsm.hsmgetkeyRFS.saveData(hsmgetkeyRFS.java:240)
at com.cisco.hsm.hsmgetkeyRFS.hsmgetkey(hsmgetkeyRFS.java:153)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.tailf.dp.annotations.ActionCallbackProxy.action(ActionCallbackProxy.java:125)
at com.tailf.dp.DpActionTrans.protoCallback(DpActionTrans.java:315)
at com.tailf.dp.DpActionTrans.read(DpActionTrans.java:221)
at com.tailf.dp.DpActionTrans.run(DpActionTrans.java:128)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
at com.tailf.dp.DpThread.run(DpThread.java:41)
Caused by: com.tailf.navu.NavuException: /ncs:devices/authgroups/snmp-group: internal
at com.tailf.navu.NavuContext.initMaapiCursor(NavuContext.java:1280)
at com.tailf.navu.NavuCursor.<init>(NavuCursor.java:49)
at com.tailf.navu.NavuList.refresh(NavuList.java:913)
... 18 more
Caused by: com.tailf.maapi.MaapiException: /ncs:devices/authgroups/snmp-group: internal
at com.tailf.maapi.MaapiException.mk(MaapiException.java:61)
at com.tailf.maapi.Maapi.getNext(Maapi.java:3857)
at com.tailf.navu.NavuContext.initMaapiCursor(NavuContext.java:1274)
... 20 more
05-02-2019 02:55 PM
The message in the exception says "internal", which indicates that it is an 'internal error' - ie., an error internal to the system, that is hopefully logged in the error log. Have you enabled the error log? Can you try this again and attach the error log here?
/Ram
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide