2 Replies Latest reply on Sep 7, 2009 11:23 AM by Andrey Dmitriev

    rich:tree error on nodeSelectListener

    Andrey Dmitriev Newbie

      Hi everybody!
      This simple code wonderfully worked in the JBoss version 4.2.x, but does not work in JBoss 5.1

      <rich:tree switchType="ajax" ajaxSubmitSelection="true" value="#{selectKladr.rootCityNode}"
      nodeSelectListener="#{selectKladr.cityNodeSelection}" var="citynode" >
       <rich:treeNode >
       <h:outputText value="#{citynode.kladrObject.addressName}" />
       </rich:treeNode>
      </rich:tree>
      
      --
      public void cityNodeSelection(NodeSelectedEvent event) {
       System.out.print("treeCitySelection run"); // this work
       HtmlTree tree = (HtmlTree) event.getComponent(); // this not work
       ...
      }
      
      

      I receive the following message:
      WARNING [javax.enterprise.resource.webcontainer.jsf.lifecycle] (http-127.0.0.1-8443-4) /toolsform/selectAddress.xhtml @24,60 nodeSelectListener="#{selectKladr.cityNodeSelection}": java.lang.reflect.InvocationTargetException

      Somebody can prompt how to solve this problem? Google is silent. :-(
      My configuration: JBoss 5.1, RichFaces v.3.3.1, Eclipse (v.3.5) project created with use seam-gen v.2.1.1.


      Thanks and sorry for my English!

        • 1. Re: rich:tree error on nodeSelectListener
          Nick Belaevski Master

          Hi,

          Looks like classloading issue, try adding loader repository, e.g. like this:

          <!DOCTYPE jboss-web PUBLIC
           "-//JBoss//DTD Web Application 4.0//EN"
           "http://www.jboss.org/j2ee/dtd/jboss-web_4_0.dtd">
          
          <jboss-web>
           <class-loading>
           <loader-repository>
           org.richfaces.samples.richfaces-demo:loader=richfaces-demo-jee5.war
           <loader-repository-config>java2ParentDelegation=true</loader-repository-config>
           </loader-repository>
           </class-loading>
          </jboss-web>


          • 2. Re: rich:tree error on nodeSelectListener
            Andrey Dmitriev Newbie

            I have forgotten to tell in the first message: all work in .war, but not work in .ear deploy.
            The answer has appeared very simple: I have placed almost all *.jar files form lib in .ear deploy. In the .war there were only following *.jar: jboss-seam-ui.jar and jxl.jar (without it did not work - mystery :-)) ). And all works! And I am happy!
            And once again excuse for my English :-)