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

missing import org.zkoss.zk.ui.sys in zkex osgi bundle

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 8.5.0
    • Fix Version/s: 8.5.2, 8.5.1.2
    • Component/s: None
    • Security Level: Jimmy
    • Labels:

      Description

      Steps to Reproduce

      1. check zkex.osgi.jar/META-INF/MANIFEST.MF/Import-Package

      steps to reproduce with Apache felix

      1. run maven "package" with the attached project zip to produce OSGi jar
      2. start felix by java -jar bin/felix.jar, install the jar in felix with install [file path]
      3. install OSGi zk.jar, zkex.jar 8.5.0
      4. run the information-broker.jar bundle start [bundle id]

      Ref: http://www.hascode.com/2010/07/how-to-create-a-simple-osgi-web-application-using-maven/

      Current Result

      NO org.zkoss.zk.ui.sys specified
      It will cause such error:
      Caused by: org.eclipse.virgo.kernel.osgi.framework.ExtendedNoClassDefFoundError: org/zkoss/zk/ui/sys/ServerPush in KernelBundleClassLoader: [bundle=zkex_8.5.0]

      I can reproduce a similar error under Apache Felix

      org.osgi.framework.BundleException: Activator start error in bundle support.information-broker [22].
      at org.apache.felix.framework.Felix.activateBundle(Felix.java:2290)
      at org.apache.felix.framework.Felix.startBundle(Felix.java:2146)
      at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:998)
      at org.apache.felix.gogo.command.Basic.start(Basic.java:739)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.apache.felix.gogo.runtime.Reflective.invoke(Reflective.java:138)
      at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:91)
      at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:571)
      at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:497)
      at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:386)
      at org.apache.felix.gogo.runtime.Pipe.doCall(Pipe.java:417)
      at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:229)
      at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:59)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      at java.lang.Thread.run(Thread.java:748)
      Caused by: java.lang.NoClassDefFoundError: org/zkoss/zk/ui/sys/ServerPush
      at java.lang.ClassLoader.defineClass1(Native Method)
      at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
      at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.defineClass(BundleWiringImpl.java:2410)
      at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.findClass(BundleWiringImpl.java:2194)
      at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1607)
      at org.apache.felix.framework.BundleWiringImpl.access$200(BundleWiringImpl.java:80)
      at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:2053)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
      at org.apache.felix.framework.BundleWiringImpl.getClassByDelegation(BundleWiringImpl.java:1414)
      at org.apache.felix.framework.BundleWiringImpl.searchImports(BundleWiringImpl.java:1660)
      at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1590)
      at org.apache.felix.framework.BundleWiringImpl.access$200(BundleWiringImpl.java:80)
      at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:2053)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
      at java.lang.ClassLoader.defineClass1(Native Method)
      at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
      at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.defineClass(BundleWiringImpl.java:2410)
      at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.findClass(BundleWiringImpl.java:2194)
      at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1607)
      at org.apache.felix.framework.BundleWiringImpl.access$200(BundleWiringImpl.java:80)
      at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:2053)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
      at support.impl.Activator.start(Activator.java:13)
      at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:697)
      at org.apache.felix.framework.Felix.activateBundle(Felix.java:2240)
      ... 19 more
      Caused by: java.lang.ClassNotFoundException: org.zkoss.zk.ui.sys.ServerPush not found by zkex.nosrc [21]
      at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1639)
      at org.apache.felix.framework.BundleWiringImpl.access$200(BundleWiringImpl.java:80)
      at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:2053)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
      ... 44 more

      Expected Result

      import-package contains org.zkoss.zk.ui.sys

      Workaround

      specify it manually

        Activity

        Hide
        rudyhuang rudyhuang added a comment -

        Fixed since 2018/03/28

        Show
        rudyhuang rudyhuang added a comment - Fixed since 2018/03/28

          People

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

            Dates

            • Created:
              Updated:
              Resolved: