0

Themes throws NoClassDefFoundError when updating to zk 5.0.7

asked 2011-05-20 02:39:47 +0800

Neus gravatar image Neus
1415 14

Hi all,
I just update to zk 5.0.7 and when Tomcat is started I'm getting these errors:

GRAVE: Failed to invoke class org.zkoss.theme.breeze.BreezeThemeWebAppInit
java.lang.NoClassDefFoundError: org/zkoss/zkplus/theme/Themes
	at org.zkoss.theme.breeze.BreezeThemeWebAppInit.init(BreezeThemeWebAppInit.java:46)
	at org.zkoss.zk.ui.util.Configuration.invokeWebAppInits(Configuration.java:680)
	at org.zkoss.zk.ui.impl.AbstractWebApp.init(AbstractWebApp.java:208)
	at org.zkoss.zk.ui.http.SimpleWebApp.init(SimpleWebApp.java:59)
	at org.zkoss.zk.ui.http.WebManager.<init>(WebManager.java:182)
	at org.zkoss.zk.ui.http.DHtmlLayoutServlet.init(DHtmlLayoutServlet.java:111)
	at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1161)
	at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:981)
	at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4045)
	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4351)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
	at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
	at org.apache.catalina.core.StandardService.start(StandardService.java:516)
	at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: java.lang.ClassNotFoundException: org.zkoss.zkplus.theme.Themes
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1358)
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)
	... 23 more

and 2 more like this (one for each theme:breeze, silvertail and sapphire).
I check WEB-INF/lib and .jars are there.

Am I doing something wrong?

Thank you!

delete flag offensive retag edit

3 Replies

Sort by ┬╗ oldest newest

answered 2011-05-20 05:03:26 +0800

matthewgo gravatar image matthewgo
375

updated 2011-05-20 05:04:10 +0800

Hi
I use zk studio to build a new zk project , it works fine (zk 507 , tomcat 7)
I think you need to check your jars.

link publish delete flag offensive edit

answered 2011-05-20 06:22:20 +0800

Neus gravatar image Neus
1415 14

I tried in another project and it works fine.
But I can't imagine what's in my project to make this errors appear.
With older zk version it was working ok.

link publish delete flag offensive edit

answered 2011-05-23 04:08:17 +0800

Neus gravatar image Neus
1415 14

I tried adding breeze.jar,sapphire.jar and silvertail.jar to tomcat classpath. Then this exception is thrown:

GRAVE: Unable to load a listenr, [SYS jar:file:/C:/workspaceStsWeb/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/HospitalariaWeb/WEB-INF/lib/silvertail.jar!/metainfo/zk/config.xml line 11 col 12]
org.zkoss.zk.ui.UiException: Unable to load org.zkoss.theme.silvertail.SilvertailThemeWebAppInit, at [SYS jar:file:/C:/workspaceStsWeb/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/HospitalariaWeb/WEB-INF/lib/silvertail.jar!/metainfo/zk/config.xml line 11 col 12]
	at org.zkoss.zk.ui.sys.ConfigParser.parseClass(ConfigParser.java:717)
	at org.zkoss.zk.ui.sys.ConfigParser.parseListener(ConfigParser.java:259)
	at org.zkoss.zk.ui.sys.ConfigParser.parseListeners(ConfigParser.java:254)
	at org.zkoss.zk.ui.sys.ConfigParser.parseConfigXml(ConfigParser.java:185)
	at org.zkoss.zk.ui.http.WebManager.<init>(WebManager.java:129)
	at org.zkoss.zk.ui.http.DHtmlLayoutServlet.init(DHtmlLayoutServlet.java:111)
	at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1161)
	at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:981)
	at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4045)
	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4351)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
	at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
	at org.apache.catalina.core.StandardService.start(StandardService.java:516)
	at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: java.lang.NoClassDefFoundError: org/zkoss/zk/ui/util/WebAppInit
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClassCond(Unknown Source)
	at java.lang.ClassLoader.defineClass(Unknown Source)
	at java.security.SecureClassLoader.defineClass(Unknown Source)
	at java.net.URLClassLoader.defineClass(Unknown Source)
	at java.net.URLClassLoader.access$000(Unknown Source)
	at java.net.URLClassLoader$1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1273)
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Unknown Source)
	at org.zkoss.lang.Classes.forNameByThread(Classes.java:271)
	at org.zkoss.zk.ui.sys.ConfigParser.parseClass(ConfigParser.java:702)
	... 22 more
Caused by: java.lang.ClassNotFoundException: org.zkoss.zk.ui.util.WebAppInit
	at java.net.URLClassLoader$1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	... 40 more

This 3 times, for each theme.

Seeing this I added zk.jar to Tomcat classpath and another exception appears:

GRAVE: Error configurando escuchador de aplicaci├│n de clase org.sts.generales.EventosAplicacion.ControladorSesiones
java.lang.NoClassDefFoundError: javax/servlet/ServletRequestAttributeListener
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClassCond(Unknown Source)
	at java.lang.ClassLoader.defineClass(Unknown Source)
	at java.security.SecureClassLoader.defineClass(Unknown Source)
	at java.net.URLClassLoader.defineClass(Unknown Source)
	at java.net.URLClassLoader.access$000(Unknown Source)
	at java.net.URLClassLoader$1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1273)
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClassCond(Unknown Source)
	at java.lang.ClassLoader.defineClass(Unknown Source)
	at java.security.SecureClassLoader.defineClass(Unknown Source)
	at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1817)
	at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:872)
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1325)
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3773)
	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4337)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
	at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
	at org.apache.catalina.core.StandardService.start(StandardService.java:516)
	at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: java.lang.ClassNotFoundException: javax.servlet.ServletRequestAttributeListener
	at java.net.URLClassLoader$1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	... 37 more

Finally, I added servlet.api.jar to Tomcat classpath, too. And error 404 Servlet zkLoader not available appears.

Now, I don't know what more can I do.

Can anyone help me?

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: 2011-05-20 02:39:47 +0800

Seen: 575 times

Last updated: May 23 '11

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