UiEngineImpl Exception causing server crash

Help
Matt
2012-12-14
2013-03-08
  • Matt

    Matt - 2012-12-14

    I am getting the following error trace in my log:

    2012-10-10 12:04:37,267 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/webui].[auEngine]] Servlet.service() for servlet auEngine threw exceptio
    n
    java.lang.IllegalStateException: Use doReactivate instead
            at org.zkoss.zk.ui.impl.UiEngineImpl.doActivate(UiEngineImpl.java:1515)
            at org.zkoss.zk.ui.impl.UiEngineImpl.execUpdate(UiEngineImpl.java:971)
            at org.zkoss.zk.au.http.DHtmlUpdateServlet.process(DHtmlUpdateServlet.java:500)
            at org.zkoss.zk.au.http.DHtmlUpdateServlet.doGet(DHtmlUpdateServlet.java:385)
            at org.zkoss.zk.au.http.DHtmlUpdateServlet.doPost(DHtmlUpdateServlet.java:394)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
            at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
            at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
            at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
            at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
            at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
            at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
            at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
            at java.lang.Thread.run(Thread.java:679)
    

    I am not sure if this is the cause or a by-product, but either way my server CPU usage is maxing out, fairly certain because of the HeapSpace exceptions I am getting.

    I think I could try and fix this problem, but the code in question is a linked JAR file. Is there any way that I can get access to that source code, modify it and re-JAR or something? I know I could try reverse engineering it, modifying it and compiling again, but is there anyway to access the actual source code (from some repository maybe)?

     
  • Matt

    Matt - 2012-12-15

    I realised that where the JAR files are located there are other JAR files which actually contain the source code. So the source code and the class files are in separate files.

    If you want to alter the source code you have to:
    1) Extract the source JAR.
    2) Alter the code (with a text editor).
    3) Re-jar the source (use zip and then rename to JAR).
    4) Replace the old JAR.
    5) Eclipse will overwrite the old class JAR when it builds the new source JAR.

    So the JAR I needed to modify in this case was zk-sources.jar

    I changed line 971 of UiEngineImpl.java to:

    final UiVisualizer uv = null;
          if (Executions.getCurrent() == null) {
              uv = doActivate(exec, true, false);
          } else {
             final ExecutionCtrl oldExecCtrl = (ExecutionCtrl)exec;
             final UiVisualizer olduv = (UiVisualizer)oldexecCtrl.getVisualizer();
             uv = doReactivate(exec, olduv);
          }
    

    Seems to be running fine, just hope it fixes the exception that was occurring (which it should).

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks