phobos
  1. phobos
  2. PHOBOS-36

JSF-Calculator sample silently failed when jsf-facelets.jar was not present

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: current
    • Fix Version/s: milestone 1
    • Component/s: framework
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      36

      Description

      I have discussed this issue with Ed and am filing this bug to track the issue.
      When creating the jsf-calculator.war I had failed to include the
      jsf-facelets.jar file. When I deployed the war file to glassfish the application
      successfully deployed.
      But when trying to run the application I just got a 404 error stating resource
      not found. Tried to turn on jsf logging but I did not get any additional message
      pointing to the cause of the problem.
      There should be some error message to indicate what was the resource that could
      not be found. This would help in isolating the problem easily.

        Activity

        Hide
        qouyang added a comment -

        Since this is a nice-to-have, error handling problem, I am changing the issue
        from defect to enhancement.

        Show
        qouyang added a comment - Since this is a nice-to-have, error handling problem, I am changing the issue from defect to enhancement.
        Hide
        pramodgo added a comment -

        Changing the issue type to be "Defect" and this is my reasoning:
        Somewhere in some component there is an exception that is being gobbled up and
        hence there was no exception being thrown in the log file. I spent about 1/2 a
        day (when doing the web pack sample integration work last week) trying to figure
        out what is the cause of the issue. Finally figured this out only after Ed got
        involved in it. If this issue is reported by QA or customer it would be a very
        difficult one to solve. Hence I think that this is not a nice to have feature
        but a defect.

        Show
        pramodgo added a comment - Changing the issue type to be "Defect" and this is my reasoning: Somewhere in some component there is an exception that is being gobbled up and hence there was no exception being thrown in the log file. I spent about 1/2 a day (when doing the web pack sample integration work last week) trying to figure out what is the cause of the issue. Finally figured this out only after Ed got involved in it. If this issue is reported by QA or customer it would be a very difficult one to solve. Hence I think that this is not a nice to have feature but a defect.
        Hide
        qouyang added a comment -

        I am closing this issue as this needs to be fixed in the jsf-extension area.
        Note that there is a similar bug filed in jsf-extension issue tracker:
        https://jsf-extensions.dev.java.net/issues/show_bug.cgi?id=22

        I am going to add issues@phobos.dev.java.net to the interest list of the
        jsf-extension bug so that we can monitor its progress.

        Show
        qouyang added a comment - I am closing this issue as this needs to be fixed in the jsf-extension area. Note that there is a similar bug filed in jsf-extension issue tracker: https://jsf-extensions.dev.java.net/issues/show_bug.cgi?id=22 I am going to add issues@phobos.dev.java.net to the interest list of the jsf-extension bug so that we can monitor its progress.
        Hide
        Ed Burns added a comment -

        This error is show in the log when I remove jsf-facelets:

        Caused by: java.lang.NoClassDefFoundError: com/sun/facelets/FaceletViewHandler
        at com.sun.phobos.container.webapp.PhobosViewHandler.<init>(PhobosViewHandler.java:75)
        ... 79 more

        Show
        Ed Burns added a comment - This error is show in the log when I remove jsf-facelets: Caused by: java.lang.NoClassDefFoundError: com/sun/facelets/FaceletViewHandler at com.sun.phobos.container.webapp.PhobosViewHandler.<init>(PhobosViewHandler.java:75) ... 79 more
        Hide
        Ed Burns added a comment -

        I have included a log message:

        — PhobosViewHandler.java 7 Nov 2006 20:21:54 -0000 1.2
        +++ PhobosViewHandler.java 24 Jan 2007 16:02:03 -0000
        @@ -72,6 +72,15 @@
        /** Creates a new instance of PhobosViewHandler */
        public PhobosViewHandler(ViewHandler orig) {
        this.orig = orig;
        + if (logger.isLoggable(Level.INFO)) {
        + try

        { + Class faceletClass = Class.forName("com.sun.facelets.FaceletViewHandler"); + }

        catch (ClassNotFoundException ex)

        { + logger.info("Web Application is incorrectly configured. " + + "Facelets is required. Please ensure Facelets available " + + "on the application classpath."); + }

        + }
        faceletViewHandler = new FaceletViewHandler(orig);
        }

        Show
        Ed Burns added a comment - I have included a log message: — PhobosViewHandler.java 7 Nov 2006 20:21:54 -0000 1.2 +++ PhobosViewHandler.java 24 Jan 2007 16:02:03 -0000 @@ -72,6 +72,15 @@ /** Creates a new instance of PhobosViewHandler */ public PhobosViewHandler(ViewHandler orig) { this.orig = orig; + if (logger.isLoggable(Level.INFO)) { + try { + Class faceletClass = Class.forName("com.sun.facelets.FaceletViewHandler"); + } catch (ClassNotFoundException ex) { + logger.info("Web Application is incorrectly configured. " + + "Facelets is required. Please ensure Facelets available " + + "on the application classpath."); + } + } faceletViewHandler = new FaceletViewHandler(orig); }

          People

          • Assignee:
            Ed Burns
            Reporter:
            pramodgo
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: