Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-841

SessionInit cause a stack overflow

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 5.0.11
    • 5.0.9
    • None
    • None
    • Ubuntu Linux, Tomcat 7.0.21

      The SessionInit cause a stack overflow using this code:

      public class SessionManager implements org.zkoss.zk.ui.util.SessionInit {

      public void init(Session arg0, Object arg1) throws Exception {

      String serverName = arg0.getServerName();
      Skin defaultSkin = null;
      Skin currentSkin = null;
      for (int i = 0; i < SkinManager.getSkins().size(); i++)

      { Skin skin = SkinManager.getSkins().get(i); if (skin.isDefaultValue()) defaultSkin = skin; if (serverName.contains(skin.getURL())) currentSkin = skin; }

      if (currentSkin == null)
      currentSkin = defaultSkin;
      if (currentSkin!=null)
      arg0.setAttribute("SKIN", currentSkin);

      String SQL = "SELECT TO_CHAR(sysdate,'YY') || TO_CHAR(next_day(TRUNC(sysdate)-7, TO_CHAR(to_date('27-09-2011','DD-MM-YYYY'), 'Dy')) ,'IW') AUX FROM dual";
      DAO service = new DAO();
      List<Map<String, String>> rs = service.getListData(SQL);
      arg0.setAttribute("palinsesto", ((Map<String, String>) rs.get(0)).get("AUX").toString());
      }

      You can find the stack trace here:
      http://www.zkoss.org/forum/listComment/18598-Session-stack-overflow

            jumperchen jumperchen
            afxgroup afxgroup
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: