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

NullPointerException - Failed to invoke class org.zkoss.zkplus.util.ThreadLocalListener

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Blocker Blocker
    • None
    • 7.0.6.1
    • General
    • None
    • Tomcat 7, Zk 7.0.6.1, Java 7, Spring Security

      Recently a couple of our production servers became slow and on inspecting the logs, found a lot of - Failed to invoke class org.zkoss.zkplus.util.ThreadLocalListener
      java.lang.NullPointerException.
      The error seems to have filled up over 50 rotations of the log file and the only option we are left with is the restart the servers.
      the zk.xml has an entry for ThreadLocalListener which looks like this:

      <listener>
      <description>ThreadLocal Synchronization Listener</description>
      <listener-class>org.zkoss.zkplus.util.ThreadLocalListener</listener-class>
      </listener>
      <preference>
      <name>ThreadLocal</name>
      <value>
      org.springframework.security.context.ThreadLocalSecurityContextHolderStrategy=contextHolder
      </value>
      </preference>

      The session timeout configuration is as below
      <session-config>
      <session-timeout>600</session-timeout>
      <timeout-uri>/login.zul</timeout-uri>
      <timer-keep-alive>true</timer-keep-alive>
      <max-requests-per-session>20</max-requests-per-session>
      <automatic-timeout/>
      </session-config>

      Also this issue is very hard to reproduce but is occurring very frequently on a lot of production machines.
      I believe this was fixed in some earlier version of ZK, but it seems to have found its way back into the system.

            Unassigned Unassigned
            puneetakhouri puneetakhouri
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: