1 2 Previous Next 17 Replies Latest reply on Jun 5, 2007 5:39 PM by Jason Porter

    Class loading problem

    Alexei none Apprentice

      I have a custom tag handler

      import com.sun.facelets.FaceletContext;
      import com.sun.facelets.FaceletException;
      import com.sun.facelets.tag.TagAttribute;
      import com.sun.facelets.tag.TagConfig;
      import com.sun.facelets.tag.TagHandler;
      
      public class InsertItemTagHandler extends TagHandler {
      
       ...
      
       public InsertItemTagHandler(TagConfig config) {
       super(config);
      
       ...
      
       }
      
       public void apply(FaceletContext context, UIComponent component) throws IOException, FacesException, FaceletException, ELException {
      
       ...
      
       }
      
      }
      


      and I also defined a custom tag in my custom.taglib.xml
      <?xml version="1.0"?>
      <!DOCTYPE facelet-taglib PUBLIC
       "-//Sun Microsystems, Inc.//DTD Facelet Taglib 1.0//EN"
       "facelet-taglib_1_0.dtd">
      <facelet-taglib>
       <namespace>http://custom.ui</namespace>
       <tag>
       <tag-name>insertItem</tag-name>
       <handler-class>uicomponents.InsertItemTagHandler</handler-class>
       </tag>
      </facelet-taglib>
      


      but for unknown reason I obtain

      java.io.IOException: Error parsing [jndi:/localhost/custom-ui-component/WEB-INF/custom.taglib.xml]:
       ...
      Caused by: org.xml.sax.SAXException: Error Handling [jndi:/localhost/custom-ui-component/WEB-INF/custom.taglib.xml@15,67] <handler-class>
       ...
      Caused by: java.lang.Exception: uicomponents.InsertItemTagHandler must be an instance of com.sun.facelets.tag.TagHandler
      


      By the way, I have the only instance of jsf-facelets.jar (well, actually there are 2: first one in war.dir/WEB-INF/lib and other one in default/tmp/deploy, but I guess they are the same) and there is no ohter TagHandler classes defined.

      I also added to my application.xml
       <module>
       <java>custom-ui-component.war/WEB-INF/lib/jsf-facelets.jar</java>
       </module>
      

      but still no result.

      Any ideas?

        1 2 Previous Next