[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-1334?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13535673#comment-13535673
 ] 

Claus Ibsen commented on ZOOKEEPER-1334:
----------------------------------------

Installing zookeeper 3.5.0 JAR in Karaf 2.3.0 works fine now with that patch

{code}
[  58] [Active     ] [            ] [   80] ZooKeeper Bundle (3.5.0)
[  59] [Active     ] [            ] [   80] The Netty Project (3.5.1.Final)
karaf@root> headers 58

ZooKeeper Bundle (58)
---------------------
Manifest-Version = 1.0
Main-Class = org.apache.zookeeper.server.quorum.QuorumPeer
Ant-Version = Apache Ant 1.8.2
Built-By = davsclaus
Built-At = 12/19/2012 05:44 GMT
Built-On = davsclaus.lan
Implementation-Version = 3.5.0--1
Implementation-Vendor = The Apache Software Foundation
Implementation-Title = org.apache.zookeeper
Created-By = 1.6.0_37-b06-434-11M3909 (Apple Inc.)

Bundle-Vendor = The Apache Software Foundation
Bundle-Name = ZooKeeper Bundle
Bundle-DocURL = http://hadoop.apache.org/zookeeper
Bundle-SymbolicName = org.apache.hadoop.zookeeper
Bundle-Version = 3.5.0
Bundle-License = http://www.apache.org/licenses/LICENSE-2.0.txt
Bundle-ManifestVersion = 2

Import-Package = 
        javax.management;resolution:=optional,
        org.slf4j;version="[1.6,2)",
        org.jboss.netty.buffer;resolution:=optional;version="[3.2,4)",
        org.jboss.netty.channel;resolution:=optional;version="[3.2,4)",
        org.jboss.netty.channel.group;resolution:=optional;version="[3.2,4)",
        
org.jboss.netty.channel.socket.nio;resolution:=optional;version="[3.2,4)",
        org.osgi.framework;resolution:=optional;version="[1.5,2)",
        org.osgi.util.tracker;resolution:=optional;version="[1.4,2)"
Export-Package = 
        org.apache.zookeeper;version=3.5.0,
        org.apache.zookeeper.client;version=3.5.0,
        org.apache.zookeeper.data;version=3.5.0,
        org.apache.zookeeper.version;version=3.5.0,
        org.apache.zookeeper.server;version=3.5.0,
        org.apache.zookeeper.server.auth;version=3.5.0,
        org.apache.zookeeper.server.persistence;version=3.5.0,
        org.apache.zookeeper.server.quorum;version=3.5.0

{code}
                
> Zookeeper 3.4.x is not OSGi compliant - MANIFEST.MF is flawed
> -------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1334
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1334
>             Project: ZooKeeper
>          Issue Type: Bug
>    Affects Versions: 3.4.0
>            Reporter: Claus Ibsen
>            Assignee: Jean-Baptiste Onofré
>             Fix For: 3.5.0
>
>         Attachments: zookeeper-1334-osgi.patch, ZOOKEEPER-1334.patch
>
>
> In Zookeeper 3.3.x you use log4j for logging, and the maven dep is
> eg from 3.3.4
> {code}
>     <dependency>
>       <groupId>log4j</groupId>
>       <artifactId>log4j</artifactId>
>       <version>1.2.15</version>
>       <scope>compile</scope>
>     </dependency>
> {code}
> Now in 3.4.0 or better you changed to use slf4j also/instead. The maven 
> pom.xml now includes:
> {code}
>   <dependency>
>       <groupId>org.slf4j</groupId>
>       <artifactId>slf4j-api</artifactId>
>       <version>1.6.1</version>
>       <scope>compile</scope>
>     </dependency>
>     <dependency>
>       <groupId>org.slf4j</groupId>
>       <artifactId>slf4j-log4j12</artifactId>
>       <version>1.6.1</version>
>       <scope>compile</scope>
>     </dependency>
>     <dependency>
>       <groupId>log4j</groupId>
>       <artifactId>log4j</artifactId>
>       <version>1.2.15</version>
>       <scope>compile</scope>
>     </dependency>
> {code}
> But the META-INF/MANIFEST.MF file in the distribution did not change to 
> reflect this.
> The 3.3.4 MANIFEST.MF, import packages
> {code}
> Import-Package: javax.management,org.apache.log4j,org.osgi.framework;v
>  ersion="[1.4,2.0)",org.osgi.util.tracker;version="[1.1,2.0)"
> {code}
> And the 3.4.1 MANIFEST.MF, import packages:
> {code}
> Import-Package: javax.management,org.apache.log4j,org.osgi.framework;v
>  ersion="[1.4,2.0)",org.osgi.util.tracker;version="[1.1,2.0)"
> {code}
> This makes using zookeeper 3.4.x in OSGi environments not possible, as we get 
> NoClassDefFoundException for slf4j classes.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to