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

unexpectedly loaded metainfo/zk/build in zpoi.jar causes license checking failure

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • 8.5.1
    • 8.5.0
    • None
    • Security Level: Jimmy
    • None
    • ZK 8.5.1 S1
    • None

      problem

      An application that contains both zk-8.5.0.jar and zpoi-3.9.7.jar, but ZK loads zpoi-3.9.7.jar/metainfo/zk/build, therefore show the error message:

      Failed to process
      Your ZK binary is being altered and may not work as expected. Please contact us at [email protected] for assistance.: Error:4665b2bef

      Steps to Reproduce

      1. set breakpoint in AbstractWebApp.loadBuild()
      2. change path's value to "file:/Users/hawk/zk-1app/WEB-INF/lib/zpoi-3.9.7.jar!/metainfo/zk/build"

      Current Result

      a zpoi.jar path passes the check, so ZK will load zpoi.jar's build instead of zk.jar
      "file:/Users/hawk/zk-1app/WEB-INF/lib/zpoi-3.9.7.jar!/metainfo/zk/build".matches("(.)zk-\\d.\\.jar
      !/metainfo/zk/build") returns true

      Since class loader doesn't return an Enumeration with a fixed order in different OS, sometimes zpoi.jar is the first object we visit in the loop.

      Expected Result

      not load build in zpoi.jar

      Debug Info

      • customer's environment wildfly 10.0.0.CR5

      Root Cause

      • in (.)zk-\\d.\\.jar
        !/metainfo/zk/build
        , the dot . after \d is the root cause

      Workaround

      • remove zpoi.jar/metainfo/zk/build

            rudyhuang rudyhuang
            hawk hawk
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 1 hour
                1h
                Remaining:
                Time Spent - 30 minutes Remaining Estimate - 30 minutes
                30m
                Logged:
                Time Spent - 30 minutes Remaining Estimate - 30 minutes
                30m