Details

    • Type: New Feature
    • Status: Closed
    • Priority: Normal
    • Resolution: Done
    • Affects Version/s: 8.5.1.2
    • Fix Version/s: 8.5.2
    • Component/s: Container
    • Security Level: Jimmy
    • Labels:
      None
    • Environment:

      JDK 10
      Wildfly 13

    • gh.sprint.customfield.default.name:
      ZK 8.5.2 S1, ZK 8.5.2 S2

      Description

      Steps to Reproduce

      run a zul page using ZEL on wildfly 13 with JDK 10

      Current Result

                      org.zkoss.zel.ELException: The package [java.lang] could not be found
                      at deployment.Tradeswitch.ear//org.zkoss.zel.ImportHandler.importPackage(ImportHandler.java:154)
                      at deployment.Tradeswitch.ear//org.zkoss.zel.ImportHandler.<init>(ImportHandler.java:43)
                      at deployment.Tradeswitch.ear//org.zkoss.zel.ImportHandler.<init>(ImportHandler.java:33)
                      at deployment.Tradeswitch.ear//org.zkoss.zel.ImportHandler$SingletonHolder.<clinit>(ImportHandler.java:39)
                      at deployment.Tradeswitch.ear//org.zkoss.zel.ImportHandler.getImportHandler(ImportHandler.java:47)
                      at deployment.Tradeswitch.ear//org.zkoss.zel.ELContext.getImportHandler(ELContext.java:122)
                      at deployment.Tradeswitch.ear//org.zkoss.zel.impl.lang.EvaluationContext.getImportHandler(EvaluationContext.java:105)
                      at deployment.Tradeswitch.ear//org.zkoss.zel.impl.parser.AstIdentifier.getValue(AstIdentifier.java:89)
                      at deployment.Tradeswitch.ear//org.zkoss.zel.impl.parser.AstValue.getValue(AstValue.java:148)
                      at deployment.Tradeswitch.ear//org.zkoss.zel.impl.ValueExpressionImpl.getValue(ValueExpressionImpl.java:184)
                      at deployment.Tradeswitch.ear//org.zkoss.zkmax.bind.impl.ValueExpressionImplEx.getValue(ValueExpressionImplEx.java:52)
                      at deployment.Tradeswitch.ear//org.zkoss.xel.zel.ELXelExpression.evaluate(ELXelExpression.java:41)
                      at deployment.Tradeswitch.ear//org.zkoss.zkmax.bind.impl.BindEvaluatorXImplEx$LazyBindXelExpression.evaluate(BindEvaluatorXImplEx.java:124)
                      at deployment.Tradeswitch.ear//org.zkoss.bind.impl.BindEvaluatorXImpl.getValue(BindEvaluatorXImpl.java:46)
                      at deployment.Tradeswitch.ear//org.zkoss.bind.impl.BindEvaluatorXUtil.evalArgs(BindEvaluatorXUtil.java:62)
                      at deployment.Tradeswitch.ear//org.zkoss.bind.impl.BindEvaluatorXUtil.evalArgs(BindEvaluatorXUtil.java:39)
                      at deployment.Tradeswitch.ear//org.zkoss.bind.impl.BindContextUtil.setBindingArgs(BindContextUtil.java:48)
                      at deployment.Tradeswitch.ear//org.zkoss.bind.impl.BindContextUtil.newBindContext(BindContextUtil.java:37)
                      at deployment.Tradeswitch.ear//org.zkoss.bind.impl.BinderImpl.doCommand(BinderImpl.java:1730)
                      at deployment.Tradeswitch.ear//org.zkoss.bind.impl.BinderImpl.access$1300(BinderImpl.java:132)
                      at deployment.Tradeswitch.ear//org.zkoss.bind.impl.BinderImpl$CommandEventListener.onEvent0(BinderImpl.java:1605)
                      at deployment.Tradeswitch.ear//org.zkoss.bind.impl.BinderImpl$CommandEventListener.onEvent(BinderImpl.java:1558)
                      at deployment.Tradeswitch.ear//org.zkoss.zk.ui.AbstractComponent.onEvent(AbstractComponent.java:3168)
                      at deployment.Tradeswitch.ear//org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:3138)
                      at deployment.Tradeswitch.ear//org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:3080)
                      at deployment.Tradeswitch.ear//org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:138)
                      at deployment.Tradeswitch.ear//org.zkoss.zk.ui.impl.UiEngineImpl.processEvent(UiEngineImpl.java:1846)
                      at deployment.Tradeswitch.ear//org.zkoss.zk.ui.impl.UiEngineImpl.process(UiEngineImpl.java:1618)
                      at deployment.Tradeswitch.ear//org.zkoss.zk.ui.impl.UiEngineImpl.execUpdate(UiEngineImpl.java:1321)
                      at deployment.Tradeswitch.ear//org.zkoss.zk.au.http.DHtmlUpdateServlet.process(DHtmlUpdateServlet.java:611)
                      at deployment.Tradeswitch.ear//org.zkoss.zk.au.http.DHtmlUpdateServlet.doGet(DHtmlUpdateServlet.java:487)
                      at deployment.Tradeswitch.ear//org.zkoss.zk.au.http.DHtmlUpdateServlet.doPost(DHtmlUpdateServlet.java:495)
                      at javax.servlet.api@1.0.2.Final//javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
                      at javax.servlet.api@1.0.2.Final//javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
                      at io.undertow.servlet@2.0.9.Final//io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:74)
      
      

      Expected Result

      no exception

      Debug Info

      the import package check has been removed from tomcat
      https://github.com/apache/tomcat/blame/trunk/java/javax/el/ImportHandler.java#L125

      Packages.getPackage() is deprecated since JDK 9
      classLoader.getResource("java.lang") returns null

      Workaround

      patch ImportHandler.importPackage()

        Attachments

          Activity

            People

            • Assignee:
              CharlesQiu CharlesQiu
              Reporter:
              cor3000 cor3000
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 1 day Original Estimate - 1 day
                1d
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day, 1 hour
                1d 1h