OSGi problem

413 views
Skip to first unread message

Felix Mayerhuber

unread,
May 15, 2012, 10:35:14 AM5/15/12
to orient-...@googlegroups.com
Hi @all,

first, grats for releasing version 1.0.0 of this great project :-)

I've upgraded to version 1.0.0 from 1.0.0rc8 but now I've problems starting my component containing the orientdb.
My setup:
one bundle has orient-commons and orientdb-core as dependencies. This two projects are installed in my OSGi environment and are running. When I now want to start my component, I get a ClassNotFoundException.

Caused by: java.lang.NoClassDefFoundError: com/orientechnologies/common/util/OMultiKey
    at com.orientechnologies.orient.core.index.OIndexManagerAbstract.areIndexed(OIndexManagerAbstract.java:307)
    at com.orientechnologies.orient.core.index.OIndexManagerProxy.areIndexed(OIndexManagerProxy.java:104)
    at com.orientechnologies.orient.core.metadata.schema.OClassImpl.areIndexed(OClassImpl.java:964)
    at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.checkIndexExistence(OCommandExecutorSQLSelect.java:952)
    at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.analyzeQueryBranch(OCommandExecutorSQLSelect.java:496)
    at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.searchForIndexes(OCommandExecutorSQLSelect.java:388)
    at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.searchInClasses(OCommandExecutorSQLSelect.java:372)
    at com.orientechnologies.orient.core.sql.OCommandExecutorSQLResultsetAbstract.assignTarget(OCommandExecutorSQLResultsetAbstract.java:130)
    at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.assignTarget(OCommandExecutorSQLSelect.java:220)
    at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.executeSearch(OCommandExecutorSQLSelect.java:206)
    at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.execute(OCommandExecutorSQLSelect.java:196)
    at com.orientechnologies.orient.core.sql.OCommandExecutorSQLDelegate.execute(OCommandExecutorSQLDelegate.java:54)
    at com.orientechnologies.orient.core.storage.OStorageEmbedded.command(OStorageEmbedded.java:64)
    at com.orientechnologies.orient.core.sql.query.OSQLQuery.run(OSQLQuery.java:68)
    at com.orientechnologies.orient.core.sql.query.OSQLSynchQuery.run(OSQLSynchQuery.java:78)
    at com.orientechnologies.orient.core.query.OQueryAbstract.execute(OQueryAbstract.java:30)
    at com.orientechnologies.orient.core.metadata.security.OSecurityShared.getRole(OSecurityShared.java:129)
    at com.orientechnologies.orient.core.metadata.security.OSecurityShared.createMetadata(OSecurityShared.java:278)
    at com.orientechnologies.orient.core.metadata.security.OSecurityShared.create(OSecurityShared.java:202)
    at com.orientechnologies.orient.core.metadata.security.OSecurityProxy.create(OSecurityProxy.java:37)
    at com.orientechnologies.orient.core.metadata.OMetadata.create(OMetadata.java:68)
    at com.orientechnologies.orient.core.db.record.ODatabaseRecordAbstract.create(ODatabaseRecordAbstract.java:171)
    at com.orientechnologies.orient.core.db.ODatabaseWrapperAbstract.create(ODatabaseWrapperAbstract.java:53)
    at com.orientechnologies.orient.core.db.ODatabaseRecordWrapperAbstract.create(ODatabaseRecordWrapperAbstract.java:54)
    at com.orientechnologies.orient.core.db.graph.OGraphDatabase.create(OGraphDatabase.java:86)
    at org.openengsb.core.ekb.internal.EKBModelGraph.<init>(EKBModelGraph.java:66)
    at org.openengsb.core.ekb.internal.EKBModelGraph.getInstance(EKBModelGraph.java:51)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.6.0_30]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)[:1.6.0_30]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)[:1.6.0_30]
    at java.lang.reflect.Method.invoke(Method.java:597)[:1.6.0_30]
    at org.apache.aries.blueprint.utils.ReflectionUtils.invoke(ReflectionUtils.java:226)[10:org.apache.aries.blueprint:0.3.1]
    at org.apache.aries.blueprint.container.BeanRecipe.invoke(BeanRecipe.java:824)[10:org.apache.aries.blueprint:0.3.1]
    at org.apache.aries.blueprint.container.BeanRecipe.getInstance(BeanRecipe.java:249)[10:org.apache.aries.blueprint:0.3.1]
    ... 22 more
Caused by: java.lang.ClassNotFoundException: com.orientechnologies.common.util.OMultiKey not found by com.orientechnologies.orientdb-core [160]
    at org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:787)
    at org.apache.felix.framework.ModuleImpl.access$400(ModuleImpl.java:71)
    at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1768)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)[:1.6.0_30]
    ... 56 more

Anyone have an idea why this is happening? The setup worked with 1.0rc8. The only thing I changed, was the version.

Kind regards
Felix

Luca Garulli

unread,
May 15, 2012, 12:02:29 PM5/15/12
to orient-...@googlegroups.com
Hi,
have you included the orient-common-1.0.jar in your classpath?

Lvc@

Felix Mayerhuber

unread,
May 15, 2012, 12:18:08 PM5/15/12
to orient-...@googlegroups.com
Hi,

In my OSGi environment I have the two bundles

<dependency>
      <groupId>com.orientechnologies</groupId>
      <artifactId>orient-commons</artifactId>
      <type>bundle</type>
      <version>1.0</version>
</dependency>
<dependency>
      <groupId>com.orientechnologies</groupId>
      <artifactId>orientdb-core</artifactId>
      <type>bundle</type>
      <version>1.0</version>
</dependency>
running and also the same bundles are dependencies of my component. This configuration worked with 1.0rc8, but unfortunately now with 1.0 it doesn't work any more. Is there a new dependency added which need to be included?

Kind regards
Felix

Luca Garulli

unread,
May 15, 2012, 12:38:17 PM5/15/12
to orient-...@googlegroups.com

Gabriel Vince

unread,
May 15, 2012, 12:53:16 PM5/15/12
to orient-...@googlegroups.com
Hi Felix,

from OrientDB 1.0 the core libraries use ServiceLoader to find indexes, so..
what I often do, is a very nasty think - I embed dependencies:
                        <Embed-Dependency>
                            orientdb-client,
                            orient-commons,
                            orientdb-core,
                            orientdb-enterprise,
                            orientdb-object,
                            javassist
                        </Embed-Dependency>

there are several reans to do so
 - you can set up the class loader  (as Luca wrote already)
 - if you are using an object database (persistence), some OSGi containers loose (do not propagate) @Entity class annotation between bundles.

The newest OSGi containers should support ServiceLoader, but I am not aware of details yet. I usually create one service bundle providing services for other bundles and I embed OrientDB libraries in. It works for me.

Carpe diem
         Gabriel



Op dinsdag 15 mei 2012 18:18:08 UTC+2 schreef Felix Mayerhuber het volgende:
Hi,

In my OSGi environment I have the two bundles

<dependency>
      <groupId>com.orientechnologies</groupId>
      <artifactId>orient-commons</artifactId>
      <type>bundle</type>
      <version>1.0</version>
</dependency>
<dependency>
      <groupId>com.orientechnologies</groupId>
      <artifactId>orientdb-core</artifactId>
      <type>bundle</type>
      <version>1.0</version>
</dependency>
running and also the same bundles are dependencies of my component. This configuration worked with 1.0rc8, but unfortunately now with 1.0 it doesn't work any more. Is there a new dependency added which need to be included?

Kind regards
Felix

Am Dienstag, 15. Mai 2012 18:02:29 UTC+2 schrieb Lvc@:
Hi,
have you included the orient-common-1.0.jar in your classpath?

Lvc@

On 15 May 2012 16:35, Felix Mayerhuber
Hi @all,

Luca Garulli

unread,
May 15, 2012, 1:06:58 PM5/15/12
to orient-...@googlegroups.com
Gabriel,
I've updated the WiKi with your suggestions too: http://code.google.com/p/orient/wiki/TroubleshootingJava#Run_in_OSGi_context 

Lvc@

Felix Mayerhuber

unread,
May 15, 2012, 2:20:59 PM5/15/12
to orient-...@googlegroups.com
Hi,

I tried the suggestion of using a different classloader for creating the
database, unfortunately that didn't help.
@Gabriel: Am I correct that adding this dependencies should be placed in
the configuration file? Because I didn't use it, since I just create an
in-memory instance.

So it could be that the problem is, that my OSGi container is too old to
support the class loading?

Kind regards
Felix
>>> <groupId>com.**orientechnologies</groupId>
>>> <artifactId>orient-commons</**artifactId>
>>> <type>bundle</type>
>>> <version>1.0</version>
>>> </dependency>
>>> <dependency>
>>> <groupId>com.**orientechnologies</groupId>
>>> <artifactId>orientdb-core</**artifactId>
>>> <type>bundle</type>
>>> <version>1.0</version>
>>> </dependency>
>>> running and also the same bundles are dependencies of my component. This
>>> configuration worked with 1.0rc8, but unfortunately now with 1.0 it doesn't
>>> work any more. Is there a new dependency added which need to be included?
>>>
>>> Kind regards
>>> Felix
>>>
>>> Am Dienstag, 15. Mai 2012 18:02:29 UTC+2 schrieb Lvc@:
>>>
>>>> Hi,
>>>> have you included the orient-common-1.0.jar in your classpath?
>>>>
>>>> Lvc@
>>>>
>>>> On 15 May 2012 16:35, Felix Mayerhuber
>>>>
>>>>> Hi @all,
>>>>>
>>>>>
>>>>> first, grats for releasing version 1.0.0 of this great project :-)
>>>>>
>>>>> I've upgraded to version 1.0.0 from 1.0.0rc8 but now I've problems
>>>>> starting my component containing the orientdb.
>>>>> My setup:
>>>>> one bundle has orient-commons and orientdb-core as dependencies. This
>>>>> two projects are installed in my OSGi environment and are running. When I
>>>>> now want to start my component, I get a ClassNotFoundException.
>>>>>
>>>>> Caused by: java.lang.**NoClassDefFoundError:
>>>>> com/orientechnologies/common/**util/OMultiKey
>>>>> at com.orientechnologies.orient.**core.index.**
>>>>> OIndexManagerAbstract.**areIndexed(**OIndexManagerAbstract.java:**307)
>>>>> at com.orientechnologies.orient.**core.index.OIndexManagerProxy.**
>>>>> areIndexed(OIndexManagerProxy.**java:104)
>>>>> at com.orientechnologies.orient.**core.metadata.schema.**
>>>>> OClassImpl.areIndexed(**OClassImpl.java:964)
>>>>> at com.orientechnologies.orient.**core.sql.**
>>>>> OCommandExecutorSQLSelect.**checkIndexExistence(**
>>>>> OCommandExecutorSQLSelect.**java:952)
>>>>> at com.orientechnologies.orient.**core.sql.**
>>>>> OCommandExecutorSQLSelect.**analyzeQueryBranch(**
>>>>> OCommandExecutorSQLSelect.**java:496)
>>>>> at com.orientechnologies.orient.**core.sql.**
>>>>> OCommandExecutorSQLSelect.**searchForIndexes(**
>>>>> OCommandExecutorSQLSelect.**java:388)
>>>>> at com.orientechnologies.orient.**core.sql.**
>>>>> OCommandExecutorSQLSelect.**searchInClasses(**
>>>>> OCommandExecutorSQLSelect.**java:372)
>>>>> at com.orientechnologies.orient.**core.sql.**
>>>>> OCommandExecutorSQLResultsetAb**stract.assignTarget(**
>>>>> OCommandExecutorSQLResultsetAb**stract.java:130)
>>>>> at com.orientechnologies.orient.**core.sql.**
>>>>> OCommandExecutorSQLSelect.**assignTarget(**OCommandExecutorSQLSelect.**
>>>>> java:220)
>>>>> at com.orientechnologies.orient.**core.sql.**
>>>>> OCommandExecutorSQLSelect.**executeSearch(**OCommandExecutorSQLSelect.*
>>>>> *java:206)
>>>>> at com.orientechnologies.orient.**core.sql.**
>>>>> OCommandExecutorSQLSelect.**execute(**OCommandExecutorSQLSelect.**
>>>>> java:196)
>>>>> at com.orientechnologies.orient.**core.sql.**
>>>>> OCommandExecutorSQLDelegate.**execute(**OCommandExecutorSQLDelegate.**
>>>>> java:54)
>>>>> at com.orientechnologies.orient.**core.storage.OStorageEmbedded.**
>>>>> command(OStorageEmbedded.java:**64)
>>>>> at com.orientechnologies.orient.**core.sql.query.OSQLQuery.run(**
>>>>> OSQLQuery.java:68)
>>>>> at com.orientechnologies.orient.**core.sql.query.OSQLSynchQuery.**
>>>>> run(OSQLSynchQuery.java:78)
>>>>> at com.orientechnologies.orient.**core.query.OQueryAbstract.**
>>>>> execute(OQueryAbstract.java:**30)
>>>>> at com.orientechnologies.orient.**core.metadata.security.**
>>>>> OSecurityShared.getRole(**OSecurityShared.java:129)
>>>>> at com.orientechnologies.orient.**core.metadata.security.**
>>>>> OSecurityShared.**createMetadata(**OSecurityShared.java:278)
>>>>> at com.orientechnologies.orient.**core.metadata.security.**
>>>>> OSecurityShared.create(**OSecurityShared.java:202)
>>>>> at com.orientechnologies.orient.**core.metadata.security.**
>>>>> OSecurityProxy.create(**OSecurityProxy.java:37)
>>>>> at com.orientechnologies.orient.**core.metadata.OMetadata.**
>>>>> create(OMetadata.java:68)
>>>>> at com.orientechnologies.orient.**core.db.record.**
>>>>> ODatabaseRecordAbstract.**create(**ODatabaseRecordAbstract.java:**171)
>>>>> at com.orientechnologies.orient.**core.db.**
>>>>> ODatabaseWrapperAbstract.**create(**ODatabaseWrapperAbstract.java:**53)
>>>>> at com.orientechnologies.orient.**core.db.**
>>>>> ODatabaseRecordWrapperAbstract**.create(**
>>>>> ODatabaseRecordWrapperAbstract**.java:54)
>>>>> at com.orientechnologies.orient.**core.db.graph.OGraphDatabase.**
>>>>> create(OGraphDatabase.java:86)
>>>>> at org.openengsb.core.ekb.**internal.EKBModelGraph.<init>(**
>>>>> EKBModelGraph.java:66)
>>>>> at org.openengsb.core.ekb.**internal.EKBModelGraph.**
>>>>> getInstance(EKBModelGraph.**java:51)
>>>>> at sun.reflect.**NativeMethodAccessorImpl.**invoke0(Native
>>>>> Method)[:1.6.0_30]
>>>>> at sun.reflect.**NativeMethodAccessorImpl.**invoke(**
>>>>> NativeMethodAccessorImpl.java:**39)[:1.6.0_30]
>>>>> at sun.reflect.**DelegatingMethodAccessorImpl.**invoke(**
>>>>> DelegatingMethodAccessorImpl.**java:25)[:1.6.0_30]
>>>>> at java.lang.reflect.Method.**invoke(Method.java:597)[:1.6.**0_30]
>>>>> at org.apache.aries.blueprint.**utils.ReflectionUtils.invoke(**
>>>>> ReflectionUtils.java:226)[10:**org.apache.aries.blueprint:0.**3.1]
>>>>> at org.apache.aries.blueprint.**container.BeanRecipe.invoke(**
>>>>> BeanRecipe.java:824)[10:org.**apache.aries.blueprint:0.3.1]
>>>>> at org.apache.aries.blueprint.**container.BeanRecipe.**
>>>>> getInstance(BeanRecipe.java:**249)[10:org.apache.aries.**
>>>>> blueprint:0.3.1]
>>>>> ... 22 more
>>>>> Caused by: java.lang.**ClassNotFoundException:
>>>>> com.orientechnologies.common.**util.OMultiKey not found by
>>>>> com.orientechnologies.**orientdb-core [160]
>>>>> at org.apache.felix.framework.**ModuleImpl.**
>>>>> findClassOrResourceByDelegatio**n(ModuleImpl.java:787)
>>>>> at org.apache.felix.framework.**ModuleImpl.access$400(**
>>>>> ModuleImpl.java:71)
>>>>> at org.apache.felix.framework.**ModuleImpl$ModuleClassLoader.**
>>>>> loadClass(ModuleImpl.java:**1768)
>>>>> at java.lang.ClassLoader.**loadClass(ClassLoader.java:**

Felix Mayerhuber

unread,
May 15, 2012, 2:38:16 PM5/15/12
to orient-...@googlegroups.com
additional info: I use a simple OGraphDatabase where I add simple strings as fields, which I generate in that component. So the loading of entities is not the problem.

Kind regards
Felix

Gabriel Vince

unread,
May 16, 2012, 5:36:10 AM5/16/12
to orient-...@googlegroups.com
Hi Felix,

Correct, the Embed-Dependency belongs to a pom.xml file under plugin(maven-bundle-plugin)/configuration/instructions.

To create an in-memory graph database you need the dependencies anyway. Well, if you're using a graph database, you don't need the object stuff (javassist, orientdb-object) and if you are connecting to a local database (no network), you don't need the network stuff (orientdb-enterprise, orientdb-client).

Your OSGi container is perfectly normal :) Anyway - most of the operations run ok, but to be sure, aquiring a database connection - try to set the local class loader as suggested in wiki http://code.google.com/p/orient/wiki/TroubleshootingJava#Run_in_OSGi_context.

Good luck
         Gabriel



Op dinsdag 15 mei 2012 20:20:59 UTC+2 schreef Felix Mayerhuber het volgende:
Hi,

I tried the suggestion of using a different classloader for creating the
database, unfortunately that didn't help.
@Gabriel: Am I correct that adding this dependencies should be placed in
the configuration file? Because I didn't use it, since I just create an
in-memory instance.

So it could be that the problem is, that my OSGi container is too old to
support the class loading?

Kind regards
Felix


Op dinsdag 15 mei 2012 20:20:59 UTC+2 schreef Felix Mayerhuber het volgende:
Hi,

Luca Garulli

unread,
May 16, 2012, 5:42:43 AM5/16/12
to orient-...@googlegroups.com
Hi,
to know more about what to include as jars look at: http://code.google.com/p/orient/wiki/JavaAPI#Which_library_do_I_use? 

Lvc@

Felix Mayerhuber

unread,
May 16, 2012, 5:59:02 AM5/16/12
to orient-...@googlegroups.com
Hi,

thank you both for your help! With the Embed-Dependency + temporary
class loader changing it works like a charm : )

But now one other question arised: When orientdb started without
problems and then my OSGi environment is shutdown, orient db throws
again class not found exceptions:

ERROR: JarContent: Unable to read bytes.
(java.lang.IllegalStateException: zip file closed)
java.lang.IllegalStateException: zip file closed
at java.util.zip.ZipFile.ensureOpen(ZipFile.java:415)
at java.util.zip.ZipFile.getEntry(ZipFile.java:160)
at org.apache.felix.framework.util.ZipFileX.getEntry(ZipFileX.java:52)
at
org.apache.felix.framework.cache.JarContent.getEntryAsBytes(JarContent.java:122)
at
org.apache.felix.framework.ModuleImpl$ModuleClassLoader.findClass(ModuleImpl.java:1816)
at
org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:727)
at org.apache.felix.framework.ModuleImpl.access$400(ModuleImpl.java:71)
at
org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1768)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at com.orientechnologies.orient.core.Orient.shutdown(Orient.java:270)
at
com.orientechnologies.orient.core.OrientShutdownHook.run(OrientShutdownHook.java:28)
Exception in thread "Thread-29" java.lang.NoClassDefFoundError:
com/orientechnologies/common/log/OLogManager
at com.orientechnologies.orient.core.Orient.shutdown(Orient.java:270)
at
com.orientechnologies.orient.core.OrientShutdownHook.run(OrientShutdownHook.java:28)
Caused by: java.lang.ClassNotFoundException:
com.orientechnologies.common.log.OLogManager not found by
org.openengsb.framework.ekb [172]
at
org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:787)
at org.apache.felix.framework.ModuleImpl.access$400(ModuleImpl.java:71)
at
org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1768)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
... 2 more

I assume this is the case, because the installed shutdown hook use the
normal classloader, which in an osgi environment is wrong? Maybe I've
overseen it, but is it possible to deactivate this hook and close the
orient db instance only by myself?

Kind regards
Felix

Luca Garulli

unread,
May 16, 2012, 6:03:48 AM5/16/12
to orient-...@googlegroups.com
Hi,
I don't know what is the problem, maybe Gabriel can provide more help on this, but to remove the hook call:

Orient.instance().removeShutdownHook();

Lvc@

Felix Mayerhuber

unread,
May 16, 2012, 8:17:13 AM5/16/12
to orient-...@googlegroups.com
Hi Luca,

thank you, I've removed the shutdown hook like you posted and made sure
that orientdb is getting closed at the destruction of my component. Also
I done the classloader switch when closing the database. Now I don't get
the exceptions any more :-)

Kind regards,
Felix

Am 2012-05-16 12:03, schrieb Luca Garulli:
> Hi,
> I don't know what is the problem, maybe Gabriel can provide more help on
> this, but to remove the hook call:
>
> Orient.instance().removeShutdownHook();
>
> Lvc@
>
> On 16 May 2012 11:59, Felix Mayerhuber<felix.ma...@gmail.com> wrote:
>
>> Hi,
>>
>> thank you both for your help! With the Embed-Dependency + temporary class
>> loader changing it works like a charm : )
>>
>> But now one other question arised: When orientdb started without problems
>> and then my OSGi environment is shutdown, orient db throws again class not
>> found exceptions:
>>
>> ERROR: JarContent: Unable to read bytes. (java.lang.**IllegalStateException:
>> zip file closed)
>> java.lang.**IllegalStateException: zip file closed
>> at java.util.zip.ZipFile.**ensureOpen(ZipFile.java:415)
>> at java.util.zip.ZipFile.**getEntry(ZipFile.java:160)
>> at org.apache.felix.framework.**util.ZipFileX.getEntry(**
>> ZipFileX.java:52)
>> at org.apache.felix.framework.**cache.JarContent.**
>> getEntryAsBytes(JarContent.**java:122)
>> at org.apache.felix.framework.**ModuleImpl$ModuleClassLoader.**
>> findClass(ModuleImpl.java:**1816)
>> at org.apache.felix.framework.**ModuleImpl.**
>> findClassOrResourceByDelegatio**n(ModuleImpl.java:727)
>>
>> at org.apache.felix.framework.**ModuleImpl.access$400(**
>> ModuleImpl.java:71)
>> at org.apache.felix.framework.**ModuleImpl$ModuleClassLoader.**
>> loadClass(ModuleImpl.java:**1768)
>> at java.lang.ClassLoader.**loadClass(ClassLoader.java:**247)
>> at com.orientechnologies.orient.**core.Orient.shutdown(Orient.**
>> java:270)
>> at com.orientechnologies.orient.**core.OrientShutdownHook.run(**
>> OrientShutdownHook.java:28)
>> Exception in thread "Thread-29" java.lang.**NoClassDefFoundError:
>> com/orientechnologies/common/**log/OLogManager
>> at com.orientechnologies.orient.**core.Orient.shutdown(Orient.**
>> java:270)
>> at com.orientechnologies.orient.**core.OrientShutdownHook.run(**
>> OrientShutdownHook.java:28)
>> Caused by: java.lang.**ClassNotFoundException:
>> com.orientechnologies.common.**log.OLogManager not found by
>> org.openengsb.framework.ekb [172]
>>
>> at org.apache.felix.framework.**ModuleImpl.**
>> findClassOrResourceByDelegatio**n(ModuleImpl.java:787)
>> at org.apache.felix.framework.**ModuleImpl.access$400(**
>> ModuleImpl.java:71)
>> at org.apache.felix.framework.**ModuleImpl$ModuleClassLoader.**
>> loadClass(ModuleImpl.java:**1768)
>> at java.lang.ClassLoader.**loadClass(ClassLoader.java:**247)
>> ... 2 more
>>
>> I assume this is the case, because the installed shutdown hook use the
>> normal classloader, which in an osgi environment is wrong? Maybe I've
>> overseen it, but is it possible to deactivate this hook and close the
>> orient db instance only by myself?
>>
>> Kind regards
>> Felix
>>
>> Am 2012-05-16 11:42, schrieb Luca Garulli:
>>
>> Hi,
>>> to know more about what to include as jars look at:
>>> http://code.google.com/p/**orient/wiki/JavaAPI#Which_**library_do_I_use<http://code.google.com/p/orient/wiki/JavaAPI#Which_library_do_I_use>
>>> ?
>>>
>>> Lvc@
>>>
>>> On 16 May 2012 11:36, Gabriel Vince<gabriel.vince@apogado.**com<gabrie...@apogado.com>>
>>> wrote:
>>>
>>> Hi Felix,
>>>> Correct, the Embed-Dependency belongs to a pom.xml file under
>>>> plugin(maven-bundle-plugin)/**configuration/instructions.
>>>>
>>>> To create an in-memory graph database you need the dependencies anyway.
>>>> Well, if you're using a graph database, you don't need the object stuff
>>>> (javassist, orientdb-object) and if you are connecting to a local
>>>> database
>>>> (no network), you don't need the network stuff (orientdb-enterprise,
>>>> orientdb-client).
>>>>
>>>> Your OSGi container is perfectly normal :) Anyway - most of the
>>>> operations
>>>> run ok, but to be sure, aquiring a database connection - try to set the
>>>> local class loader as suggested in wiki
>>>> http://code.google.com/p/**orient/wiki/**TroubleshootingJava#Run_in_**
>>>> OSGi_context<http://code.google.com/p/orient/wiki/TroubleshootingJava#Run_in_OSGi_context>
Reply all
Reply to author
Forward
0 new messages