jankotek / mapdb

MapDB provides concurrent Maps, Sets and Queues backed by disk storage or off-heap-memory. It is a fast and easy to use embedded Java database engine.
https://mapdb.org
Apache License 2.0
4.9k stars 872 forks source link

OSGi #807

Open jankotek opened 7 years ago

jankotek commented 7 years ago

Hi Jan,

When attempting to use version 3 in an OSGi environment, the system requires all of the compile time dependencies listed in the Import-Package statement in the manifest to be available.

I think this problem would be solved if the compile dependencies were marked as optional in the Import-Package statement.

With version 2, before "Kotlin", I just imported the mapdb source into a my own bundle without any problems and no need for any dependencies.

I would like to move on to version 3 so would it be possible to change this for the next release?

Regards

Paul Fraser Click here to Reply

Feb 14

On 2017-02-11T11:55:06 +1100

In an astounding coincidence, I just yesterday tried to run mapdb in a Felix container. Unfortunately, it didn't work: There is a bug with the current release of the Eclipse collections that mean that not all of the required packages are exported:

https://github.com/eclipse/eclipse-collections/issues/172

The fix for this hasn't made it into a released version yet. This means that, unfortunately, it's not yet possible to resolve the mapdb bundles due to the broken dependency.

M

jankotek commented 7 years ago

another email:

Have you had any success yet with mapdb in OSGi.

I have tried wrapping mapdb-3.0.3.jar and setting all imports to Optional.

It resolves OK but fails when trying db = DBMaker.memoryDB()(dbFilePath.toFile()).make(); as well as any of the other DBMaker methods.

If you are interested , my wrapped file can be downloaded https://www.dropbox.com/s/e9xbcwjt7y900gr/net.qnenet.MapDB-3.wrapped.jar?dl=1

Hopefully, Jan will have an updated bundle in the near future that resolves and runs in an OSGi container.

Regards

sdlzhd commented 3 years ago

This is really bad, there are too many dependencies in 3.x. It is very difficult to start in an OSGi environment. /(ㄒoㄒ)/~~

sdlzhd commented 3 years ago

I read your latest post about working on mapdb-core.

hope everything is fine