org.zkoss.zk.ui.UiException: class org.zkoss.zul.SimpleTreeModel must implement interface org.zkoss.zul.ext.TreeSelectionModel

ZK-Tracker | RyanWu | 5 years ago
  1. 0

    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)

    ZK-Tracker | 4 years ago | gediminas
    org.zkoss.zk.ui.UiException: Replicated UUID is not allowed for class org.zkoss.zhtml.Div: header
  2. Speed up your debug routine!

    Automated exception search integrated into your IDE

  3. 0

    MVVM + Executions.createComponents = org.zkoss.zk.ui.UiException

    Google Groups | 3 years ago | Sergio Michels
    org.zkoss.zk.ui.UiException: can't find Page to resolve a view model class > :'package.MyViewModel' at [null, line:11, nearby column: 77]
  4. 0

    Servlet.service() servlet zkLoader threw excp

    adempiere | 7 years ago | waliahimanshu
    org.zkoss.zk.ui.UiException: The new page must be in the same desktop:

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. org.zkoss.zk.ui.UiException

      class org.zkoss.zul.SimpleTreeModel must implement interface org.zkoss.zul.ext.TreeSelectionModel

      at org.zkoss.zul.Tree.setModel()
    2. ZK XUL Components
      Tree.setModel
      1. org.zkoss.zul.Tree.setModel(Tree.java:1446)
      1 frame
    3. org.zkforge.ckez
      FilebrowserController.doAfterCompose
      1. org.zkforge.ckez.FilebrowserController.doAfterCompose(FilebrowserController.java:74)
      1 frame