0

org.zkoss.zk.ui.metainfo.DefinitionNotFoundException: Component definition not found: template in [LanguageDefinition: xul/html], [SYS file:/C:/Users/.../index.zul line 25 col 44]

asked 2014-02-02 21:45:12 +0800

nachoatthecontrols gravatar image nachoatthecontrols
3 2

This is in spanish:

Estado HTTP 500 -


type Informe de Excepción

mensaje

descripción El servidor encontró un error interno () que hizo que no pudiera rellenar este requerimiento.

excepción org.zkoss.zk.ui.metainfo.DefinitionNotFoundException: Component definition not found: template in [LanguageDefinition: xul/html], [SYS file:/C:/Users/.../index.zul line 25 col 44] org.zkoss.zk.ui.metainfo.Parser.parse(Parser.java:777) org.zkoss.zk.ui.metainfo.Parser.parse(Parser.java:601) org.zkoss.zk.ui.metainfo.Parser.parse(Parser.java:872) org.zkoss.zk.ui.metainfo.Parser.parse(Parser.java:601) org.zkoss.zk.ui.metainfo.Parser.parse(Parser.java:872) org.zkoss.zk.ui.metainfo.Parser.parse(Parser.java:601) org.zkoss.zk.ui.metainfo.Parser.parse(Parser.java:872) org.zkoss.zk.ui.metainfo.Parser.parse(Parser.java:601) org.zkoss.zk.ui.metainfo.Parser.parse(Parser.java:872) org.zkoss.zk.ui.metainfo.Parser.parse(Parser.java:209) org.zkoss.zk.ui.metainfo.Parser.parse(Parser.java:100) org.zkoss.zk.ui.metainfo.PageDefinitions$MyLoader.parse(PageDefinitions.java:216) org.zkoss.web.util.resource.ResourceLoader.load(ResourceLoader.java:89) org.zkoss.util.resource.ResourceCache$Info.load(ResourceCache.java:226) org.zkoss.util.resource.ResourceCache$Info.<init>(ResourceCache.java:200) org.zkoss.util.resource.ResourceCache.get(ResourceCache.java:133) org.zkoss.web.util.resource.ResourceCaches.get(ResourceCaches.java:130) org.zkoss.zk.ui.metainfo.PageDefinitions.getPageDefinition(PageDefinitions.java:144) org.zkoss.zk.ui.impl.AbstractUiFactory.getPageDefinition(AbstractUiFactory.java:116) org.zkoss.zk.ui.http.DHtmlLayoutServlet.process(DHtmlLayoutServlet.java:218) org.zkoss.zk.ui.http.DHtmlLayoutServlet.doGet(DHtmlLayoutServlet.java:146) javax.servlet.http.HttpServlet.service(HttpServlet.java:621) javax.servlet.http.HttpServlet.service(HttpServlet.java:722)

nota La traza completa de la causa de este error se encuentra en los archivos de diario de Apache Tomcat/7.0.14.


Apache Tomcat/7.0.14

delete flag offensive retag edit

10 Replies

Sort by » oldest newest

answered 2014-02-02 21:51:20 +0800

chillworld gravatar image chillworld flag of Belgium
5357 4 9
https://github.com/chillw...

updated 2014-02-02 22:02:49 +0800

Can you post index.zul, the fault is there at line 25. (if possible mark line 25)

But actually I can already point you to your fault. You have used

<template name="...">
    ...
</template>

for a component that doesn't support that. What component I can't say cause I can't see your zul.

Greetz chill.

link publish delete flag offensive edit

answered 2014-02-03 16:58:36 +0800

nachoatthecontrols gravatar image nachoatthecontrols
3 2

updated 2014-02-03 17:05:01 +0800

Yes! Part of index.zul:

<?page title="PRUEBA"?>
    <window>
    <div id = "hospedajediv" apply="controller.HospedajeController" > 
                <listbox id="listHospedaje" model="${$composer.hospedajeModel}" apply="controller.HospedajeController"> 
                    <auxhead> 
                        <auxheader label="Hospedajes" colspan="4" />
                    </auxhead> 
                    <listhead>                                             
                        <listheader label="ID" hflex="3" />                        
                        <listheader label="Cliente" hflex="3" />
                        <listheader label="Fecha inicio" hflex="3" />
                        <listheader label="Fecha fin" hflex="3" />
                        <listheader label="Plan" hflex="3" />
                        <listheader label="Estado" hflex="3" />
                        <listheader label="Numero factura" hflex="3" />
                        <listheader label="Fecha factura" hflex="3" />
                        <listheader label="Total factura" hflex="3" />
                    </listhead>
                    <template name="model">   -----> This is de line with error
                        <listitem>
                            <listcell label="${each.id}" />   
                            <listcell label="${each.cliente.nombre}" />
                            <listcell label="${each.finicio}" /> 
                            <listcell label="${each.ffin}" />
                            <listcell label="${each.plan.nombre}" />
                            <listcell label="${each.estado}" /> 
                            <listcell label="${each.numerofac}" /> 
                            <listcell label="${each.fechafac}" /> 
                            <listcell>$<label value="${each.totalfac}" /></listcell>
                        </listitem>  
                      </template>
                </listbox> 
        </div>
    </window>
<window id="winReportes" title="Reporte" border="normal" width="100%" 
apply="reporte.CntrlReporte" height="100%">
Choose a File Type : <listbox id="format" mold="select" >
        <listitem label="HTML" value="html" />
        <listitem label="PDF" value="pdf" selected="true" />
        <listitem label="Word (RTF)" value="rtf" />
        <listitem label="Excel" value="xls" />
        <listitem label="Excel (JXL)" value="jxl" />
        <listitem label="CSV" value="csv" />
        <listitem label="OpenOffice (ODT)" value="odt" unless="false" />
    </listbox>
<button id="btnReportes" label="Get Report"  />
<jasperreport id="report"  />
<iframe id ="frame"></iframe>
</window>
</zk>
link publish delete flag offensive edit

answered 2014-02-03 20:16:12 +0800

chillworld gravatar image chillworld flag of Belgium
5357 4 9
https://github.com/chillw...

What version do you use (please mention also PE/CE/EE)

link publish delete flag offensive edit

answered 2014-02-04 02:38:24 +0800

nachoatthecontrols gravatar image nachoatthecontrols
3 2

updated 2014-02-04 03:02:19 +0800

CE. This version doesn't support it?

link publish delete flag offensive edit

answered 2014-02-04 07:07:23 +0800

chillworld gravatar image chillworld flag of Belgium
5357 4 9
https://github.com/chillw...

from what I can see here it should be supported. the only thing I can see what's strange is that you apply 2 times same controller.(normally you apply the controller in window).

Did you try to remove the auxHead?

As you can see here, an example of listbox with template, I can't see much wrong.

link publish delete flag offensive edit

answered 2014-03-25 03:35:48 +0800

nachoatthecontrols gravatar image nachoatthecontrols
3 2

I still have not solved this problem... any help?

link publish delete flag offensive edit

answered 2014-03-25 07:13:02 +0800

chillworld gravatar image chillworld flag of Belgium
5357 4 9
https://github.com/chillw...

Was this your complete zul? and can you post your getHospedajeModel? What version do you use like 6.5.3 or older? (so I can try to simulate here).

Greetz chill.

link publish delete flag offensive edit

answered 2014-03-25 20:05:40 +0800

nachoatthecontrols gravatar image nachoatthecontrols
3 2

Use the version 6.5.2, but now I'm using version 7.0. The project is a simple test, nothing unusual.

getHospedajeModel: (HospedajeController.java)

package controller;
import entidad.Hospedaje;
import exception.DAOException;
import org.zkoss.zk.ui.util.GenericForwardComposer;
import org.zkoss.zul.ListModelList;
import service.HospedajeService;
public class HospedajeController extends GenericForwardComposer {
     private Hospedaje _currentHospedaje; 
     private ListModelList hospedajeModel;
     public Hospedaje getCurrentHospedaje () { 
            return _currentHospedaje; 
     } 
     public void setCurrentHospedaje (Hospedaje currentHospedaje) { 
            this._currentHospedaje = currentHospedaje; 
     } 

     public ListModelList getHospedajeModel () throws DAOException { 
            hospedajeModel = new ListModelList(HospedajeService.listarReserva(),true);
            return hospedajeModel; 
     }    
}

Complete index.zul:

<zk>
  <window border="normal" title="hello" apply="org.zkoss.bind.BindComposer" viewModel="@id('vm') @init('fiddle.testvm')">
    <listbox id="box" checkmark="true" model="@bind(vm.model)" selectedItem="@bind(vm.selected)">
                    <listhead>
                        <listheader label="ID" hflex="3" />
                        <listheader label="Cliente" hflex="3" />
                        <listheader label="Fecha inicio" hflex="3" />
                        <listheader label="Fecha fin" hflex="3" />
                        <listheader label="Plan" hflex="3" />
                        <listheader label="Estado" hflex="3" />
                        <listheader label="Numero factura" hflex="3" />
                        <listheader label="Fecha factura" hflex="3" />
                        <listheader label="Total factura" hflex="3" />
                    </listhead>
                    <template name="model">
                        <listitem>
                            <listcell label="${each.id}" />
                            <listcell label="${each.cliente.nombre}" />
                            <listcell label="${each.finicio}" /> 
                            <listcell label="${each.ffin}" />
                            <listcell label="${each.plan.nombre}" />
                            <listcell label="${each.estado}" /> 
                            <listcell label="${each.numerofac}" /> 
                            <listcell label="${each.fechafac}" /> 
                            <listcell>$<label value="${each.totalfac}" /></listcell>
                        </listitem>
                    </template>
                </listbox>
    </window>
    <window>
    <div id = "clientediv" apply="controller.ClienteController" >
                <listbox id="listCliente" model="${$composer.clienteModel}" apply="controller.ClienteController">
                    <auxhead>
                        <auxheader label="Clientes" colspan="4" />
                    </auxhead>
                    <listhead>
                        <listheader label="Nombre" hflex="3" />
                        <listheader label="DNI" hflex="3" />
                        <listheader label="ID" hflex="3" />
                        <listheader label="Fecha nacimiento" hflex="3" />
                    </listhead>
                    <template name="model">
                        <listitem>
                            <listcell label="${each.nombre}" />
                            <listcell label="${each.dni}" />
                            <listcell label="${each.id}" />
                            <listcell label="${each.fechanacimiento}" />
                        </listitem>
                    </template>
                </listbox>
        </div>
    </window>
    <window title="Prueba">
        <grid width="100%">
            <rows>
                  <row>Texto: <textbox id="source1">
                                <attribute name="onChange">
                                    copy.value = source1.value
                                </attribute>
                              </textbox>
                  </row>
                  <row>Fecha: <datebox id="source2">
                                <attribute name="onChange">
                                    copy.value = source2.value.toString();
                                </attribute>
                              </datebox>
                  </row>
                  <row>Salida (ultimo cambio): <textbox id="copy" readonly="true"/>
                  </row>
            </rows>
        </grid>
    </window>
<window id="winReportes" title="Hola mundo" border="normal" width="100%" apply="reporte.CntrlReporte" height="100%">
Choose a File Type : <listbox id="format" mold="select" >
        <listitem label="HTML" value="html" />
        <listitem label="PDF" value="pdf" selected="true" />
        <listitem label="Word (RTF)" value="rtf" />
        <listitem label="Excel" value="xls" />
        <listitem label="Excel (JXL)" value="jxl" />
        <listitem label="CSV" value="csv" />
        <listitem label="OpenOffice (ODT)" value="odt" unless="false" />
    </listbox>
<label value="You are using: ${desktop.webApp.version}"/>
<button id="btnReportes" label="Get Report"  />
<jasperreport id="report"  />
<iframe id ="frame"></iframe>
</window>
</zk>
link publish delete flag offensive edit

answered 2014-03-25 20:19:20 +0800

nachoatthecontrols gravatar image nachoatthecontrols
3 2

Estado HTTP 500 - Component definition not found: template in [LanguageDefinition: xul/html], [SYS file:/C:/Users/.../build/web/index.zul line 15 col 44]

type Informe de Excepción

mensaje Component definition not found: template in [LanguageDefinition: xul/html], [SYS file:/C:/Users/Nacho/Documents/NetBeansProjects/Zk---Jasper-Example-master2222/build/web/index.zul line 15 col 44]

descripción El servidor encontró un error interno que hizo que no pudiera rellenar este requerimiento.

excepción org.zkoss.zk.ui.metainfo.DefinitionNotFoundException: Component definition not found: template in [LanguageDefinition: xul/html], [SYS file:/C:/Users/Nacho/Documents/NetBeansProjects/Zk---Jasper-Example-master2222/build/web/index.zul line 15 col 44] org.zkoss.zk.ui.metainfo.Parser.parse(Parser.java:777) org.zkoss.zk.ui.metainfo.Parser.parse(Parser.java:601) org.zkoss.zk.ui.metainfo.Parser.parse(Parser.java:872) org.zkoss.zk.ui.metainfo.Parser.parse(Parser.java:601) org.zkoss.zk.ui.metainfo.Parser.parse(Parser.java:872) org.zkoss.zk.ui.metainfo.Parser.parse(Parser.java:601) org.zkoss.zk.ui.metainfo.Parser.parse(Parser.java:872) org.zkoss.zk.ui.metainfo.Parser.parse(Parser.java:209) org.zkoss.zk.ui.metainfo.Parser.parse(Parser.java:100) org.zkoss.zk.ui.metainfo.PageDefinitions$MyLoader.parse(PageDefinitions.java:216) org.zkoss.web.util.resource.ResourceLoader.load(ResourceLoader.java:89) org.zkoss.util.resource.ResourceCache$Info.load(ResourceCache.java:226) org.zkoss.util.resource.ResourceCache$Info.<init>(ResourceCache.java:200) org.zkoss.util.resource.ResourceCache.get(ResourceCache.java:133) org.zkoss.web.util.resource.ResourceCaches.get(ResourceCaches.java:130) org.zkoss.zk.ui.metainfo.PageDefinitions.getPageDefinition(PageDefinitions.java:144) org.zkoss.zk.ui.impl.AbstractUiFactory.getPageDefinition(AbstractUiFactory.java:116) org.zkoss.zk.ui.http.DHtmlLayoutServlet.process(DHtmlLayoutServlet.java:218) org.zkoss.zk.ui.http.DHtmlLayoutServlet.doGet(DHtmlLayoutServlet.java:146) javax.servlet.http.HttpServlet.service(HttpServlet.java:621) javax.servlet.http.HttpServlet.service(HttpServlet.java:728) org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)

nota La traza completa de la causa de este error se encuentra en los archivos de diario de Apache Tomcat/7.0.34.

link publish delete flag offensive edit

answered 2014-03-26 06:44:02 +0800

chillworld gravatar image chillworld flag of Belgium
5357 4 9
https://github.com/chillw...

updated 2014-03-26 06:44:33 +0800

stupid test : does this turn on your netbeans?

<zk>
    <window border="normal" title="hello" apply="org.zkoss.bind.BindComposer">
        <listbox id="box" checkmark="true">
          <listhead>
            <listheader label="ID" hflex="3" />
            </listhead>
            <template name="model">
              <listitem>
                <listcell label="aa" />
              </listitem>
            </template>
        </listbox>
    </window>
</zk>

This turns on fiddle so if this doesn't work, I should check the REM plugin and maybe your dependencies.

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2014-02-02 21:45:12 +0800

Seen: 209 times

Last updated: Mar 26 '14

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More