Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: 2.0.4
    • Fix Version/s: 2.1.15, 2.2.0-m06
    • Component/s: None
    • Labels:
      None
    • Status Whiteboard:
      Hide

      size_small importance_large

      Show
      size_small importance_large

      Description

      Google App Engine restricts access to InitialContext while Mojarra uses it for initialization.
      Here is the proposed change for WebConfiguration#canProcessJndiEntries:

      private boolean canProcessJndiEntries() {

      try

      { Util.getCurrentLoader(this).loadClass("javax.naming.InitialContext").getConstructors(); }

      catch (Throwable e) {
      if (LOGGER.isLoggable(Level.FINE))

      { LOGGER.fine( "javax.naming is unavailable. JNDI entries related to Mojarra configuration will not be processed."); }

      return false;
      }
      return true;

      }

      1. changebundle.txt
        2 kB
        Hanspeter Duennenberger

        Activity

        Hide
        Hanspeter Duennenberger added a comment -

        Catching NoClassDefFoundException in WebConfiguration.processJndiEntries() does work. The updated changebundle contains this change. No need for an additional context-param.
        I could successfully run GAE based JSF app locally. Unfortunately I cannot deploy to GAE from work (some proxy issue), but I'll try from home later on.

        Again, I think this should be added to trunk, 2.1- and 2.0 branch.

        Cheers
        Hanspeter

        Show
        Hanspeter Duennenberger added a comment - Catching NoClassDefFoundException in WebConfiguration.processJndiEntries() does work. The updated changebundle contains this change. No need for an additional context-param. I could successfully run GAE based JSF app locally. Unfortunately I cannot deploy to GAE from work (some proxy issue), but I'll try from home later on. Again, I think this should be added to trunk, 2.1- and 2.0 branch. Cheers Hanspeter
        Hide
        Manfred Riem added a comment -

        r=mriem

        Show
        Manfred Riem added a comment - r=mriem
        Hide
        Hanspeter Duennenberger added a comment -

        Added to trunk (2.2)

        Fixes http://java.net/jira/browse/JAVASERVERFACES-1885, r=mriem

        • catch NoClassDefFoundError thrown by GAE while trying to instantiate InitialContext

        M C:/cs/ws/mojarra_trunk/Mojarra/jsf-ri/src/main/java/com/sun/faces/config/WebConfiguration.java
        Committed revision 9926

        Show
        Hanspeter Duennenberger added a comment - Added to trunk (2.2) Fixes http://java.net/jira/browse/JAVASERVERFACES-1885 , r=mriem catch NoClassDefFoundError thrown by GAE while trying to instantiate InitialContext M C:/cs/ws/mojarra_trunk/Mojarra/jsf-ri/src/main/java/com/sun/faces/config/WebConfiguration.java Committed revision 9926
        Hide
        Manfred Riem added a comment -

        Can you also add the fix to the 2.1 branch?

        Show
        Manfred Riem added a comment - Can you also add the fix to the 2.1 branch?
        Hide
        Manfred Riem added a comment -

        Applied to 2.1 branch,

        commit -m "Fixes http://java.net/jira/browse/JAVASERVERFACES-1885, Backported to 2.1"
        Sending jsf-ri/src/main/java/com/sun/faces/config/WebConfiguration.java
        Transmitting file data ...
        Committed revision 10918.

        Show
        Manfred Riem added a comment - Applied to 2.1 branch, commit -m "Fixes http://java.net/jira/browse/JAVASERVERFACES-1885 , Backported to 2.1" Sending jsf-ri/src/main/java/com/sun/faces/config/WebConfiguration.java Transmitting file data ... Committed revision 10918.

          People

          • Assignee:
            Unassigned
            Reporter:
            nick_belaevski
          • Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 2 days
              2d
              Remaining:
              Remaining Estimate - 2 days
              2d
              Logged:
              Time Spent - Not Specified
              Not Specified