0

404 zkLoader not found!!

asked 2009-02-10 06:40:04 +0800

sandeepkharat1 gravatar image sandeepkharat1
36 2

hi,
what is zkLoder i hv read it from the devguide. i m trying to run zk-src code in eclipse it will give me
error : zkLoder not found what is this error 404 error
is there any .jar required to this and my web.xml also correct .

plz help me.
thanks in advance.
sandeep

delete flag offensive retag edit

9 Replies

Sort by ยป oldest newest

answered 2009-02-11 00:58:49 +0800

iantsai gravatar image iantsai
2755 1

Please download zkdemo and take look at web.xml inside zkdemo.war

You need to declare two of Servlets witch zk need to use.

link publish delete flag offensive edit

answered 2009-02-18 06:21:54 +0800

vijays gravatar image vijays
72 1

plz give me little more explanation

thanks

link publish delete flag offensive edit

answered 2009-02-18 07:11:04 +0800

iantsai gravatar image iantsai
2755 1

Take a look at your web.xml, you should have setting like this:


	<servlet>
		<description>ZK loader for ZUML pages</description>
		<servlet-name>zkLoader</servlet-name>
		<servlet-class>org.zkoss.zk.ui.http.DHtmlLayoutServlet</servlet-class>
		<init-param>
			<param-name>update-uri</param-name>
			<param-value>/zkau</param-value>
		</init-param>
		<load-on-startup>1</load-on-startup>
	</servlet>
	<servlet>
		<description>The asynchronous update engine for ZK</description>
		<servlet-name>auEngine</servlet-name>
		<servlet-class>org.zkoss.zk.au.http.DHtmlUpdateServlet</servlet-class>
	</servlet>

link publish delete flag offensive edit

answered 2009-02-18 11:47:01 +0800

vijays gravatar image vijays
72 1

hey my web.xml exactly like this but i got error ZkLoder not found : error 500
i will put my console below plz see this you got the idea abt my error

please help me...
thanks iantsai :)

INFO: validateJarFile(/home/kailas/zk/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/zkdemo/WEB-INF/lib/servlet.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
18 Feb, 2009 4:53:24 PM org.apache.catalina.core.ApplicationContext log
SEVERE: StandardWrapper.Throwable
org.zkoss.zk.device.DeviceNotFoundException: xml not found.
at org.zkoss.zk.ui.metainfo.LanguageDefinition.<init>(LanguageDefinition.java:315)
at org.zkoss.zk.ui.metainfo.DefinitionLoaders.parseLang(DefinitionLoaders.java:255)
at org.zkoss.zk.ui.metainfo.DefinitionLoaders.load0(DefinitionLoaders.java:148)
at org.zkoss.zk.ui.metainfo.DefinitionLoaders.load(DefinitionLoaders.java:123)
at org.zkoss.zk.ui.metainfo.LanguageDefinition.init(LanguageDefinition.java:264)
at org.zkoss.zk.ui.metainfo.LanguageDefinition.getAll(LanguageDefinition.java:244)
at org.zkoss.zk.ui.http.WebManager.<init>(WebManager.java:148)
at org.zkoss.zk.ui.http.DHtmlLayoutServlet.init(DHtmlLayoutServlet.java:146)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1139)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:966)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3956)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4230)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:448)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
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.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
18 Feb, 2009 4:53:24 PM org.apache.catalina.core.StandardContext loadOnStartup
SEVERE: Servlet /zkdemo threw load() exception
org.zkoss.zk.device.DeviceNotFoundException: xml not found.
at org.zkoss.zk.ui.metainfo.LanguageDefinition.<init>(LanguageDefinition.java:315)
at org.zkoss.zk.ui.metainfo.DefinitionLoaders.parseLang(DefinitionLoaders.java:255)
at org.zkoss.zk.ui.metainfo.DefinitionLoaders.load0(DefinitionLoaders.java:148)
at org.zkoss.zk.ui.metainfo.DefinitionLoaders.load(DefinitionLoaders.java:123)
at org.zkoss.zk.ui.metainfo.LanguageDefinition.init(LanguageDefinition.java:264)
at org.zkoss.zk.ui.metainfo.LanguageDefinition.getAll(LanguageDefinition.java:244)
at org.zkoss.zk.ui.http.WebManager.<init>(WebManager.java:148)
at org.zkoss.zk.ui.http.DHtmlLayoutServlet.init(DHtmlLayoutServlet.java:146)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1139)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:966)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3956)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4230)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:448)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
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.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
18 Feb, 2009 4:53:24 PM org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8081

link publish delete flag offensive edit

answered 2009-02-18 12:19:03 +0800

sandeepkharat1 gravatar image sandeepkharat1
36 2

hi, i am running zkdemo. but with all it's necessary source project. i.e. zcommon,zweb,...etc.while running zkdemo on tomcat server i got this exception " javax.servlet.ServletException: Only one layout servlet is allowed in one context: org.apache.catalina.core.ApplicationContextFacade@1e6e305
org.zkoss.zk.ui.http.DHtmlLayoutServlet.init(DHtmlLayoutServlet.java:118)".
pls help me.

link publish delete flag offensive edit

answered 2009-02-19 01:58:38 +0800

iantsai gravatar image iantsai
2755 1

updated 2009-02-19 02:02:47 +0800

to vijays

Can you provide a list of file name of the jars that you use in WEB-INF/lib?
And also please provide the web.xml you used.
In order to make your first case to start ZK easier, I'll suggest you use ZK Studio to quick start a new project(You need to have some knowledge of how to developing JavaEE Web Application under Eclipse), or you can unpack the zkdemo zip archive and drop it into Tomcat directly.

For how to use ZK Studio, please follow this link:
ZK Studio Download

For how to download ZK Demo, please follow this link:
ZK Demo Download


to sandeepkharat1

Please clear all your Jars inside both share lib in Tomcat and WEB-INF/lib in project, then copy a new set of Jars from ZK downloaded package again.
Your problem is ClassLoader loaded different version of ZK Jars in class hierarchy.

link publish delete flag offensive edit

answered 2009-02-19 07:43:06 +0800

sandeepkharat1 gravatar image sandeepkharat1
36 2

updated 2009-02-19 07:43:54 +0800

hi look at this is my web.xml file
and using jar are:
bsh.jar itext.jar portlet-api-1.0.jar
commons-collections.jar jasperreports.jar servlet.jar
commons-fileupload.jar jcommon.jar timelinez.jar
commons-io.jar jfreechart.jar timeplotz.jar
commons-logging.jar jruby.jar zcommons-el.jar
fckez.jar js.jar zkmax.jar
Filters.jar jxl.jar zkplus.jar
gmapsz.jar jython.jar
groovy.jar poi.jar

UnderLine Textactually i want to run source code of zk in eclipse plz help me.

<?xml version="1.0" encoding="UTF-8"?>

<!-- web.xml
Purpose:

Description:

History:
Wed Dec 29 12:13:00 2004, Created by tomyeh

Copyright (C) 2004 Potix Corporation. All Rights Reserved.
-->

<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">

<description><![CDATA[ZK Demo]]></description>
<display-name>zkdemo</display-name>
<!--
<icon>
<small-icon></small-icon>
<large-icon></large-icon>
</icon>
-->
<!-- Spring ApplicationContext -->
<!--
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/spring-config.xml</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
-->
<!-- //// -->
<!-- ZK -->
<listener>
<description>ZK listener for session cleanup</description>
<listener-class>org.zkoss.zk.ui.http.HttpSessionListener</listener-class>
</listener>
<servlet>
<description>ZK loader for ZUML pages</description>
<servlet-name>zkLoader</servlet-name>
<servlet-class>org.zkoss.zk.ui.http.DHtmlLayoutServlet</servlet-class>
<!-- Must. Specifies URI of the update engine (DHtmlUpdateServlet).
It must be the same as <url-pattern> for the update engine.
-->
<init-param>
<param-name>update-uri</param-name>
<param-value>/zkau</param-value>
</init-param>
<!-- Optional. Specifies whether to compress the output
of the ZK loader. It speeds up the transmission over slow Internet.
However, if you configure a filter to post-processing the
output, you might have to disable it.

Default: true
<init-param>
<param-name>compress</param-name>
<param-value>true</param-value>
</init-param>
-->
<!-- Optional. Specifies the default log level: OFF, ERROR, WARNING,
INFO, DEBUG and FINER. If not specified, the system default is used.
<init-param>
<param-name>log-level</param-name>
<param-value>OFF</param-value>
</init-param>
-->
<load-on-startup>1</load-on-startup><!-- Must -->
</servlet>
<servlet-mapping>
<servlet-name>zkLoader</servlet-name>
<url-pattern>*.zul</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>zkLoader</servlet-name>
<url-pattern>*.zhtml</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>zkLoader</servlet-name>
<url-pattern>*.svg</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>zkLoader</servlet-name>
<url-pattern>*.xml2html</url-pattern>
</servlet-mapping>

<!-- Optional. Uncomment it if you want to use richlets.
-->
<servlet-mapping>
<servlet-name>zkLoader</servlet-name>
<url-pattern>/zk/*</url-pattern>
</servlet-mapping>

<servlet>
<description>The asynchronous update engine for ZK</description>
<servlet-name>auEngine</servlet-name>
<servlet-class>org.zkoss.zk.au.http.DHtmlUpdateServlet</servlet-class>

<!-- Specifies the AU processor for particular prefix.
<init-param>
<param-name>processor0</param-name>
<param-value>/upload=com.my.MyUploader</param-value>
</init-param>
-->
</servlet>
<servlet-mapping>
<servlet-name>auEngine</servlet-name>
<url-pattern>/zkau/*</url-pattern>
</servlet-mapping>

<!-- Uncomment if you want to use the ZK filter to post process the HTML output
generated by other technology, such as JSP and velocity.
<filter>
<filter-name>zkFilter</filter-name>
<filter-class>org.zkoss.zk.ui.http.DHtmlLayoutFilter</filter-class>
<init-param>
<param-name>extension</param-name>
<param-value>html</param-value>
</init-param>
<init-param>
<param-name>compress</param-name>
<param-value>true</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>zkFilter</filter-name>
<url-pattern>/test/filter.dsp</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>zkFilter</filter-name>
<url-pattern>/test/filter2.dsp</url-pattern>
</filter-mapping>
-->

<!-- ///////////// -->
<!-- DSP (optional) -->
<!-- Uncomment if you want to use Potix DSP in your Website
-->
<servlet>
<servlet-name>dspLoader</servlet-name>
<servlet-class>org.zkoss.web.servlet.dsp.InterpreterServlet</servlet-class>
<init-param>
<param-name>class-resource</param-name>
<param-value>true</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>dspLoader</servlet-name>
<url-pattern>*.dsp</url-pattern>
</servlet-mapping>

<!-- /////////// -->
<!-- Miscellaneous -->
<session-config>
<session-timeout>60</session-timeout>
</session-config>

<!-- MIME mapping -->
<mime-mapping>
<extension>doc</extension>
<mime-type>application/vnd.ms-word</mime-type>
</mime-mapping>
<mime-mapping>
<extension>gif</extension>
<mime-type>image/gif</mime-type>
</mime-mapping>
<mime-mapping>
<extension>htm</extension>
<mime-type>text/html</mime-type>
</mime-mapping>
<mime-mapping>
<extension>html</extension>
<mime-type>text/html</mime-type>
</mime-mapping>
<mime-mapping>
<extension>jnlp</extension>
<mime-type>application/x-java-jnlp-file</mime-type>
</mime-mapping>
<mime-mapping>
<extension>jpeg</extension>
<mime-type>image/jpeg</mime-type>
</mime-mapping>
<mime-mapping>
<extension>jpg</extension>
<mime-type>image/jpeg</mime-type>
</mime-mapping>
<mime-mapping>
<extension>js</extension>
<mime-type>application/x-javascript</mime-type>
</mime-mapping>
<mime-mapping>
<extension>pdf</extension>
<mime-type>application/pdf</mime-type>
</mime-mapping>
<mime-mapping>
<extension>png</extension>
<mime-type>image/png</mime-type>
</mime-mapping>
<mime-mapping>
<extension>rar</extension>
<mime-type>application/x-rar-compressed</mime-type>
</mime-mapping>
<mime-mapping>
<extension>txt</extension>
<mime-type>text/plain</mime-type>
</mime-mapping>
<mime-mapping>
<extension>xls</extension>
<mime-type>application/vnd.ms-excel</mime-type>
</mime-mapping>
<mime-mapping>
<extension>xml</extension>
<mime-type>text/xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>xul</extension>
<mime-type>application/vnd.mozilla.xul-xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>zhtml</extension>
<mime-type>text/html</mime-type>
</mime-mapping>
<mime-mapping>
<extension>zip</extension>
<mime-type>application/x-zip</mime-type>
</mime-mapping>
<mime-mapping>
<extension>zul</extension>
<mime-type>text/html</mime-type>
</mime-mapping>

<welcome-file-list>
<welcome-file>index.zul</welcome-file>
<welcome-file>index.zhtml</welcome-file>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
</welcome-file-list>
</web-app>

link publish delete flag offensive edit

answered 2009-02-20 12:41:13 +0800

vijays gravatar image vijays
72 1

hey solve problem thanks
close...

link publish delete flag offensive edit

answered 2009-02-23 03:44:41 +0800

iantsai gravatar image iantsai
2755 1

So, how you solve your problem vijays?

Can you share your experience?

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

RSS

Stats

Asked: 2009-02-10 06:40:04 +0800

Seen: 1,924 times

Last updated: Feb 23 '09

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