0 Replies Latest reply on Jan 24, 2008 10:48 AM by ylx24

    rich:tree - java.lang.reflect.InvocationTargetException

      I am trying to retrieve tree path of the selected node in NodeSelectListener. The code is very simple

       public void processSelection(NodeSelectedEvent event) {
       log.info("In nodeSelected() ...");
       UIComponent comp = (UIComponent) event.getComponent();
       log.info("component is " + comp.getClass().getName());
       HtmlTree tree = (HtmlTree) comp;
       ....
       ....
       }
      


      but always receive an InvocationTargetException at line

      HtmlTree tree = (HtmlTree) comp;


      Appserver output, stack trace of the exception is not available.
      09:44:32,693 INFO [OppSearchAction] In select()......
      09:44:35,630 INFO [OppTreeBean] In nodeSelected() ...
      09:44:35,630 WARN [lifecycle] /oppStructure.xhtml @22,123 nodeSelectListener="#
      {oppTreeBean.processSelection}": java.lang.reflect.InvocationTargetException
      09:44:35,740 INFO [OppTreeBean] In select() ...
      


      I did more tests and figured out the exception occurs whenever class "HtmlTree" is refered, such as
      log.info("component class " + HtmlTree.class);
      


      Could anybody explain what's wrong, I am really frustrated.

      Thanks,

      ylx