0

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
http://turbo00.7168.net/
<zkspringboot.version>2.5.12</zkspringboot.version>
<springboot.version>2.5.12</springboot.version>
<spring.version>5.3.20</spring.version>
<zk.version>9.6.0.1</zk.version>
<zkspring.version>3.2.0</zkspring.version>

in zk.xml,use the iceblue_c theme

<library-property>
    <name>org.zkoss.theme.preferred</name>
    <value>iceblue_c</value>
</library-property>

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-9.6.0.1.jar:9.6.0.1]
    at org.zkoss.zk.ui.sys.ConfigParser.parseListener(ConfigParser.java:288) ~[zk-9.6.0.1.jar:9.6.0.1]
    at org.zkoss.zk.ui.sys.ConfigParser.parseListeners(ConfigParser.java:282) ~[zk-9.6.0.1.jar:9.6.0.1]
    at org.zkoss.zk.ui.sys.ConfigParser.parseConfigXml(ConfigParser.java:220) ~[zk-9.6.0.1.jar:9.6.0.1]
    at org.zkoss.zk.ui.http.WebManager.<init>(WebManager.java:149) ~[zk-9.6.0.1.jar:9.6.0.1]
    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
0

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:

https://forum.zkoss.org/question/73399/unknown-listener-errors/

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

Comments

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
1

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
0

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

Follow
1 follower

RSS

Stats

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