Orientdb 3.x with OSGi

Hello,

I’m trying to connect to a standalone orientdb server from a karaf OSGi container.

What I’m missing is a list of bundles that I need to deploy to the OSGi container in order to connect to the database.
I’ve tried deploying different bundles from maven (I’m sure there must have been way to many of them) but I was still unable to start them because there were always dependencies missing.
e.g. at some point
orientdb-client misses jdk.nashorn.api.scripting

I haven’t found anything in the documentation except for the sun.misc package (but that’s not an issue with karaf because it’s already included). I also found some references to orientdb 2 but those seem to be obsolete.

Does anybody use orientdb 3 with OSGi?

Many thanks in advance

Alex

Hi,

I was able to get the client and core bundles to start.
I had to add the jdk.nashorn.api.scripting package to the org.osgi.framework.system.packages.extra property in karaf and I had to deploy the following bundles:
409 │ Active │ 80 │ 3.0.22 │ OrientDB Client
414 │ Active │ 80 │ 3.0.22 │ OrientDB Core
415 │ Active │ 80 │ 1.4.2 │ ConcurrentLinkedHashMap
416 │ Active │ 80 │ 4.2.2 │ jna
418 │ Active │ 80 │ 0 │ lz4-java

Now unfortunately I’m not able to connect to the database because I’m getting this exception:

Caused by: java.lang.ClassNotFoundException: com.orientechnologies.orient.core.db.OrientDBRemote not found by com.orientechnologies.orientdb-core [414]
at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1639) ~[?:?]
at org.apache.felix.framework.BundleWiringImpl.access$200(BundleWiringImpl.java:80) ~[?:?]
at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:2053) ~[?:?]
at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:?]
at com.orientechnologies.orient.core.db.OrientDBInternal.remote(OrientDBInternal.java:84) ~[?:?]
… 40 more

Looking at the 2 bundles core and client I notice that both bundles contain the com.orientechnologies.orient.core.db package, but it is only exported by core not by client thus the OrientDBRemote is not visible.

Alex