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

Richlet problem with Apache Tomcat 7

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Invalid
    • Affects Version/s: 6.0.2
    • Fix Version/s: None
    • Component/s: ZK Loader
    • Labels:
    • Environment:

      Apache Tomcat 7.029 , ZK 6.02 Windows XP Eclipse Indigo

      Description

      When invoke a richlet it fail to init.

      Stack trace

      Servlet.service() para servlet zkLoader

      java.lang.NullPointerException
      org.zkoss.zk.ui.impl.PageImpl.<init>(PageImpl.java:217)
      org.zkoss.zk.ui.impl.AbstractUiFactory.newPage(AbstractUiFactory.java:88)
      org.zkoss.zk.ui.http.WebManager.newPage(WebManager.java:535)
      org.zkoss.zk.ui.http.DHtmlLayoutServlet.process(DHtmlLayoutServlet.java:201)
      org.zkoss.zk.ui.http.DHtmlLayoutServlet.doGet(DHtmlLayoutServlet.java:134)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
      at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
      at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1001)
      at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
      at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)

      Web.xml (zk template default)

      zk.xml

      <richlet>
      <richlet-name>pp</richlet-name>
      <richlet-class>richlet.Test</richlet-class>
      </richlet>
      <richlet-mapping>
      <richlet-name>pp</richlet-name>
      <url-pattern>/prueba</url-pattern>
      </richlet-mapping>

      Richlet code

      package richlet;
      import org.zkoss.zk.ui.GenericRichlet;
      import org.zkoss.zk.ui.Page;
      import org.zkoss.zk.ui.RichletConfig;
      import org.zkoss.zk.ui.metainfo.LanguageDefinition;
      import org.zkoss.zul.Window;

      public class Test extends GenericRichlet {

      public void init(RichletConfig config)

      { super.init(config); }

      ;

      @Override
      public void destroy()

      { // TODO Auto-generated method stub }

      @Override
      public void service(Page page) throws Exception

      { Window d=new Window(); d.setTitle("test"); d.setPage(page); System.out.println(""); }

      @Override
      public LanguageDefinition getLanguageDefinition()

      { // TODO Auto-generated method stub return null; }

      }

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            ldn ldn
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: