-
New Feature
-
Resolution: Done
-
Normal
-
None
-
Security Level: Jean
-
ZK 8.0.2 S1
-
None
ZK uses the current thread's classloader to load classes/resources in several places
https://github.com/zkoss/zk/search?p=1&q=Thread.currentThread%28%29.getContextClassLoader&utf8mb4=%E2%9C%93
This may cause problems when the application server uses separate classloaders e.g. Wildfly separates into war and ear class loading.
https://docs.jboss.org/author/display/WFLY8/Class+Loading+in+WildFly
an improvement could be to make the class loading configurable to enable a different strategy when needed.
example of an exception:
Caused by: org.zkoss.zel.ELException: Unable to find ExpressionFactory of type: org.zkoss.zel.impl.ExpressionFactoryImpl at org.zkoss.zel.ExpressionFactory.newInstance(ExpressionFactory.java:165) at org.zkoss.zel.ExpressionFactory.newInstance(ExpressionFactory.java:104) at org.zkoss.zel.Util.getExpressionFactory(Util.java:124) at org.zkoss.zel.ELManager.getExpressionFactory(ELManager.java:30) at org.zkoss.zel.ELContext.convertToType(ELContext.java:306) at org.zkoss.zel.impl.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186) at org.zkoss.xel.zel.ELXelExpression.evaluate(ELXelExpression.java:41) at org.zkoss.zk.xel.impl.SimpleEvaluator.evaluate(SimpleEvaluator.java:72) at org.zkoss.zk.ui.metainfo.AbstractEvalRef.evaluate(AbstractEvalRef.java:48) at org.zkoss.zk.xel.ExValue.getValue(ExValue.java:109) at org.zkoss.zk.ui.metainfo.Property.getValue(Property.java:136) at org.zkoss.zk.ui.metainfo.Property.assign0(Property.java:242) at org.zkoss.zk.ui.metainfo.Property.assign(Property.java:171) at org.zkoss.zk.ui.metainfo.ComponentInfo.applyProperties(ComponentInfo.java:732) at org.zkoss.zk.ui.impl.AbstractUiFactory.newComponent(AbstractUiFactory.java:136) at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild0(UiEngineImpl.java:908) at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild(UiEngineImpl.java:877) at org.zkoss.zk.ui.impl.UiEngineImpl.execCreate0(UiEngineImpl.java:748) at org.zkoss.zk.ui.impl.UiEngineImpl.execCreate(UiEngineImpl.java:709) at org.zkoss.zk.ui.impl.UiEngineImpl.createComponents(UiEngineImpl.java:1141) at org.zkoss.zk.ui.impl.AbstractExecution.createComponents0(AbstractExecution.java:310) at org.zkoss.zk.ui.impl.AbstractExecution.createComponents(AbstractExecution.java:296) at org.zkoss.zk.ui.Executions.createComponents(Executions.java:177) at org.zkoss.zul.Messagebox.show(Messagebox.java:177) at org.zkoss.zul.Messagebox.show(Messagebox.java:417) at org.zkoss.zul.Messagebox.show(Messagebox.java:347) at some.package.DialogProvider.question(DialogProvider.java:15)