Upgrade to 2.0.2: Could not initialize class com.orientechnologies.orient.ODatabaseRecordThreadLocal

227 views
Skip to first unread message

Roar

unread,
Feb 10, 2015, 8:32:16 AM2/10/15
to

I'm testing an upgrade from from 1.7.10 to 2.0.2 using the Migration guide on the Wiki. The only change I had to do was changing the connection pool to OPartitionedDatabasePool. 

We are running OSGI and are embedding all Orientdb bundles and their dependencies into our bundle. I checked that all orientdb bundles included had version 2.0.2

The database is up and running and I tested the url found in the error message from the console.

Here is the exception I'm getting.

org.apache.felix.log.LogException: com.orientechnologies.orient.core.exception.ODatabaseException: Error on opening database 'remote:localhost:2424/mydb'
at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.<init>(ODatabaseDocumentTx.java:195)
at com.orientechnologies.orient.core.db.OPartitionedDatabasePool$DatabaseDocumentTxPolled.<init>(OPartitionedDatabasePool.java:118)
at com.orientechnologies.orient.core.db.OPartitionedDatabasePool$DatabaseDocumentTxPolled.<init>(OPartitionedDatabasePool.java:114)
at com.orientechnologies.orient.core.db.OPartitionedDatabasePool.initQueue(OPartitionedDatabasePool.java:328)
at com.orientechnologies.orient.core.db.OPartitionedDatabasePool.<init>(OPartitionedDatabasePool.java:159)
.
.
Caused by: org.apache.felix.log.LogException: com.orientechnologies.orient.core.exception.ODatabaseException: Error on opening database: localhost:2424/mydb
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at com.orientechnologies.common.log.OLogManager.error(OLogManager.java:193)
at com.orientechnologies.orient.client.remote.OEngineRemote.createStorage(OEngineRemote.java:54)
at com.orientechnologies.orient.core.Orient.loadStorage(Orient.java:476)
at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.<init>(ODatabaseDocumentTx.java:178)
... 27 more
Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.orientechnologies.orient.core.db.ODatabaseRecordThreadLocal
at com.orientechnologies.orient.core.record.impl.ODocument.setup(ODocument.java:2193)
at com.orientechnologies.orient.core.record.impl.ODocument.<init>(ODocument.java:107)
at com.orientechnologies.orient.client.remote.OStorageRemote.<init>(OStorageRemote.java:104)
at com.orientechnologies.orient.client.remote.OStorageRemote.<init>(OStorageRemote.java:128)
at com.orientechnologies.orient.client.remote.OEngineRemote.createStorage(OEngineRemote.java:47)
... 29 more

It looks like the main issue here is 'Could not initialize class com.orientechnologies.orient.core.db.ODatabaseRecordThreadLocal'. And since we are using OSGI and it is very sensitive to classloader changes we suspect that problem may be related to this.

BTW. Running the exact same test using the old ODatabaseDocumentPool instead of OPartitionedDatabasePool worked just fine.

Any suggestions or fixes that can help are appreciated.

Thanks,
/Roar


Emanuel

unread,
Feb 11, 2015, 9:41:13 AM2/11/15
to orient-...@googlegroups.com
Hi,

We have already stumbled on this bug, we have an issue here : https://github.com/orientechnologies/orientdb/issues/3501

is some problem on class loading with static initialization, tnks for reporting it anyway


On 10/02/15 13:32, Roar wrote:

I'm testing an upgrade from from 1.7.10 to 2.0.2 using the Migration guide on the Wiki. The only change I had to do make changing the connection pool.
--

---
You received this message because you are subscribed to the Google Groups "OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to orient-databa...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Roar

unread,
Mar 23, 2015, 7:54:30 AM3/23/15
to orient-...@googlegroups.com
Hi,

Tried again today with 2.0.5 and had the same issue:

java.lang.NoClassDefFoundError: Could not initialize class com.orientechnologies.orient.core.db.ODatabaseRecordThreadLocal

Are there any plans to fix this issue? I'm stuck on 1.7.10 as long as this doesn't work and I really need to upgrade since I think that it will solve another issue we have with this error:

Caused by: com.orientechnologies.common.concur.lock.OLockException: Error on releasing a non acquired lock by the requester 'Thread[OrientDB <- BinaryClient (/127.0.0.1:55130),5,OrientDB]' against the resource: '#72:130'

Regards,
Roar
Reply all
Reply to author
Forward
0 new messages