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

classloading issues with multiple war files

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • 10.0.0, 9.6.3
    • 9.6.0, 9.6.2
    • None
    • Security Level: Jimmy
    • None

      Steps to Reproduce

      the same as ZK-4554

      Current Result

      9.6.0

      java.lang.LinkageError: loader constraint violation in interface itable initialization for class org.zkoss.bind.impl.FormBindingImpl: when selecting method 'org.zkoss.bind.sys.ConditionType org.zkoss.bind.sys.FormBinding.getConditionType()' the class loader org.glassfish.javaee.full.deployment.EarLibClassLoader @538a6426 for super interface org.zkoss.bind.sys.FormBinding, and the class loader org.glassfish.web.loader.WebappClassLoader @618cc878 of the selected method's class, org.zkoss.bind.impl.FormBindingImpl have different Class objects for the type org.zkoss.bind.sys.ConditionType used in the signature (org.zkoss.bind.sys.FormBinding is in unnamed module of loader org.glassfish.javaee.full.deployment.EarLibClassLoader @538a6426, parent loader org.glassfish.internal.api.DelegatingClassLoader @40c1f798; org.zkoss.bind.impl.FormBindingImpl is in unnamed module of loader org.glassfish.web.loader.WebappClassLoader @618cc878, parent loader org.glassfish.javaee.full.deployment.EarClassLoader @4a2e2011)
      

      Expected Result

      no error

      Debug Information

      • The same root cause as ZK-4554
      • since 9.6.0, zkbind-api.jar contains both org.zkoss.bind.sys.Binding and org.zkoss.bind.Binder, no circular reference for this case.
      • in 9.6.0, org.zkoss.bind.sys.PropertyBinding in zkbind-api.jar getConditionType() still depends on org.zkoss.bind.sys.ConditionType in zkbind-impl.jar
      • in 9.6.0, org.zkoss.bind.PhaseListener in zkbind-api.jar prePhase() still depends on org.zkoss.bind.Phase in zkbind-impl.jar

      Workaround

      Bad workaround. manually move org.zkoss.bind.Phase and org.zkoss.bind.sys.ConditionType from zkbind-impl.jar to zkbind-api.jar

            DevChu DevChu
            hawk hawk
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: