0

zk.xml requires undocumented <config-name>

asked 2020-06-23 01:25:19 +0800

54patman gravatar image 54patman
13 3

Hi,

I just created a new Spring Boot app with version 9 and I'm using richlets. But there's an undocumented required tag <config-name>. It's not even in the xsd.

In /src/main/resources/application.properties I only have: zk.richlet-filter-mapping=/app/*

In src/main/resources/metainfo/zk/zk.xml I have:

<zk>    
    <richlet>
        <richlet-name>webcam</richlet-name>
        <richlet-class>com.patmangames.WebCam</richlet-class>
    </richlet>

    <richlet-mapping>
        <richlet-name>webcam</richlet-name>
        <url-pattern>/app/webcam/*</url-pattern>
    </richlet-mapping>  

</zk>

Start the app and see this error in the log:

2020-06-22 13:16:12.204 ERROR 14176 --- [  restartedMain] org.zkoss.zk.ui.http.WebManager          : Unable to load metainfo/zk/zk.xml

org.zkoss.util.IllegalSyntaxException: <config-name> is required ([null:file:/C:/mtg/fe_zk/detector/target/classes/metainfo/zk/zk.xml:1:5]).
    at org.zkoss.idom.util.IDOMs.getRequiredElementValue(IDOMs.java:80) ~[zcommon-9.0.0.jar:9.0.0]
    at org.zkoss.util.resource.ClassLocator$XMLResource.<init>(ClassLocator.java:205) ~[zcommon-9.0.0.jar:9.0.0]
    at org.zkoss.util.resource.ClassLocator$XMLResource.<init>(ClassLocator.java:184) ~[zcommon-9.0.0.jar:9.0.0]
    at org.zkoss.util.resource.ClassLocator.getDependentXMLResources(ClassLocator.java:83) ~[zcommon-9.0.0.jar:9.0.0]
    at org.zkoss.zk.ui.http.WebManager.<init>(WebManager.java:147) ~[zk-9.0.0.jar:9.0.0]

To fix add this in the zk.xml: <config-name></config-name>

Thanks

delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-06-23 12:54:27 +0800

cor3000 gravatar image cor3000
6280 2 7

yes that's correct: the same <config-name> element is used in the demo configuration

https://github.com/zkoss/zkspringboot/blob/master/zkspringboot-demos/zkspringboot-demo-jar/src/main/resources/metainfo/zk/zk.xml#L3

do you have any related question/problem?

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: 2020-06-23 01:25:19 +0800

Seen: 12 times

Last updated: Jun 23 '20

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