[GitHub] [zookeeper] JiriOndrusek commented on issue #945: [ZOOKEEPER-3389] Zookeeper does not export all required packages in OSGi (needed for curator)
JiriOndrusek commented on issue #945: [ZOOKEEPER-3389] Zookeeper does not export all required packages in OSGi (needed for curator) URL: https://github.com/apache/zookeeper/pull/945#issuecomment-493061694 @nkalmar Solution #2 seems to be feasible - I've just tried simple prototype in different branch: https://github.com/JiriOndrusek/zookeeper/commits/zookeeper-osgi-module This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [zookeeper] JiriOndrusek commented on issue #945: [ZOOKEEPER-3389] Zookeeper does not export all required packages in OSGi (needed for curator)
JiriOndrusek commented on issue #945: [ZOOKEEPER-3389] Zookeeper does not export all required packages in OSGi (needed for curator) URL: https://github.com/apache/zookeeper/pull/945#issuecomment-493025000 I've sent email to zookeeper-dev mailing list: > ZooKeeper and OSGi (maven) Hi, I 've created issue [1] with missing exported packages in osgi for zookeeper 3.4.10. Then I started to prepare maven OSGi packaging [2] for the higher version of ZooKeeper (in the PR for issue). I've tried to implement OSGi packaging with the low impact. So I've tried to create OSGi bundles from Zookeeper-server and from zookeeper-jute modules. But there is a problem for this solution: zookeeper-jute has package 'org.apache.zookeeper.data', it has to be exported for zookeeper-server to use it zookeeper-server contains also package 'org.apache.zookeeper.data', which has to be exported, because it is used from packages like org.apache.zookeeper, which are exported -> bundles can not be deployed into osgi as two libraries are exporting the same packages Solution: best solution is to change name of one of these packages (probably in module zookeeper-jute - which us used only by zookeeper) - but question is, whether this change is feasible only other solution is to create only one bundle (e.g. zookeeper-osgi), which will contain both libraries together and will expose their both packages at the same time (similar approach is used in e.g. hibernate-osgi, httpcore-osgi, httpclient-osgi) Solution #1 is a better solution, I would like to ask for your opinion about feasibility of renaming zookeeper-jute generated packages to not collide with zookeeper-server. (As these packages are to be used only for zookeeper, it shouldn't cause any harm) If #1 is not acceptable, then we can go with #2. But I highly suggest to consider renaming of zookeeper-jute's packages in the nearest point in the future as possible and return to solution #1. Best regards, jiri [1] https://issues.apache.org/jira/browse/ZOOKEEPER-3389 [2] https://github.com/apache/zookeeper/pull/945 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [zookeeper] JiriOndrusek commented on issue #945: [ZOOKEEPER-3389] Zookeeper does not export all required packages in OSGi (needed for curator)
JiriOndrusek commented on issue #945: [ZOOKEEPER-3389] Zookeeper does not export all required packages in OSGi (needed for curator) URL: https://github.com/apache/zookeeper/pull/945#issuecomment-493017349 @nkalmar I've just asked for subscription to dev mailing list, then I'd be able to send an email there. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [zookeeper] JiriOndrusek commented on issue #945: [ZOOKEEPER-3389] Zookeeper does not export all required packages in OSGi (needed for curator)
JiriOndrusek commented on issue #945: [ZOOKEEPER-3389] Zookeeper does not export all required packages in OSGi (needed for curator) URL: https://github.com/apache/zookeeper/pull/945#issuecomment-493012808 @eolivelli @nkalmar I've found problem with current approach (2 bundles, one is server and second is jute) Problem: - zookeeper-jute has package 'org.apache.zookeeper.data', it has to be exported for zookeeper-server to use it - zookeeper-server contais also package 'org.apache.zookeeper.data', which has to be exported, because it is use from packages like org.apache.zookeeper -> bundles can not be deployed into karaf as two libraries are exporting the same packages Solution: - best solution is to change name of one of these packages (probably in zookeeper-jute - which us used only by zookeeper) - but as @eolivelli wrote: "Yes changing the package name is feasible but only for 3.6+." - only other solution is to create only one bundle (e.g. zookeeper-osgi), which will contain both libraries together and will expose theit both packages at the same time (simillar approach is used in e.g. hibernate-osgi, httpcore-osgi, httpclient-osgi) But with the fact that in the 3.6+ version renaming is possible so we can use solution #1 from 3.6+ as it is a better solution, i would like to ask on your opinion about current version. Is renaming of jute's packages really unreal. Is creation of zookeeper-osgi library the only solution? This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [zookeeper] JiriOndrusek commented on issue #945: [ZOOKEEPER-3389] Zookeeper does not export all required packages in OSGi (needed for curator)
JiriOndrusek commented on issue #945: [ZOOKEEPER-3389] Zookeeper does not export all required packages in OSGi (needed for curator) URL: https://github.com/apache/zookeeper/pull/945#issuecomment-492984271 I was able to install manually zookeeper with curator. But I had to change a little bit export-packages in zookeeper-server, which throws now warning during build about package "org.apache.zookeeper.data". Warning message looks like: zookeeper:bundle:3.6.0-SNAPSHOT : Export org.apache.zookeeper, has 1, private references [org.apache.zookeeper.data] zookeeper:bundle:3.6.0-SNAPSHOT : Export org.apache.zookeeper.cli, has 1, private references [org.apache.zookeeper.data] zookeeper:bundle:3.6.0-SNAPSHOT : Export org.apache.zookeeper.client, has 1, private references [org.apache.zookeeper.data] zookeeper:bundle:3.6.0-SNAPSHOT : Export org.apache.zookeeper.server, has 1, private references [org.apache.zookeeper.data] zookeeper:bundle:3.6.0-SNAPSHOT : Export org.apache.zookeeper.server.auth, has 1, private references [org.apache.zookeeper.data] zookeeper:bundle:3.6.0-SNAPSHOT : Export org.apache.zookeeper.server.quorum, has 1, private references [org.apache.zookeeper.data] zookeeper:bundle:3.6.0-SNAPSHOT : Export org.apache.zookeeper.proto, has 1, private references [org.apache.zookeeper.data] Meaning of this warning is, that some classes from zookeeper (zookeeper.cli, ...) for example returns classes from package "org.apache.zookeeper.data" which is not exported from the bundle. I have to solve this minor thing. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [zookeeper] JiriOndrusek commented on issue #945: [ZOOKEEPER-3389] Zookeeper does not export all required packages in OSGi (needed for curator)
JiriOndrusek commented on issue #945: [ZOOKEEPER-3389] Zookeeper does not export all required packages in OSGi (needed for curator) URL: https://github.com/apache/zookeeper/pull/945#issuecomment-492974467 @nkalmar I've added OSGi support to zookeeper-jute. I had to change pockaging to bundle as well, but in maven environment it behaves still as jar packaging. @eolivelli I think that it is possible to prepare integration test. I'll try to verify both bundles manually (that they could be deployed) I've talked to @grgrzybek and he could possibly help with integration test. I think that current state is, that both jars (z-server and z-jute) are also osgi bundles. Now I plan to fine tuning dependencies during manual installation. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [zookeeper] JiriOndrusek commented on issue #945: [ZOOKEEPER-3389] Zookeeper does not export all required packages in OSGi (needed for curator)
JiriOndrusek commented on issue #945: [ZOOKEEPER-3389] Zookeeper does not export all required packages in OSGi (needed for curator) URL: https://github.com/apache/zookeeper/pull/945#issuecomment-492933860 @eolivelli Ok, i'll continue with osgi packaging. I'll apply this also to zookeeper-jute and somehow solve "the same package name" problem in the way as described in my previous post. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [zookeeper] JiriOndrusek commented on issue #945: [ZOOKEEPER-3389] Zookeeper does not export all required packages in OSGi (needed for curator)
JiriOndrusek commented on issue #945: [ZOOKEEPER-3389] Zookeeper does not export all required packages in OSGi (needed for curator) URL: https://github.com/apache/zookeeper/pull/945#issuecomment-492796520 Hi @nkalmar @eolivelli, let me introduce "a better solution" for the problem with same package's names of zookeeper-jute and zookeeper-server. If I understand it correctly, maven way of solving this problem is acceptable even if it causes problems sometimes. From previous comment - "It's not ideal, and even causes problems like this one with OSGi." Maven solution is that in case that packages DOESN'T contain the same classes - it works as EXPECTED. If it contains the same classes, then classloader return class from jar based on ORDER of jars. (so even if I want clas from jute, I can get class from server) Which is typicalli zookeeper-server and then zookeeper-jute (as jute is dependency from server) I propose to use OSGi merge capability, which brings the same behavior. If someone wants class from that shared package, in case that classes are differen in both jars, this merge "feature" will behave as expected and correct class is returned. In case that there are overlapping classes, we define, which jar has advantage. (so I'd say that zookeeper-server has advantage). IMHO behavior will be a little bit better then in maven, because it will behave always in the same way. (In reality it won't robabnly happen, because the same classes in the shared packages will probably cause problems elsewhere, so everyone will try to avoid that) In other words - behavior of OSGI with merge will be the same as maven if packages contains different classes. If in the future there will be the overlapping classes, behavior in OSGi would be defined (in contrast with maven, where it would ddepend on order of jar loading - so almost "random") Possibly (I'm not sure about it in this time) I can also try to add some insurance/condition, that it will work for 3.5.x only. I mean that after upgrading to higher version of zookeeper, it will cause error during build (or at least warning), so someone will look into it and will find a comment explaining, that correct solution is to rename packages -> which is the correct solution. In case that packages won't be renamed at that time. This condition would allow us to solve problem in 3.5.x time, where packages couldn't be renamed. Just to avoid confusion, this merge capability only defines, how OSGi returns classes if the class is in package, which is shared in more jars. No actuall merging of compiled classes is not happening. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [zookeeper] JiriOndrusek commented on issue #945: [ZOOKEEPER-3389] Zookeeper does not export all required packages in OSGi (needed for curator)
JiriOndrusek commented on issue #945: [ZOOKEEPER-3389] Zookeeper does not export all required packages in OSGi (needed for curator) URL: https://github.com/apache/zookeeper/pull/945#issuecomment-492704512 @nkalmar @eolivelli I'll continue with this tomorrow. I see in your comment: "Those should be all private to ZooKeeper, so we do not change public API" and the fact that jute is another artifact, I see "simple" solution: I'll try to dig up little bit if there is some way, when zookeeper-jute won't export these "private packages". But I have to try some possibilities, how to solve zookeeper-server's dependency on those libraries. I'm not sure whether it will be possible. Current status is: - build changes are only for zookeeper-server to be changed into OSGi bundle, - there are no warnings during build. - I have to validate whether there is some "real" difference between current manifest and manifest generated by ant. As there is a mentioning, that changing packaging from 'jar' to 'bundle' will cause some errors elsewhere. Unfortunately I'm not aware of other way of running OSGi build, but I'll try to look into it also tomorrow. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [zookeeper] JiriOndrusek commented on issue #945: [ZOOKEEPER-3389] Zookeeper does not export all required packages in OSGi (needed for curator)
JiriOndrusek commented on issue #945: [ZOOKEEPER-3389] Zookeeper does not export all required packages in OSGi (needed for curator) URL: https://github.com/apache/zookeeper/pull/945#issuecomment-492672683 @nkalmar @eolivelli I'm getting close to the finishing. I just want to clarify some facts and also ask for the help. - just to be sure, only zookeeper-server jar will be compiled as OSGi bundle? (I see also possible modules jute and recipes, so I would like to be sure) - I'm currently facing a problem with OSGi build, there is a warning that zookeeper-server is exporting package, which is also present in different jar - zookeeper-jute. (Packages org/apache/zookeeper/server/quorum and org/apache/zookeeper/server/persistence) It would help me to know, how these packages should be handled. I looked into package 'quorum' and it seems, that it contains different classes. But even if they are different, it could change in the FUTURE. So I'd like to ask, how to face it - best solution from OSGi would be to change jute to use different package names - but it is probably not possible - best way (from my POV) is to merge packages together (with rule that classes from zookeeper-server has to be treated as primary) - but it can remove some classes which are needed to run and I have also problems to define it with maven-plugin (still not sure why it is not working, I think it should work) - may be it is possible also to ignore these packages from zookeeper-jute - but it doesn't seem much probable What do you think about it? This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [zookeeper] JiriOndrusek commented on issue #945: [ZOOKEEPER-3389] Zookeeper does not export all required packages in OSGi (needed for curator)
JiriOndrusek commented on issue #945: [ZOOKEEPER-3389] Zookeeper does not export all required packages in OSGi (needed for curator) URL: https://github.com/apache/zookeeper/pull/945#issuecomment-492561609 Hi @nkalmar , I've started with osgification of maven build, so far in my branch https://github.com/JiriOndrusek/zookeeper/commits/osgi_in_maven If you've already started with this task also, we can calaborate. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [zookeeper] JiriOndrusek commented on issue #945: [ZOOKEEPER-3389] Zookeeper does not export all required packages in OSGi (needed for curator)
JiriOndrusek commented on issue #945: [ZOOKEEPER-3389] Zookeeper does not export all required packages in OSGi (needed for curator) URL: https://github.com/apache/zookeeper/pull/945#issuecomment-492213488 @eolivelli Hi, I've checked history of build.xml and it is not a regression. Just an issue, which could be seen only after installing Curator 4.1.1 (may be older) in OSGi. For maven: I haven't found any occurrence of OSGi headers in main pom.xml. I'm not sure whether I just misses them -> so only a little fix would be needed or whether it has to be added -> slightly bigger change. I can look into it later this week, is this time horizon acceptable? (I see in comment above "this will be a -1 on the 3.5.5rc6") This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [zookeeper] JiriOndrusek commented on issue #945: [ZOOKEEPER-3389] Zookeeper does not export all required packages in OSGi (needed for curator)
JiriOndrusek commented on issue #945: [ZOOKEEPER-3389] Zookeeper does not export all required packages in OSGi (needed for curator) URL: https://github.com/apache/zookeeper/pull/945#issuecomment-491797203 Hi @eolivelli , I'd like to upgrade also pom, but I'm not able to find any plugin creating OSGi headers in mvn (mainly I'm looking into https://github.com/apache/zookeeper/blob/master/pom.xml) Can you please help me to find it? This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services