-
Notifications
You must be signed in to change notification settings - Fork 871
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invisible classes in OSGi environment #7772
Comments
@Dmitry-PlainID the second part is OK for me, what about the first part? Did you remove static initializer right? I am afraid that this change is not safe. Why did you do that? |
First, it fix a problem with NoClassDefFound exception (I don't know how, but it fact) |
@Dmitry-PlainID , it is already initialized in your application lifecycle, but some applications can startup and shutdown OrientDB engine several times. Could you send me your OSGi deployment so I will run it? |
I use Karaf 4.1.2 as OSGi framework. This is very simple test project, that contains Activator and TestCommand. Change in Activator ORIENTDB_HOME on you path. Install OrientDB modules/bundels and its dependences. It's not simple, I used for it karaf feature project. Build it - mvn install Start karaf - bin/karaf.sh Install my simple test bundle - install -s mvn:com.test/test-orientdb/0.0.1-SNAPSHOT |
No more answers? |
@Dmitry-PlainID we are busy by issues with higher priority once we finish them we will back to this one )). |
@Dmitry-PlainID I have tried to build project which you provided. But as result I have got:
could you help me to fix that? |
Instead of junk in osgi.bnd(it should not be binary file) put following text: |
@Dmitry-PlainID now I have got following error, could you help me to resolve it?
|
Perhaps I used pre-configured environment. Run following steps: feature:install pax-http-whiteboard install -s mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.ant/1.7.0_6 feature:repo-add mvn:com.test/orientdb-features/0.0.1-SNAPSHOT/xml/features |
@Dmitry-PlainID it is fixed in 2.2.x, could you build the latest snapshot from |
I checked, it works. Thanks. |
@Dmitry-PlainID could you try again ? |
need to reopen issue because of binary compatibility issues I will provide new version very soon. |
@Dmitry-PlainID could you try again ? |
I checked, It still works |
@Dmitry-PlainID thank you very much for the help. We plan to release 2.2.30 in two weeks, of course, this fix will be included. |
OrientDB Version: 2.2.27
Java Version: 1.8
OS: Mac os
After installing OrientDB in OSGi environment (I use karat 4.1.2) I stuck with some problems:
java.lang.NoClassDefFoundError: Could not initialize class com.orientechnologies.orient.core.db.ODatabaseRecordThreadLocal
at com.orientechnologies.orient.server.OSystemDatabase.init(OSystemDatabase.java:147) ~[?:?]
at com.orientechnologies.orient.server.OSystemDatabase.(OSystemDatabase.java:44) ~[?:?]
at com.orientechnologies.orient.server.OServer.initSystemDatabase(OServer.java:1290) ~[?:?]
at com.orientechnologies.orient.server.OServer.activate(OServer.java:352) ~[?:?]
To fix it I removed static section in ODatabaseRecordThreadLocal class.
Because I use Embedded & Distributed mode, orientdb-core indirectly uses orientdb-distributed module.
In particular classes from com.orientechnologies.orient.server.distributed.impl,
com.orientechnologies.orient.server.distributed.impl.task packages, that is not exportable.
To fix it I added “,com.orientechnologies.orient.server.distributed.impl.*” in <osgi.export> property of orientdb-distributed
pom.xml and
“com.orientechnologies.orient.server.distributed.impl;resolution:=optional,
com.orientechnologies.orient.server.distributed.impl.task;resolution:=optional,” in <osgi.import> property of orientdb-core
pom.xml
Now bundles started and database synchronized with remote node.
Could you add those changes to next version.
The text was updated successfully, but these errors were encountered: