facebook

MyEclipse JSF Config Editor – … is not a subtype of …

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #257778 Reply

    Paul Baker
    Member

    I am returning to a JSF project that I shelved over a year ago. I’ve upgraded to Eclipse 3.2 and MyEclipse 5.0.

    In my faces-config.xml file the JSF Config Editor is complaining about the every component-class line and reporting that the class is not a subtype of class xxx.

    Example:

       <component>
          <description>A tabbed pane</description> 
          <component-type>com.eflight.components.TabbedPane</component-type>
          <component-class>com.eflight.components.tabbedPane.UITabbedPane</component-class>
       </component>

    component-class is marked in error with message:
    com.eflight.components.tabbedPane.UITabbedPane is not a subtype of javax.faces.compoment.UIComponent.

    The class signature is:

    public class UITabbedPane extends UICommand {
       private String content;

    The error is incorrect as UITabbedPane is a subtype of UIComponent.

    java.lang.Object
      |
      +--javax.faces.component.UIComponent
            |
            +--javax.faces.component.UIComponentBase
                  |
                  +--javax.faces.component.UICommand

    Comments?

    #257860 Reply

    Riyad Kalla
    Member

    It seems like a bug, but I just tried this locally and can’t reproduce it.

    Can you download my test project, open it and see what happens? See any differences that might explain it?

    #257884 Reply

    Paul Baker
    Member

    Your project works fine as is. However, when I configure it like my project I get the same results (error indicator).

    I have a separate component project within my workspace. When I reference component classes that exist within a different project I get the error. If the referenced component classes exist within the same project… no error.

    So there seems to be a problem when referencing classes that exist in another Eclipse project (within the same workspace).

    #257885 Reply

    Riyad Kalla
    Member

    How is your classpath setup? Does your web project get all of it’s custom components and JSF component classpath entries exported from the dependent Java Project, do both projects reference JSF and the web project gets it’s custom entries from the Java project, etc?

    #257889 Reply

    Paul Baker
    Member

    For your example I created another project named: TestJSFResolutionPart2 and moved the component class to that project. Sun JSF Reference Implementation 1.1.01 added to Part2 project. The Part2 project was added to the java build path via the Projects tab.

    How is your classpath setup?

    TestJSFResolution:

    <?xml version="1.0" encoding="UTF-8"?>
    <classpath>
        <classpathentry kind="src" path="src"/>
        <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
        <classpathentry kind="con" path="com.genuitec.eclipse.j2eedt.core.J2EE14_CONTAINER"/>
        <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/commons-beanutils.jar"/>
        <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/commons-collections.jar"/>
        <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/commons-digester.jar"/>
        <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/commons-logging.jar"/>
        <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/jsf-api.jar"/>
        <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/jsf-impl.jar"/>
        <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/jstl.jar"/>
        <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/standard.jar"/>
        <classpathentry combineaccessrules="false" kind="src" path="/TestJSFResolutionPart2"/>
        <classpathentry kind="output" path="WebRoot/WEB-INF/classes"/>
    </classpath>

    TestJSFResolutionPart2:

    <?xml version="1.0" encoding="UTF-8"?>
    <classpath>
        <classpathentry kind="src" path="src"/>
        <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
        <classpathentry kind="con" path="com.genuitec.eclipse.j2eedt.core.J2EE14_CONTAINER"/>
        <classpathentry kind="lib" path="G:/j2ee/JSF/jsf-1_1_01/lib/jsf-impl.jar"/>
        <classpathentry kind="lib" path="G:/j2ee/JSF/jsf-1_1_01/lib/commons-beanutils.jar"/>
        <classpathentry kind="lib" path="G:/j2ee/JSF/jsf-1_1_01/lib/commons-collections.jar"/>
        <classpathentry kind="lib" path="G:/j2ee/JSF/jsf-1_1_01/lib/commons-digester.jar"/>
        <classpathentry kind="lib" path="G:/j2ee/JSF/jsf-1_1_01/lib/commons-logging.jar"/>
        <classpathentry kind="lib" path="G:/j2ee/JSF/jsf-1_1_01/lib/jsf-api.jar"/>
        <classpathentry kind="output" path="WebRoot/WEB-INF/classes"/>
    </classpath>

    I also has a problem when I selected Add JSF Capabilities to the new Part2 project. The jars did not get copied to the classpath (related problem?). So to solve that problem I added the JSF jars directly to the classpath. The custom components all compile clean.

    Does your web project get all of it’s custom components and JSF component classpath entries exported from the dependent Java Project.
    [pbaker01] Yes.

    Do both projects reference JSF and the web project gets it’s custom entries from the Java project, etc?
    [pbaker01] Yes.

    #257989 Reply

    Riyad Kalla
    Member

    Ok I think this is a bug, here’s what I did:

    1) Setup a Java Project with a custom class that extends UIComponent. I dragged and dropped all the JSF classes into here and added them to the build path. Builds fine.

    2) Setup a web project, add JSF caps to it, add Java Project to the build path.

    3) Edit the faces-config.xml file and add a custom component from the Java Project, error “com.test.MyUIComponent is not a subtype of javax.faces.component.UIComponent” is incorrectly marked.

    I appreciate your help in finding this bug, I have filed it.

Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: MyEclipse JSF Config Editor – … is not a subtype of …

You must be logged in to post in the forum log in