0

zk chart with JFreeChartEngine

asked 2016-10-25 16:13:19 +0800

sbasly gravatar image sbasly
3 1

I have a ZK Enterprise Edition and I'm trying to create Charts with Richlet.

Chart zkCkart = new Chart();

zkCkart.setEngine(new JFreeChartEngine());

zkCkart.setType(org.zkoss.zul.Chart.LINE);

zkCkart.setTitle(chart.getTitle().getLabel().toString());

...

zkCkart.setParent(mainContainer);

and I added this on the zk.xml

<listener>

<listener-class>org.zkoss.zkex.init.WebAppInit</listener-class>

</listener>

<library-property>

<name>org.zkoss.zul.chart.engine.class</name> <value>com.igalia.java.zk.components.JFreeChartEngine</value>

</library-property>

I don't know what's wrong but when I run I have this output

11:49:32.800 [main] ERROR o.z.z.u.s.ConfigParser - Unable to load a listener, [null:bundleresource://1066.fwk1329504187/metainfo/zk/config.xml:29:12] org.zkoss.zk.ui.UiException: bundleresource...187/metainfo/zk/config.xml:29:12: Unable to load org.zkoss.zkex.init.WebAppInit at org.zkoss.zk.ui.sys.ConfigParser.parseClass(ConfigParser.java:929) [zk.osgi.jar:8.0.3.1] at org.zkoss.zk.ui.sys.ConfigParser.parseListener(ConfigParser.java:287) [zk.osgi.jar:8.0.3.1] at org.zkoss.zk.ui.sys.ConfigParser.parseListeners(ConfigParser.java:281) [zk.osgi.jar:8.0.3.1] at org.zkoss.zk.ui.sys.ConfigParser.parseConfigXml(ConfigParser.java:219) [zk.osgi.jar:8.0.3.1] at org.zkoss.zk.ui.http.WebManager.<init>(WebManager.java:133) [zk.osgi.jar:8.0.3.1] at org.zkoss.zk.ui.http.HttpSessionListener23.contextInitialized(HttpSessionListener23.java:141) [zk.osgi.jar:8.0.3.1] at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:800) [org.eclipse.jetty.server9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:444) [org.eclipse.jetty.servlet9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:791) [org.eclipse.jetty.server9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:294) [org.eclipse.jetty.servlet9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1349) [org.eclipse.jetty.webapp9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1342) [org.eclipse.jetty.webapp9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:741) [org.eclipse.jetty.server9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:505) [org.eclipse.jetty.webapp9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) [org.eclipse.jetty.util9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132) [org.eclipse.jetty.util9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114) [org.eclipse.jetty.util9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61) [org.eclipse.jetty.server9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) [org.eclipse.jetty.util9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132) [org.eclipse.jetty.util9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.server.Server.start(Server.java:387) [org.eclipse.jetty.server9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114) [org.eclipse.jetty.util9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61) [org.eclipse.jetty.server9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.server.Server.doStart(Server.java:354) [org.eclipse.jetty.server9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) [org.eclipse.jetty.util9.2.9.v20150224.jar:9.2.9.v20150224] at com.castortech.iris.models.ecore.ba.publish.zk.server.JettyServer.start(JettyServer.java:51) [com.castortech.iris.models.ecore.ba.publish.zk/:na] at com.castortech.iris.models.ecore.ba.publish.zk.server.JettyServer.postStartUp(JettyServer.java:96) [com.castortech.iris.models.ecore.ba.publish.zk/:na] at org.eclipse.emf.emfstore.internal.server.EMFStoreController.handlePostStartupListener(EMFStoreController.java:292) [org.eclipse.emf.emfstore.server/:na] at org.eclipse.emf.emfstore.internal.server.EMFStoreController.run(EMFStoreController.java:192) [org.eclipse.emf.emfstore.server/:na] at com.castortech.iris.vision.ServerApplication$1.run(ServerApplication.java:51) [com.castortech.iris.vision/:na] at com.castortech.iris.vision.ApplicationWorkbenchAdvisor.postStartup(ApplicationWorkbenchAdvisor.java:193) [com.castortech.iris.vision/:na] at org.eclipse.ui.internal.Workbench$60.run(Workbench.java:2988) [org.eclipse.ui.workbench3.107.100.201502261938.jar:na] at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1094) [org.eclipse.e4.ui.workbench.swt0.13.0.v20150504-0621.jar:na] at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:331) [org.eclipse.core.databinding.observable1.5.0.v20140320-1340.jar:na] at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1018) [org.eclipse.e4.ui.workbench.swt0.13.0.v20150504-0621.jar:na] at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:156) [org.eclipse.e4.ui.workbench1.3.0.v20150531-1948.jar:na] at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:654) [org.eclipse.ui.workbench3.107.100.201502261938.jar:na] at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:331) [org.eclipse.core.databinding.observable1.5.0.v20140320-1340.jar:na] at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:598) [org.eclipse.ui.workbench3.107.100.201502261938.jar:na] at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150) [org.eclipse.ui.workbench3.107.100.201502261938.jar:na] at com.castortech.iris.vision.ServerApplication.start(ServerApplication.java:64) [com.castortech.iris.vision/:na] at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) [org.eclipse.equinox.app1.3.300.v20150423-1356.jar:na] at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) [org.eclipse.osgi3.10.100.v20150529-1857.jar:na] at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) [org.eclipse.osgi3.10.100.v20150529-1857.jar:na] at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380) [org.eclipse.osgi3.10.100.v20150529-1857.jar:na] at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235) [org.eclipse.osgi3.10.100.v20150529-1857.jar:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0101] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0101] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0101] at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.8.0101] at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:669) [org.eclipse.equinox.launcher1.3.100.v20150511-1540.jar:na] at org.eclipse.equinox.launcher.Main.basicRun(Main.java:608) [org.eclipse.equinox.launcher1.3.100.v20150511-1540.jar:na] at org.eclipse.equinox.launcher.Main.run(Main.java:1515) [org.eclipse.equinox.launcher1.3.100.v20150511-1540.jar:na] at org.eclipse.equinox.launcher.Main.main(Main.java:1488) [org.eclipse.equinox.launcher1.3.100.v20150511-1540.jar:na] Caused by: java.lang.NoClassDefFoundError: org/zkoss/zk/ui/util/WebAppInit at java.lang.ClassLoader.defineClass1(Native Method) ~[na:1.8.0101] at java.lang.ClassLoader.defineClass(Unknown Source) ~[na:1.8.0101] at org.eclipse.osgi.internal.loader.ModuleClassLoader.defineClass(ModuleClassLoader.java:272) ~[org.eclipse.osgi3.10.100.v20150529-1857.jar:na] at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.defineClass(ClasspathManager.java:632) ~[org.eclipse.osgi3.10.100.v20150529-1857.jar:na] at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findClassImpl(ClasspathManager.java:588) ~[org.eclipse.osgi3.10.100.v20150529-1857.jar:na] at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClassImpl(ClasspathManager.java:540) ~[org.eclipse.osgi3.10.100.v20150529-1857.jar:na] at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:527) ~[org.eclipse.osgi3.10.100.v20150529-1857.jar:na] at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:324) ~[org.eclipse.osgi3.10.100.v20150529-1857.jar:na] at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:327) ~[org.eclipse.osgi3.10.100.v20150529-1857.jar:na] at org.eclipse.osgi.internal.loader.sources.SingleSourcePackage.loadClass(SingleSourcePackage.java:36) ~[org.eclipse.osgi3.10.100.v20150529-1857.jar:na] at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:398) ~[org.eclipse.osgi3.10.100.v20150529-1857.jar:na] at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:352) ~[org.eclipse.osgi3.10.100.v20150529-1857.jar:na] at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:344) ~[org.eclipse.osgi3.10.100.v20150529-1857.jar:na] at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:160) ~[org.eclipse.osgi3.10.100.v20150529-1857.jar:na] at java.lang.ClassLoader.loadClass(Unknown Source) ~[na:1.8.0101] at java.lang.Class.forName0(Native Method) ~[na:1.8.0101] at java.lang.Class.forName(Unknown Source) ~[na:1.8.0101] at org.zkoss.lang.Classes.forNameByThread(Classes.java:269) ~[zcommon.osgi.jar:8.0.3.1] at org.zkoss.zk.ui.sys.ConfigParser.parseClass(ConfigParser.java:915) [zk.osgi.jar:8.0.3.1] ... 53 common frames omitted

delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-10-30 08:55:04 +0800

Darksu gravatar image Darksu
1991 1 4

Hello sbasly,

I do not think you need this in the configuration:

<listener-class>org.zkoss.zkex.init.WebAppInit</listener-class>

Best Regards,

Darksu

link publish delete flag offensive edit
Your answer
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
2 followers

RSS

Stats

Asked: 2016-10-25 16:13:19 +0800

Seen: 23 times

Last updated: Oct 30 '16

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