On 4/17/10 2:44, Norbert Somlai wrote:
I will need consult on this question but I think the main reason was that
this is private legacy code of our client in many JARs and a million
packages (@Chris: yes, we tried BND on them and it generated 200K manifest
files on some of them), from which we use a few only but we wanted to skip
the tedious process of mapping their dependencies. I guess the developers
were just looking for a way so that they don't have to touch them. :-)
Taking shortcuts is rarely the best way. Using a modularity layer, but
trying to avoid the restrictions it imposes seems somewhat
contradictory. Regarding BND, you don't have to have it export
everything. You can specify a BND file that tells it to embed all the
packages from the library using Private-Package, but only export a
subset using Export-Package, both of which can use wildcards. Of course,
you'll still need to examine the metadata to make sure you export
everything used by the specified exported packages...not sure if BND
will complain about this or not.
On the question of our issue being caused by a wrong import: our setup works
fine in Equinox. We use Pax for testing and that fails with Felix. Also set
up a usual Felix installation to try and that refuses to work as well. I
know Felix is somewhat more picky on the manifest format (for example,
Equinox seems to accept extension=framework while Felix needs ':=' ), so it
may be some typo as well. The problem is it does not complain and debug mode
doesn't give us anything out of the ordinary either. Will keep
investigating.
Depends on how Equinox is configured...I am not sure if they are still
automatically boot delegating and to which class loader, but if so that
could explain why it works. If you want to investigate some more, try to
run your example on Equinox using the Felix launcher, that way we will
know everything is configured the same. For example:
java -cp /path/to/equinox.jar:./bin/felix.jar
org.apache.felix.main.Main
If you perform this command in the Felix install directory, it will
launch Equinox using the Felix launcher and configuration file (assuming
you are using a recent version of Equinox).
See if it still works, if so, then see if you can tell me how to
recreate the scenario or send me privately your bundles to debug it.
-> richard
Richard S. Hall wrote:
However, it seems this entire approach is incorrect. The primary purpose
of bundles is to share common JAR libraries, so why don't you just
package them as a normal bundle and import them in the client bundles?
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@felix.apache.org
For additional commands, e-mail: users-h...@felix.apache.org