Unknown listener: class org.zkoss.theme.iceblue_c.ThemeWebAppInit when use zkspringboot 2.5.12

asked 2022-06-29 15:18:25 +0800

jack3dot1415 gravatar image jack3dot1415
60 2

in zk.xml,use the iceblue_c theme


when i run Application or use mvn spring-run, my web app can startup, but the theme cannot take effect,there is a UiException when startup:

org.zkoss.zk.ui.UiException: Unknown listener: class org.zkoss.theme.iceblue_c.ThemeWebAppInit
    at org.zkoss.zk.ui.util.Configuration.addListener(Configuration.java:413) ~[zk-]
    at org.zkoss.zk.ui.sys.ConfigParser.parseListener(ConfigParser.java:288) ~[zk-]
    at org.zkoss.zk.ui.sys.ConfigParser.parseListeners(ConfigParser.java:282) ~[zk-]
    at org.zkoss.zk.ui.sys.ConfigParser.parseConfigXml(ConfigParser.java:220) ~[zk-]
    at org.zkoss.zk.ui.http.WebManager.<init>(WebManager.java:149) ~[zk-]
    at org.zkoss.zkspringboot.ZkAutoConfiguration$1.contextInitialized(ZkAutoConfiguration.java:95) ~[zkspringboot-autoconfig-2.5.12.jar:na]
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4766) ~[tomcat-embed-core-9.0.60.jar:9.0.60]
    at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49) ~[spring-boot-devtools-2.5.12.jar:2.5.12]

but if I use this command:

spring-boot:run -Dspring-boot.run.fork=false

to startup my web app, there is no exception throw, the theme work well, I search on google why,but cannot find anything help, is anybody have the same problem?

delete flag offensive retag edit

2 Answers

Sort by ยป oldest newest most voted

answered 2022-07-01 17:28:47 +0800

MDuchemin gravatar image MDuchemin
2390 1 6
ZK Team

From the error, your server is trying to locate the {themename}ThemeWebAppInit listener class and failing to do so. Class in github

Not sure why the class fails to resolve, but it looks similar to this question:


A bit old, but they seem to have a similar issue.

Based on that, do you tomcat endorsed directory? or other elements mentioned in that previous question?

link publish delete flag offensive edit


when I change to springboot(zkspringboot),this issue occurs.if I use the traditional web style app (xml based config files in webapp/WEB-INF) and jettty server,there is no problem.

jack3dot1415 ( 2022-07-06 14:35:39 +0800 )edit

Do you know if your springboot launch uses the springboot embedded tomcat, and if that tomcat has an endorsed directory configuration? (possibly in pom file, under the project properties?)

MDuchemin ( 2022-07-12 15:11:06 +0800 )edit

If the projects works as expected in jetty start, then it sounds like a configuration issue (as opposed to a project setup issue, or a dependency or compiling issue)

MDuchemin ( 2022-07-12 15:12:07 +0800 )edit

as i say,if i use this command to start: mvn spring-boot:run -Dspring-boot.run.fork=false there is no problem,but if use this command: mvn spring-boot:run the problem occurs

jack3dot1415 ( 2022-08-08 10:49:54 +0800 )edit

that's interesting, because fork should only cause a new JVM to be spun up to host the running application. do you have some global arguments in your JVM, maybe using JAVAOPTIONS or similar? Another test would be to check if this happen in other machines also, to rule out config issues.

MDuchemin ( 2022-08-18 16:08:16 +0800 )edit

answered 2022-09-15 18:17:58 +0800

MDuchemin gravatar image MDuchemin
2390 1 6
ZK Team

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

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

1 follower



Asked: 2022-06-29 15:18:25 +0800

Seen: 20 times

Last updated: Sep 15 '22

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