0

ZK 8.6.2 with Servlet 4.0

asked 2019-07-06 22:32:54 +0800

tredmond gravatar image tredmond
21 1

Hi, Does ZK8.6.2 support Servlet 4.0? I'm getting a weird exception on startup with a very simple app on WildFly 17 / Java 10 as follows?

15:18:02,134 INFO [org.zkoss.zk.ui.sys.ConfigParser] (ServerService Thread Pool -- 118) Parsing vfs:/home/tredmond/IdeaProjects/SimpleZK/out/artifacts/SimpleZKwarexploded.war/WEB-INF/lib/zkmax.jar/metainfo/zk/zk.xml 15:18:02,175 ERROR [org.zkoss.zk.ui.util.Configuration] (ServerService Thread Pool -- 118) Failed to invoke class org.zkoss.zkmax.init.WebAppInit: java.lang.IllegalStateException: UT010041: The servlet context has already been initialized, you can only call this method from a ServletContainerInitializer or a ServletContextListener at io.undertow.servlet@2.0.21.Final//io.undertow.servlet.spec.ServletContextImpl.ensureNotInitialized(ServletContextImpl.java:955) at io.undertow.servlet@2.0.21.Final//io.undertow.servlet.spec.ServletContextImpl.addServlet(ServletContextImpl.java:540) at deployment.SimpleZKwarexploded.war//org.zkoss.zkmax.ui.comet.CometAsyncServlet.install(CometAsyncServlet.java:57) at deployment.SimpleZKwarexploded.war//org.zkoss.zkmax.init.WebAppInit.init(WebAppInit.java:32)

delete flag offensive retag edit

1 Reply

Sort by ยป oldest newest

answered 2019-07-08 13:01:16 +0800

cor3000 gravatar image cor3000
4596 2 7
ZK Team

I tested the most simple example myself (using Wildfly 17.0.1 and openJDK 11) https://github.com/zkoss-demo/zk-gradle

git clone git@github.com:zkoss-demo/zk-gradle.git
cd zk-gradle
./gradlew war
cp build/libs/zk-gradle.war ~/wildfly-servlet-17.0.1.Final/standalone/deployments/

http://127.0.0.1/zk-gradle

Wildfly successfully deployed the application on my side (no errors).

I also changed the zk version to 8.6.2-Eval in gradle.properties as well as updated the web.xml from a 2.4 to a 4.0 version - still works.

Can you please try out this example and see if it works on your side? If it works you can compare the configuration to see which change causes this error. Once you found the difference please provide the details so I can have another look.

link publish delete flag offensive edit
Your reply
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: 2019-07-06 22:32:54 +0800

Seen: 6 times

Last updated: Jul 08

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