0 Replies Latest reply: Mar 25, 2008 7:42 AM by 807574 RSS

    Getting DesktopError, SSOException when session times out

    807574
      Getting SSOException when user session times out in Sun Portal code after installing patch 118950-34. Looking at the stack trace, there appears to be a new Error being thrown, DesktopError, from the class com.sun.portal.desktop.context.DSAMESessionAppContext.getSSOToken (lives in desktop.jar). I decompiled the class in the previous desktop.jar and the patched desktop.jar, and saw that indeed some new code was throwing this unchecked exception. Can't believe that everyone running this patch and Portal 7 or above isn't erring the same way. What could I be missing?


      Code pre-patch:

      protected SSOToken getSSOToken(HttpServletRequest req) {
      /* 64*/ SSOToken token = (SSOToken)ROC.getObject("ssoToken");
      /* 65*/ if(token == null)
      /* 67*/ try {
      /* 67*/ token = DSAMEConnection.getSSOTokenManager().createSSOToken(req);
      /* 72*/ ROC.setObject("ssoToken", token);
      }
      /* 75*/ catch(SSOException se) {
      /* 75*/ return null;
      }
      /* 79*/ return token;
      }


      Code Post Patch:
      protected SSOToken getSSOToken(HttpServletRequest req) {
      /* 67*/ SSOToken token = (SSOToken)ROC.getObject("ssoToken");
      /* 68*/ if(token == null)
      /* 70*/ try {
      /* 70*/ token = DSAMEConnection.getSSOTokenManager().createSSOToken(req);
      /* 75*/ ROC.setObject("ssoToken", token);
      }
      /* 76*/ catch(SSOException se) {
      /* 77*/ if(se.getMessage().equals("Invalid session ID.") || se.getMessage().indexOf("Invalid session ID.") != -1 || se.getMessage().startsWith("Service URL not found:session"))
      /* 81*/ return null;
      /* 85*/ if(se.getMessage().startsWith("Session timed out."))
      /* 86*/ throw new DesktopError(se, "sessionTimedOut");
      /* 89*/ else
      /* 89*/ throw new DesktopError(se, "session");
      }
      /* 93*/ return token;
      }