ORecordNotFoundException in an Embedded Server

88 views
Skip to first unread message

Cod3r

unread,
Dec 26, 2013, 3:21:48 PM12/26/13
to orient-...@googlegroups.com
I have a embedded OrientDB Server in my Application. It is configured like here (http://code.google.com/p/orient/wiki/EmbeddedServer). What i do so far :

 - OObjectDatabaseTx db = new OObjectDatabaseTx(URL).open("root", "root");

Just to say : I have a new Database without any Entries into it.

But while i try to access like show before i got an Error :

Error on creation of shared resource
com.orientechnologies.orient.core.exception.ORecordNotFoundException: The record with id '#0:1' not found


How can i fix these one?

Thanks

Message has been deleted

Cod3r

unread,
Dec 26, 2013, 5:48:07 PM12/26/13
to orient-...@googlegroups.com
Look similar to this one : https://github.com/orientechnologies/orientdb/issues/193

By the Way i tried with the Database :
GratefulDeadConcerts
with the same Errors shown.

Andrey Lomakin

unread,
Dec 27, 2013, 3:36:43 AM12/27/13
to orient-database
Hi,
Do you use local storage ?

If you use plocal, could you provide full stack trace ? Otherwise could you try plocal storage instead ?  



--
 
---
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/groups/opt_out.



--
Best regards,
Andrey Lomakin.

Orient Technologies
the Company behind OrientDB

Cod3r

unread,
Dec 27, 2013, 6:58:40 AM12/27/13
to orient-...@googlegroups.com
Hallo Andrey,

 i use plocal in a Equinox OSGi Bundle.


Here the full stack trace :

Caused by: com.orientechnologies.orient.core.exception.ORecordNotFoundException: The record with id '#0:1' not found
    at com.orientechnologies.orient.core.record.ORecordAbstract.reload(ORecordAbstract.java:294)
    at com.orientechnologies.orient.core.record.impl.ODocument.reload(ODocument.java:374)
    at com.orientechnologies.orient.core.type.ODocumentWrapper.reload(ODocumentWrapper.java:87)
    at com.orientechnologies.orient.core.type.ODocumentWrapperNoClass.reload(ODocumentWrapperNoClass.java:69)
    at com.orientechnologies.orient.core.metadata.schema.OSchemaShared$16.call(OSchemaShared.java:605)
    at com.orientechnologies.orient.core.storage.OStorageAbstract.callInLock(OStorageAbstract.java:185)
    at com.orientechnologies.orient.core.storage.impl.local.paginated.OLocalPaginatedStorage.callInLock(OLocalPaginatedStorage.java:1283)
    at com.orientechnologies.orient.core.metadata.schema.OSchemaShared.load(OSchemaShared.java:600)
    at com.orientechnologies.orient.core.metadata.OMetadataDefault$1.call(OMetadataDefault.java:114)
    at com.orientechnologies.orient.core.metadata.OMetadataDefault$1.call(OMetadataDefault.java:110)
    at com.orientechnologies.common.concur.resource.OSharedContainerImpl.getResource(OSharedContainerImpl.java:53)
    ... 122 more
Caused by: com.orientechnologies.orient.core.exception.ODatabaseException: Error on retrieving record #0:1 (cluster: internal)
    at com.orientechnologies.orient.core.db.raw.ODatabaseRaw.read(ODatabaseRaw.java:250)
    at com.orientechnologies.orient.core.db.record.ODatabaseRecordAbstract.executeReadRecord(ODatabaseRecordAbstract.java:706)
    at com.orientechnologies.orient.core.tx.OTransactionNoTx.loadRecord(OTransactionNoTx.java:63)
    at com.orientechnologies.orient.core.db.record.ODatabaseRecordTx.reload(ODatabaseRecordTx.java:232)
    at com.orientechnologies.orient.core.db.record.ODatabaseRecordTx.reload(ODatabaseRecordTx.java:38)
    at com.orientechnologies.orient.core.record.ORecordAbstract.reload(ORecordAbstract.java:287)
    ... 132 more
Caused by: java.lang.NoClassDefFoundError: org/iq80/snappy/Snappy
    at com.orientechnologies.orient.core.serialization.compression.impl.OSnappyCompression.uncompress(OSnappyCompression.java:39)
    at com.orientechnologies.orient.core.storage.impl.local.paginated.OPaginatedCluster.readRecord(OPaginatedCluster.java:580)
    at com.orientechnologies.orient.core.storage.impl.local.paginated.OLocalPaginatedStorage.readRecord(OLocalPaginatedStorage.java:1121)
    at com.orientechnologies.orient.core.storage.impl.local.paginated.OLocalPaginatedStorage.readRecord(OLocalPaginatedStorage.java:1101)
    at com.orientechnologies.orient.core.db.raw.ODatabaseRaw.read(ODatabaseRaw.java:244)
    ... 137 more
Caused by: java.lang.ClassNotFoundException: org.iq80.snappy.Snappy cannot be found by com.orientechnologies.orientdb-core_1.6.2
    at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
    at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)

Andrey Lomakin

unread,
Dec 27, 2013, 7:35:44 AM12/27/13
to orient-database
Hi,
Problem is bellow,

On Fri, Dec 27, 2013 at 1:58 PM, Cod3r <the3...@gmail.com> wrote:
Caused by: java.lang.NoClassDefFoundError: org/iq80/snappy/Snappy

Could you use gzip compression instead ?
Just set system property -Dstorage.compressionMethod=gzip .

Cod3r

unread,
Dec 27, 2013, 9:00:32 AM12/27/13
to orient-...@googlegroups.com
I add this to my OSGi Framework VM Arguments but the Error still occurs... i cant manipulate the Imports of orientdb-core, but it seems that core try to load it isnt?

Andrey Lomakin

unread,
Dec 27, 2013, 9:32:36 AM12/27/13
to orient-database
Hi,
It is loaded only if you set snappy as compression lib, do you set it without dot ?
Could you check system property value ?

It is old OSGi issue, other users use the same way to avoid it.


--
 
---
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/groups/opt_out.

Cod3r

unread,
Dec 27, 2013, 10:22:43 AM12/27/13
to orient-...@googlegroups.com
Well i never set a Compression library in my Bundle. The System Property into my Run Configurations looks like :

-Dosgi.framework.extensions=org.eclipse.fx.osgi
-Dstorage.compressionMethod=gzip

When i remove the snappy-* jars from my Plugin Folder the OrientDB Core Bundle cannot be resolve.

Or should i add another osgi compression plugin?

Cod3r

unread,
Dec 27, 2013, 11:54:50 AM12/27/13
to orient-...@googlegroups.com
Into my Bundle Activator i also add :


        OGlobalConfiguration.STORAGE_COMPRESSION_METHOD.setValue("gzip");
        OGlobalConfiguration.STORAGE_KEEP_OPEN.setValue(false);

But while using value : gzip or nothing the same Error come...
I try use value : GZIP and i have new Error

Cannot open local storage 'C://orientDB//databases//GratefulDeadConcerts' with mode=rw
java.lang.IllegalArgumentException: Compression with name  GZIP is absent.

Cod3r

unread,
Dec 28, 2013, 6:57:32 AM12/28/13
to orient-...@googlegroups.com
I come out at the end that there is maybe a Right Access Problem.

I'm on Win 8 (64 bit), my Eclipse is running into Administrator Mode.

I'm using the XML Config file for my Embedded Server like in the tutorial :
 - The Server can be started
 - I use the 'GratefulDeadConcerts' original Database
 - System.out.println(db.exists()); return true
 - But when i try to open the database with "db.open("admin", "admin");" i have the Error :  Cannot open local storage 'C:/orientDB/databases/GratefulDeadConcerts' with mode=rw

And my VM :

-Dosgi.framework.extensions=org.eclipse.fx.osgi
-Dstorage.compressionMethod=gzip
-server
-DORIENTDB_HOME=C:/orientDB/
-Dorientdb.config.file=C:/orientDB/config/orientdb-server-config.xml
-Dorientdb.www.path=C:/orientDB/www
-Djava.util.logging.config.file=C:/orientDB/config/orientdb-server-log.properties
-Dcache.level1.enabled=false
-Dprofiler.enabled=true
-Dprofiler.autoDump.reset=true
-Dprofiler.autoDump.interval=10

Any Help?

Thank you

Cod3r

unread,
Dec 29, 2013, 12:21:29 PM12/29/13
to orient-...@googlegroups.com

Any Help? We stuck on this since 3 Days ... Did i miss a point or could someone give me an Advice?


Thanks for any Help. 

odbuser

unread,
Dec 30, 2013, 1:54:31 AM12/30/13
to orient-...@googlegroups.com
I have this working with snappy and equinox without any change to the command line arguments.

Do you have the snappy-0.3.jar as a bundle?  The one that comes with orientdb (1.6.1-1.6.3 at least) is not a bundle.  I used the following manifest

Manifest-Version: 1.0
Bundle-Name:  snappy
Bundle-SymbolicName: org.iq80.snappy
Bundle-Description: Snappy
Bundle-Version: 0.3
Export-Package:
 org.iq80.snappy

orient-core should already have the necessary import "org.iq80.snappy;resolution:=optional".  Make sure snappy is loaded as a bundle and it should work... or you'll be on to your next OSGI import/export issue :0)
Reply all
Reply to author
Forward
0 new messages