ICEfaces
  1. ICEfaces
  2. ICE-4693

Project created by Eclipse bundle doesn't run on glassfish

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.8
    • Fix Version/s: 1.8.2
    • Component/s: Tool Integrations
    • Labels:
      None
    • Environment:
      ICEfaces-1.8.0-Eclipse-3.4.2-plugins, ICEfaces-1.8-Eclipse-3.5.0-plugins-v3.6.1

      Description

      "I have created a project according the tutorial of ICEfaces-1.8.0-Eclipse-3.4.2-plugins. Unfortunately, after the application deploy on glassfish 2.1, when I open in browser the sample page, a javascript error appears with the message "The object does not give support ...". Using netbeans i don't have any problems. I think that the problem is in deploy. Is there any suggestion of deploy setup in eclipse?

      Tomcat 6 works absolutely fine!
      Glassfish is version 2.1.

        Activity

        Hide
        Liming Wu added a comment -

        ICEfaces project created by ICEfaces tooling "ICEfaces-1.8.1-Eclipse-3.4.2-plugins" works just fine on Glassfish 2.1.

        The only thing that is different is that tutorial (Readme.pdf) is based on Tomcat. When you create ICEfaces project, you need to check "server supplied JSF implementation" as Glassfish already includes JSF impl. Libraries you need are
        -ICEfaces library v1.8.1
        -Apache Commons Library
        -FastInfoSet (optional)
        -JXL (optional)

        Show
        Liming Wu added a comment - ICEfaces project created by ICEfaces tooling "ICEfaces-1.8.1-Eclipse-3.4.2-plugins" works just fine on Glassfish 2.1. The only thing that is different is that tutorial (Readme.pdf) is based on Tomcat. When you create ICEfaces project, you need to check "server supplied JSF implementation" as Glassfish already includes JSF impl. Libraries you need are -ICEfaces library v1.8.1 -Apache Commons Library -FastInfoSet (optional) -JXL (optional)
        Hide
        Liming Wu added a comment -

        invalid as I could run ICEfaces project created by tooling on glassfish just fine.

        Show
        Liming Wu added a comment - invalid as I could run ICEfaces project created by tooling on glassfish just fine.
        Hide
        Luiz Abrahao added a comment -

        Have you tried to create an ICEfaces application using:

        • ICEfaces 1.8 - Eclipse 3.5.0 Plugins v3.6.1
        • Eclipse 3.5.0
        • Glassfish 2.1 (installed through the 'Download additional server adapters' feature)

        Using this configuration both files 'ice-extras.js' and 'icefaces-d2d.js' are not found and I get a http status 404.

        from web.xml generated by the ICEfaces plugin:

        <servlet>
        <servlet-name>Persistent Faces Servlet</servlet-name>
        <servlet-class>com.icesoft.faces.webapp.xmlhttp.PersistentFacesServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
        </servlet>

        <servlet-mapping>
        <servlet-name>Persistent Faces Servlet</servlet-name>
        <url-pattern>*.iface</url-pattern>
        <url-pattern>*.jspx</url-pattern>
        <url-pattern>/xmlhttp/* </url-pattern>
        <url-pattern>/faces/*</url-pattern>
        </servlet-mapping>

        Show
        Luiz Abrahao added a comment - Have you tried to create an ICEfaces application using: ICEfaces 1.8 - Eclipse 3.5.0 Plugins v3.6.1 Eclipse 3.5.0 Glassfish 2.1 (installed through the 'Download additional server adapters' feature) Using this configuration both files 'ice-extras.js' and 'icefaces-d2d.js' are not found and I get a http status 404. from web.xml generated by the ICEfaces plugin: <servlet> <servlet-name>Persistent Faces Servlet</servlet-name> <servlet-class>com.icesoft.faces.webapp.xmlhttp.PersistentFacesServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>Persistent Faces Servlet</servlet-name> <url-pattern>*.iface</url-pattern> <url-pattern>*.jspx</url-pattern> <url-pattern>/xmlhttp/* </url-pattern> <url-pattern>/faces/*</url-pattern> </servlet-mapping>
        Hide
        Steve Woodley added a comment -

        I have exactly the same issue and can produce a repeatable case - please see my comment in the above forum reference (http://www.icefaces.org/JForum/posts/list/13151.page#56078).

        As per my comment, I believe I have narrowed down the problem to the fact that GlassFish does not obey the servlet mapping :-
        <url-pattern>/xmlhttp/* </url-pattern>
        for the persistent faces servlet, due to the prescence of the extra space after the URL pattern.

        My comment post lists the versions used. Basically I downloaded the current latest production versions of Eclipse Galileo, IceFaces and GlassFish together with all the latest plugins during the last couple of days, created a simple ICEFaces (nb "non-facelet 2.3, 2.4 or 2.5 GlassFish" version) dynamic web application in Eclipse, and hit the above error immediately when running the generated example page on GlassFish (works fine on Tomcat 6).

        This is of particular concern as being a new user, it effectively presented a brick wall to using ICEFaces, as the tutorial samples all work but any generated apps of my own (e.g. a simple test with sortable table headers) failed to display correctly and work properly (see forum comment).

        I spent significant time diagnosing the issue. Other developers new to ICEFaces and deploying to GlassFish may not be so patient and may end up dumping ICEFaces for something else because of this, which would be a shame as the fix is trivial (delete a single space).

        It would be very helpful if this could at least be documented and ideally fixed by removing the space in the generated web.xml. I appreciate it is perhaps a grey area - I'm not sure what the spec rules are for url patterns re trailing spaces - in this case, it appears Tomcat 6 strips them and GlassFish does not, so this could either be a GlassFish bug or both a Tomcat and ICEFaces plugin bug.

        It would also be helpful if there was a way of editing the template data for the plugin so that a correct web.xml is generated each time without needing to edit it - is this possible? I had a look but could not see how to do this.

        Show
        Steve Woodley added a comment - I have exactly the same issue and can produce a repeatable case - please see my comment in the above forum reference ( http://www.icefaces.org/JForum/posts/list/13151.page#56078 ). As per my comment, I believe I have narrowed down the problem to the fact that GlassFish does not obey the servlet mapping :- <url-pattern>/xmlhttp/* </url-pattern> for the persistent faces servlet, due to the prescence of the extra space after the URL pattern. My comment post lists the versions used. Basically I downloaded the current latest production versions of Eclipse Galileo, IceFaces and GlassFish together with all the latest plugins during the last couple of days, created a simple ICEFaces (nb "non-facelet 2.3, 2.4 or 2.5 GlassFish" version) dynamic web application in Eclipse, and hit the above error immediately when running the generated example page on GlassFish (works fine on Tomcat 6). This is of particular concern as being a new user, it effectively presented a brick wall to using ICEFaces, as the tutorial samples all work but any generated apps of my own (e.g. a simple test with sortable table headers) failed to display correctly and work properly (see forum comment). I spent significant time diagnosing the issue. Other developers new to ICEFaces and deploying to GlassFish may not be so patient and may end up dumping ICEFaces for something else because of this, which would be a shame as the fix is trivial (delete a single space). It would be very helpful if this could at least be documented and ideally fixed by removing the space in the generated web.xml. I appreciate it is perhaps a grey area - I'm not sure what the spec rules are for url patterns re trailing spaces - in this case, it appears Tomcat 6 strips them and GlassFish does not, so this could either be a GlassFish bug or both a Tomcat and ICEFaces plugin bug. It would also be helpful if there was a way of editing the template data for the plugin so that a correct web.xml is generated each time without needing to edit it - is this possible? I had a look but could not see how to do this.
        Hide
        Liming Wu added a comment -

        Hi Steve,

        Thank you for investigating on this issue.

        I couldn't reproduce it previously but we might use different context. But anyway, it is not right to have a trailing space for /xmlhttp/* even though most servers trim the trailing space except GlassFish.

        This trailing space is introduced in a properties file "com.icesoft.ide.eclipse.icefaces.core.messages.properties", line of "
        ICEfacesFacetModel_SERVLET_PSERVLET_MAPPINGS=.iface,.jspx,/xmlhttp/* "

        For now we may goto plugin "com.icesoft.ide.eclipse.icefaces.core" modify the properties file to remove the trailing space.

        In next ICEfaces release, this properties file will be updated and "white space trimming" logic will be added to ensure there won't be similar issues.

        Thank you again.

        Liming

        Show
        Liming Wu added a comment - Hi Steve, Thank you for investigating on this issue. I couldn't reproduce it previously but we might use different context. But anyway, it is not right to have a trailing space for /xmlhttp/* even though most servers trim the trailing space except GlassFish. This trailing space is introduced in a properties file "com.icesoft.ide.eclipse.icefaces.core.messages.properties", line of " ICEfacesFacetModel_SERVLET_PSERVLET_MAPPINGS= .iface, .jspx,/xmlhttp/* " For now we may goto plugin "com.icesoft.ide.eclipse.icefaces.core" modify the properties file to remove the trailing space. In next ICEfaces release, this properties file will be updated and "white space trimming" logic will be added to ensure there won't be similar issues. Thank you again. Liming
        Hide
        Liming Wu added a comment -

        Reopen this issue as this could be replicated in some basic page instead of the sample I've tried. Also Steve found out trailing space for persistent servlet mapping /xmlhttp/* is the root cause.

        Show
        Liming Wu added a comment - Reopen this issue as this could be replicated in some basic page instead of the sample I've tried. Also Steve found out trailing space for persistent servlet mapping /xmlhttp/* is the root cause.
        Hide
        Liming Wu added a comment -

        Removed trailing spaces in messages.properties as they appeared ICEfacesFacetModel_SERVLET_PSERVLET_MAPPINGS=.iface,.jspx,/xmlhttp/*

        Show
        Liming Wu added a comment - Removed trailing spaces in messages.properties as they appeared ICEfacesFacetModel_SERVLET_PSERVLET_MAPPINGS= .iface, .jspx,/xmlhttp/*

          People

          • Assignee:
            Liming Wu
            Reporter:
            Liming Wu
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: