-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi everyone,
I am trying to get the wizard example described in the small talks section (unfortunately, I am not allowed to post a complete URL, so: www zkoss org wiki SmallTalks 2015 September ZK8WizardExample-Part1) to run under zkoss 8.6.01 but I keep getting an instantiation error deep inside the framework:
org.zkoss.zk.ui.UiException: java.lang.InstantiationException: org.zkoss.zk.ui.HtmlShadowElement at sun.reflect.GeneratedConstructorAccessor40.newInstance at java.lang.reflect.Constructor.newInstance(Constructor.java:437) at org.zkoss.lang.Classes.newInstance(Classes.java:76) at org.zkoss.lang.Exceptions.wrap(Exceptions.java:163) at org.zkoss.zk.ui.UiException$Aide.wrap(UiException.java:51) at org.zkoss.zk.ui.metainfo.impl.ComponentDefinitionImpl.newInstance(ComponentDefinitionImpl.java:346) at org.zkoss.zk.ui.metainfo.impl.ComponentDefinitionImpl.newInstance(ComponentDefinitionImpl.java:326) at org.zkoss.zk.ui.metainfo.ShadowInfo.newInstance(ShadowInfo.java:138) at org.zkoss.zk.ui.impl.AbstractUiFactory.newComponent(AbstractUiFactory.java:103) at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild(UiEngineImpl.java:846) at org.zkoss.zk.ui.impl.UiEngineImpl.execCreate0(UiEngineImpl.java:822) at org.zkoss.zk.ui.impl.UiEngineImpl.execCreate(UiEngineImpl.java:740) at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild0(UiEngineImpl.java:934) at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild(UiEngineImpl.java:889) at org.zkoss.zk.ui.impl.UiEngineImpl.execCreate0(UiEngineImpl.java:776) at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild(UiEngineImpl.java:836) at org.zkoss.zk.ui.impl.UiEngineImpl.execCreate0(UiEngineImpl.java:794) at org.zkoss.zk.ui.impl.UiEngineImpl.execCreate(UiEngineImpl.java:740) at org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage0(UiEngineImpl.java:461) at org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage(UiEngineImpl.java:369) at org.zkoss.zk.ui.http.DHtmlLayoutServlet.process(DHtmlLayoutServlet.java:215) at org.zkoss.zk.ui.http.DHtmlLayoutServlet.doGet(DHtmlLayoutServlet.java:140) at javax.servlet.http.HttpServlet.service(HttpServlet.java:686) at [internal classes] Caused by: java.lang.InstantiationException: org.zkoss.zk.ui.HtmlShadowElement at java.lang.J9VMInternals.newInstanceImpl(J9VMInternals.java:-2) at java.lang.Class.newInstance(Class.java:1899) at org.zkoss.zk.ui.metainfo.impl.ComponentDefinitionImpl.newInstance(ComponentDefinitionImpl.java:344) ... 18 more
Any ideas anyone? Is that a framework bug? My code is exactly the same as in the example. I just copied it....:)
No idea, I tried it, both master and part-1 branch, both versions work after changing to 8.0.6.1-Eval (and jetty 9.4.19.v20190610 - for faster startup)
here the commands:
git clone [email protected]:zkoss-demo/zk-wizard-example.git
cd zk-wizard-example
#edit the pom (zk version, jetty version)
nano pom.xml
mvn jetty:run
http://localhost:8080/wizardexample/survey.zul
I couldn't get it to produce the error you mentioned ... Maybe you forgot to add the dependency to zuti.jar? Which contains the shadow element support (key for this demo).
<dependency>
<groupId>org.zkoss.zk</groupId>
<artifactId>zuti</artifactId>
<version>${zk.version}</version>
</dependency>
https://github.com/zkoss-demo/zk-wizard-example/blob/master/pom.xml#L53-L57
if that doesn't help please provide the exact steps required to produce this error.
That could be it. Can you provide the URL to the maven repo for the zuti jar? I can only find EVAL Versions here: http mavensync zkoss org eval org zkoss zk zuti
zuti.jar is available in ZK EE and requires a maven repository login.
The maven repositories are and their required license level are listed here: https://www.zkoss.org/wiki/ZKInstallationGuide/SettingupIDE/Maven/ResolvingZKFrameworkArtifactsviaMaven#HowtoChoosetheRightZKMavenRepositoryforaZKPackage
Aaah.... :) Thanks for your help. For the Moment, I have to find some other solution then. We are currently only using the community version of zk.
Asked: 2019-07-16 19:12:29 +0800
Seen: 11 times
Last updated: Jul 18 '19
[ZK8.6 Preview] New media components coming soon!
Bug in Datebox with lenient=false and value 01.04.1981?
javascript cannot catch id of zul component. Please help.
failed to utilize getTop(), getLeft() on div(component). Please help.
Serving zul files from a directory outside web application