Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-3642

ZK can't work with Java unified expression language standard implementation

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Later
    • Resolution: Fixed
    • Affects Version/s: 8.0.4.2
    • Fix Version/s: 8.5.0
    • Component/s: None
    • Labels:
      None

      Description

      Steps to Reproduce

      1. put attached jar into your project
      2. load the zul

      Current Result

      java.lang.ClassCastException: de.odysseus.el.ExpressionFactoryImpl cannot be cast to org.zkoss.zel.ExpressionFactory
      at org.zkoss.zel.ExpressionFactory.newInstance(ExpressionFactory.java:187) ~[zel-8.0.2.1-Eval.jar:8.0.2.1]
      at org.zkoss.zel.ExpressionFactory.newInstance(ExpressionFactory.java:106) ~[zel-8.0.2.1-Eval.jar:8.0.2.1]
      at org.zkoss.zel.Util.getExpressionFactory(Util.java:126) ~[zel-8.0.2.1-Eval.jar:8.0.2.1]

      Expected Result

      no error

      Root Cause

      In org.zkoss.zel.ExpressionFactory.discoverClassName(), it gets a class name from service API first getClassNameServices(), so it will get de.odysseus.el.ExpressionFactoryImpl from juel-spi-2.2.7.jar.
      Since org.zkoss.zel.ExpressionFactory is not a Java EE standard class, no standard implementation can be cast into it. Hence, get a class name from service API might not get something useful.

      Workaround

      • remove className = getClassNameServices(tccl); and override ExpressionFactory
      1. 3642.zul
        0.2 kB
        hawk

        Issue Links

          Activity

          Hide
          DevChu DevChu added a comment -

          Fixed since 2017/07/13

          Show
          DevChu DevChu added a comment - Fixed since 2017/07/13

            People

            • Assignee:
              rudyhuang rudyhuang
              Reporter:
              hawk hawk
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 5 hours, 30 minutes
                5h 30m