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

"Replicated UUID is not allowed" exception when error page uses the same template as the one which failed to compose

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • 5.0.12, 6.5.2
    • General

      The issue:

      • An index page uses Composition (org.zkoss.zk.ui.util.Composition) and defines content to fill a common template for page layout (<?init class="org.zkoss.zk.ui.util.Composition" arg0="~./template/public-page-template.zul"?>)
      • A Div element with ID "headerDiv" is defined in page template (<div id="header" style="background-color:grey; width: 100%; height: 100px" />)
      • A custom error page (error.zul, defined in web.xml <error-page> elements) uses the same common page template to show an error message when exception occurs while loading ZUML document.
      • When Exception is thrown while composing an index page, composing the error page fails with the following exception:

      SEVERE: Exception Processing ErrorPage[exceptionType=java.lang.Throwable, location=/error.zul]
      org.zkoss.zk.ui.UiException: Replicated UUID is not allowed for class org.zkoss.zhtml.Div: header
      at org.zkoss.zk.ui.AbstractComponent.setId(AbstractComponent.java:513)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.zkoss.zk.ui.metainfo.Property.assign0(Property.java:284)
      at org.zkoss.zk.ui.metainfo.Property.assign(Property.java:169)
      at org.zkoss.zk.ui.metainfo.ComponentInfo.applyProperties(ComponentInfo.java:729)
      at org.zkoss.zk.ui.impl.AbstractUiFactory.newComponent(AbstractUiFactory.java:106)
      at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild0(UiEngineImpl.java:809)
      at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild(UiEngineImpl.java:778)
      at org.zkoss.zk.ui.impl.UiEngineImpl.execCreate0(UiEngineImpl.java:687)
      at org.zkoss.zk.ui.impl.UiEngineImpl.execCreate(UiEngineImpl.java:651)
      at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild0(UiEngineImpl.java:824)
      at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild(UiEngineImpl.java:778)
      at org.zkoss.zk.ui.impl.UiEngineImpl.execCreate0(UiEngineImpl.java:687)
      at org.zkoss.zk.ui.impl.UiEngineImpl.execCreate(UiEngineImpl.java:651)
      at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild0(UiEngineImpl.java:824)
      at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild(UiEngineImpl.java:778)
      at org.zkoss.zk.ui.impl.UiEngineImpl.execCreate0(UiEngineImpl.java:687)
      at org.zkoss.zk.ui.impl.UiEngineImpl.execCreate(UiEngineImpl.java:651)
      at org.zkoss.zk.ui.impl.UiEngineImpl.createComponents(UiEngineImpl.java:1032)
      at org.zkoss.zk.ui.impl.AbstractExecution.createComponents0(AbstractExecution.java:246)
      at org.zkoss.zk.ui.impl.AbstractExecution.createComponents(AbstractExecution.java:238)
      at org.zkoss.zk.ui.util.Composition.doInit(Composition.java:92)
      at org.zkoss.zk.ui.metainfo.InitiatorInfo.doInit(InitiatorInfo.java:148)
      at org.zkoss.zk.ui.metainfo.InitiatorInfo.newInitiator(InitiatorInfo.java:143)
      at org.zkoss.zk.ui.metainfo.PageDefinition.doInit(PageDefinition.java:396)
      at org.zkoss.zk.ui.impl.Initiators.doInit(Initiators.java:58)
      at org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage0(UiEngineImpl.java:382)
      at org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage(UiEngineImpl.java:316)
      at org.zkoss.zk.ui.http.DHtmlLayoutServlet.process(DHtmlLayoutServlet.java:215)
      at org.zkoss.zk.ui.http.DHtmlLayoutServlet.doGet(DHtmlLayoutServlet.java:136)
      ...

      See attached sample project to reproduce the issue:
      GET http://localhost:9090/webapp/404 Will result in 404 error and compose the error page correctly
      GET http://localhost:9090/webapp/index.zul Will result in the reported exception (Replicated UUID is not allowed)

            Unassigned Unassigned
            gediminas gediminas
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: