-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi, i have this config.
applications.properties
zk.springboot-packaging=jar
ZK.xml
<library-property><name>org.zkoss.theme.preferred</name><value>breeze</value></library-property>
pom.xml
<dependency>
<groupId>org.zkoss.theme</groupId>
<artifactId>breeze</artifactId>
<version>${zk.version}</version>
</dependency>
When the project starts, this problem is launched
2022-05-14 12:03:51,042 ERROR [restartedMain] org.zkoss.zk.ui.sys.ConfigParser: Unable to load a listener, [null:jar:file:/C:/Users/user/.m2/repository/org/zkoss/theme/breeze/9.6.0.1/breeze-9.6.0.1.jar!/metainfo/zk/config.xml:11:12]
org.zkoss.zk.ui.UiException: Unknown listener: class org.zkoss.theme.breeze.BreezeThemeWebAppInit
at org.zkoss.zk.ui.util.Configuration.addListener(Configuration.java:413)
at org.zkoss.zk.ui.sys.ConfigParser.parseListener(ConfigParser.java:288)
at org.zkoss.zk.ui.sys.ConfigParser.parseListeners(ConfigParser.java:282)
at org.zkoss.zk.ui.sys.ConfigParser.parseConfigXml(ConfigParser.java:220)
at org.zkoss.zk.ui.http.WebManager.<init>(WebManager.java:149)
at org.zkoss.zk.ui.http.WebManager.<init>(WebManager.java:111)
at org.zkoss.zkspringboot.ZkAutoConfiguration$1.contextInitialized(ZkAutoConfiguration.java:93)
Afther this error the deployment continues and the app starts, but the breeze theme is not loaded and it take iceblue.
INFO [0;39m [[34mrestartedMain[0;39m] [33morg.zkoss.zk.ui.sys.ConfigParser[0;39m: Parsing file:/C:/pgp-zkspring/target/classes/metainfo/zk/zk.xml
WARN [0;39m [[34mrestartedMain[0;39m] [33morg.zkoss.zk.ui.util.Configuration[0;39m: Enable event thread has deprecated!
INFO [0;39m [[34mrestartedMain[0;39m] [33morg.zkoss.zk.ui.sys.ConfigParser[0;39m: Parsing jar:file:/C:/Users/user/.m2/repository/org/zkoss/zk/zul/9.6.0.1/zul-9.6.0.1.jar!/metainfo/zk/zk.xml
More info.
i´ve added BREEZE to the zkspringboot-demo-jar project and i got the same problem.
Just add the breeze dependency in the pom.xml and setup the theme in the the zk.xml and the problem appears during the app start up.
I´m using eclipse STS.
Thanks in advance.
Hi there,
How do you add dependencies to your project? Are you adding the jars manually, or using a dependency management tool such as maven or gradle?
I can see in the error that you are adding breeze-9.6.0.1.jar to your project. If you are using the default ZK spring boot starter, the default ZK version of the starter is 9.6.0.
It is possible that the theme fails to register if the versions are not matching.
If you are using maven / gradle, I recommend building once from command line, just to make sure there is no exception when resolving the dependencies. Sometime Eclipse will hide stuff from you, which can cause projects not to work as expected.
The error showed here indicates that the config parser failed to parse the breeze theme jar config (which explains why the theme is not loaded). However, there should be a "caused by" clause further below that error stack. If you don't see that error in your log, you can try putting a breakpoint at org.zkoss.zk.ui.sys.ConfigParser.parseListener(Configuration, Element)
on the line:
log.error("Unable to load a listener, " + el.getLocator(), ex);
and check the content of the exception object ex to find out the root cause of that failure to parse.
FYI since there is at least two reported issues with similar error stacks / messages, I have created a ticket to centralize this debugging: https://tracker.zkoss.org/browse/ZK-5245
Asked: 2022-05-14 18:24:04 +0800
Seen: 14 times
Last updated: Sep 15 '22