Uploaded image for project: 'Netty'
  1. Netty
  2. NETTY-376

Manifest not present in the first entry of the zip

    Details

      Description

      When using Apache Karaf 2.1.2, with the features.xml as below, to install Netty bundle in the OSGi framework it get a failure. It due to a disorder in the re-packaging the JAR file using Antrun to remove examples classes.

      Apache Karaf shell
      {{
      karaf@root> features:install netty
      Error executing command: Manifest not present in the first entry of the zip
      }}

      features.xml

        <feature name='netty' version="${netty-version}">
          <bundle>mvn:http://repository.jboss.org/nexus/content/groups/public!org.jboss.netty/netty/${netty-version}</bundle>
        </feature>
      

      JAR listing

      Before the patch...

      {{
      Archive: /Users/rmarins/.m2/repository/org/jboss/netty/netty/3.2.3.Final/netty-3.2.3.Final.jar
      Length Date Time Name
      -------- ---- ---- ----
      0 10-25-10 17:11 META-INF/
      0 10-25-10 17:11 META-INF/license/
      0 10-25-10 17:11 META-INF/maven/
      0 10-25-10 17:11 META-INF/maven/org.jboss.netty/
      0 10-25-10 17:11 META-INF/maven/org.jboss.netty/netty/
      0 10-25-10 17:11 org/
      0 10-25-10 17:11 org/jboss/
      0 10-25-10 17:11 org/jboss/netty/
      0 10-25-10 17:11 org/jboss/netty/bootstrap/
      0 10-25-10 17:11 org/jboss/netty/buffer/
      0 10-25-10 17:11 org/jboss/netty/channel/
      0 10-25-10 17:11 org/jboss/netty/channel/group/
      0 10-25-10 17:11 org/jboss/netty/channel/local/
      0 10-25-10 17:11 org/jboss/netty/channel/socket/
      0 10-25-10 17:11 org/jboss/netty/channel/socket/http/
      0 10-25-10 17:11 org/jboss/netty/channel/socket/nio/
      0 10-25-10 17:11 org/jboss/netty/channel/socket/oio/
      0 10-25-10 17:11 org/jboss/netty/container/
      0 10-25-10 17:11 org/jboss/netty/container/microcontainer/
      0 10-25-10 17:11 org/jboss/netty/container/osgi/
      0 10-25-10 17:11 org/jboss/netty/container/spring/
      0 10-25-10 17:11 org/jboss/netty/handler/
      0 10-25-10 17:11 org/jboss/netty/handler/codec/
      0 10-25-10 17:11 org/jboss/netty/handler/codec/base64/
      0 10-25-10 17:11 org/jboss/netty/handler/codec/compression/
      0 10-25-10 17:11 org/jboss/netty/handler/codec/embedder/
      0 10-25-10 17:11 org/jboss/netty/handler/codec/frame/
      0 10-25-10 17:11 org/jboss/netty/handler/codec/http/
      0 10-25-10 17:11 org/jboss/netty/handler/codec/http/websocket/
      0 10-25-10 17:11 org/jboss/netty/handler/codec/oneone/
      0 10-25-10 17:11 org/jboss/netty/handler/codec/protobuf/
      0 10-25-10 17:11 org/jboss/netty/handler/codec/replay/
      0 10-25-10 17:11 org/jboss/netty/handler/codec/rtsp/
      0 10-25-10 17:11 org/jboss/netty/handler/codec/serialization/
      0 10-25-10 17:11 org/jboss/netty/handler/codec/string/
      0 10-25-10 17:11 org/jboss/netty/handler/execution/
      0 10-25-10 17:11 org/jboss/netty/handler/logging/
      0 10-25-10 17:11 org/jboss/netty/handler/queue/
      0 10-25-10 17:11 org/jboss/netty/handler/ssl/
      0 10-25-10 17:11 org/jboss/netty/handler/stream/
      0 10-25-10 17:11 org/jboss/netty/handler/timeout/
      0 10-25-10 17:11 org/jboss/netty/logging/
      0 10-25-10 17:11 org/jboss/netty/util/
      0 10-25-10 17:11 org/jboss/netty/util/internal/
      0 10-25-10 17:11 org/jboss/netty/util/internal/jzlib/
      714 10-25-10 17:10 META-INF/COPYRIGHT.txt
      11358 10-25-10 17:10 META-INF/LICENSE.txt
      8942 10-25-10 17:11 META-INF/MANIFEST.MF
      3305 10-25-10 17:10 META-INF/NOTICE.txt
      1017 10-25-10 17:10 META-INF/jboss-beans.xml
      1592 10-25-10 17:10 META-INF/license/LICENSE.base64.txt
      10174 10-25-10 17:10 META-INF/license/LICENSE.commons-logging.txt
      10174 10-25-10 17:10 META-INF/license/LICENSE.felix.txt
      26441 10-25-10 17:10 META-INF/license/LICENSE.jboss-logging.txt
      1592 10-25-10 17:10 META-INF/license/LICENSE.jsr166y.txt
      1465 10-25-10 17:10 META-INF/license/LICENSE.jzlib.txt
      10174 10-25-10 17:10 META-INF/license/LICENSE.log4j.txt
      1732 10-25-10 17:10 META-INF/license/LICENSE.protobuf.txt
      1203 10-25-10 17:10 META-INF/license/LICENSE.slf4j.txt
      135 10-25-10 17:11 META-INF/maven/org.jboss.netty/netty/pom.properties
      23846 10-25-10 17:10 META-INF/maven/org.jboss.netty/netty/pom.xml
      }}

      After the patch...

      {{
      Archive: /Workspace/netty/target/netty-4.0.0.Alpha1-SNAPSHOT.jar
      Length Date Time Name
      -------- ---- ---- ----
      0 12-23-10 09:10 META-INF/
      107 12-23-10 09:10 META-INF/MANIFEST.MF
      0 12-23-10 09:10 META-INF/license/
      0 12-23-10 09:10 META-INF/maven/
      0 12-23-10 09:10 META-INF/maven/org.jboss.netty/
      0 12-23-10 09:10 META-INF/maven/org.jboss.netty/netty/
      0 12-23-10 09:10 org/
      0 12-23-10 09:10 org/jboss/
      0 12-23-10 09:10 org/jboss/netty/
      0 12-23-10 09:10 org/jboss/netty/bootstrap/
      0 12-23-10 09:10 org/jboss/netty/buffer/
      0 12-23-10 09:10 org/jboss/netty/channel/
      0 12-23-10 09:10 org/jboss/netty/channel/group/
      0 12-23-10 09:10 org/jboss/netty/channel/local/
      0 12-23-10 09:10 org/jboss/netty/channel/socket/
      0 12-23-10 09:10 org/jboss/netty/channel/socket/http/
      0 12-23-10 09:10 org/jboss/netty/channel/socket/nio/
      0 12-23-10 09:10 org/jboss/netty/channel/socket/oio/
      0 12-23-10 09:10 org/jboss/netty/container/
      0 12-23-10 09:10 org/jboss/netty/container/microcontainer/
      0 12-23-10 09:10 org/jboss/netty/container/osgi/
      0 12-23-10 09:10 org/jboss/netty/container/spring/
      0 12-23-10 09:10 org/jboss/netty/handler/
      0 12-23-10 09:10 org/jboss/netty/handler/codec/
      0 12-23-10 09:10 org/jboss/netty/handler/codec/base64/
      0 12-23-10 09:10 org/jboss/netty/handler/codec/compression/
      0 12-23-10 09:10 org/jboss/netty/handler/codec/embedder/
      0 12-23-10 09:10 org/jboss/netty/handler/codec/frame/
      0 12-23-10 09:10 org/jboss/netty/handler/codec/http/
      0 12-23-10 09:10 org/jboss/netty/handler/codec/http/websocket/
      0 12-23-10 09:10 org/jboss/netty/handler/codec/oneone/
      0 12-23-10 09:10 org/jboss/netty/handler/codec/protobuf/
      0 12-23-10 09:10 org/jboss/netty/handler/codec/replay/
      0 12-23-10 09:10 org/jboss/netty/handler/codec/rtsp/
      0 12-23-10 09:10 org/jboss/netty/handler/codec/serialization/
      0 12-23-10 09:10 org/jboss/netty/handler/codec/string/
      0 12-23-10 09:10 org/jboss/netty/handler/execution/
      0 12-23-10 09:10 org/jboss/netty/handler/logging/
      0 12-23-10 09:10 org/jboss/netty/handler/queue/
      0 12-23-10 09:10 org/jboss/netty/handler/ssl/
      0 12-23-10 09:10 org/jboss/netty/handler/stream/
      0 12-23-10 09:10 org/jboss/netty/handler/timeout/
      0 12-23-10 09:10 org/jboss/netty/logging/
      0 12-23-10 09:10 org/jboss/netty/util/
      0 12-23-10 09:10 org/jboss/netty/util/internal/
      0 12-23-10 09:10 org/jboss/netty/util/internal/jzlib/
      714 12-23-10 09:10 META-INF/COPYRIGHT.txt
      11358 12-23-10 09:10 META-INF/LICENSE.txt
      3305 12-23-10 09:10 META-INF/NOTICE.txt
      1017 04-27-10 11:41 META-INF/jboss-beans.xml
      1592 12-23-10 09:10 META-INF/license/LICENSE.base64.txt
      10174 12-23-10 09:10 META-INF/license/LICENSE.commons-logging.txt
      10174 12-23-10 09:10 META-INF/license/LICENSE.felix.txt
      26441 12-23-10 09:10 META-INF/license/LICENSE.jboss-logging.txt
      1592 12-23-10 09:10 META-INF/license/LICENSE.jsr166y.txt
      1465 12-23-10 09:10 META-INF/license/LICENSE.jzlib.txt
      10174 12-23-10 09:10 META-INF/license/LICENSE.log4j.txt
      1732 12-23-10 09:10 META-INF/license/LICENSE.protobuf.txt
      1203 12-23-10 09:10 META-INF/license/LICENSE.slf4j.txt
      146 12-23-10 09:10 META-INF/maven/org.jboss.netty/netty/pom.properties
      23842 12-23-10 09:09 META-INF/maven/org.jboss.netty/netty/pom.xml
      }}

      Solution

      Use the <jar> antrun task instead of <zip>, which makes more sense, and will put the Manifest file in the correct entry order.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                trustin Trustin Lee
                Reporter:
                rafael.marins Rafael Marins
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: