mapdb icon indicating copy to clipboard operation
mapdb copied to clipboard

OSGi

Open jankotek opened this issue 8 years ago • 3 comments

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

  • show quoted text - Hello.

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 avatar Mar 02 '17 06:03 jankotek

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

jankotek avatar Apr 20 '17 05:04 jankotek

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

sdlzhd avatar Apr 20 '21 08:04 sdlzhd

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

hope everything is fine

sdlzhd avatar Apr 20 '21 08:04 sdlzhd