I just tried upgrading to the current 1.7-rc2 SNAPSHOT but in distributed 
mode (single node mode works fine) I keep getting this:

ERROR c.o.o.s.d.ODistributedStorage - Cannot route CREATE_RECORD operation 
against #11:-1 to the distributed node
java.lang.ClassCastException: com.orientechnologies.orient.core.record.impl.
ODocument cannot be cast to com.orientechnologies.orient.core.storage.
OPhysicalPosition
 at com.orientechnologies.orient.server.distributed.ODistributedStorage.
createRecord(ODistributedStorage.java:221) ~[orientdb-server-1.7-rc2-
SNAPSHOT.jar:1.7-rc2-SNAPSHOT]
 at com.orientechnologies.orient.core.db.raw.ODatabaseRaw.save(ODatabaseRaw.
java:268) [orientdb-core-1.7-rc2-SNAPSHOT.jar:1.7-rc2-SNAPSHOT]
 at com.orientechnologies.orient.core.db.record.ODatabaseRecordAbstract.
executeSaveRecord(ODatabaseRecordAbstract.java:885) [orientdb-core-1.7-rc2-
SNAPSHOT.jar:1.7-rc2-SNAPSHOT]
 at com.orientechnologies.orient.core.tx.OTransactionNoTx.saveRecord(
OTransactionNoTx.java:78) [orientdb-core-1.7-rc2-SNAPSHOT.jar:1.7-rc2-
SNAPSHOT]
 at com.orientechnologies.orient.core.db.record.ODatabaseRecordTx.save(
ODatabaseRecordTx.java:274) [orientdb-core-1.7-rc2-SNAPSHOT.jar:1.7-rc2-
SNAPSHOT]
 at com.orientechnologies.orient.core.db.record.ODatabaseRecordTx.save(
ODatabaseRecordTx.java:39) [orientdb-core-1.7-rc2-SNAPSHOT.jar:1.7-rc2-
SNAPSHOT]
 at com.orientechnologies.orient.core.record.ORecordAbstract.save(
ORecordAbstract.java:329) [orientdb-core-1.7-rc2-SNAPSHOT.jar:1.7-rc2-
SNAPSHOT]
 at com.orientechnologies.orient.core.record.impl.ODocument.save(ODocument.
java:1375) [orientdb-core-1.7-rc2-SNAPSHOT.jar:1.7-rc2-SNAPSHOT]
 at com.orientechnologies.orient.core.record.impl.ODocument.save(ODocument.
java:1364) [orientdb-core-1.7-rc2-SNAPSHOT.jar:1.7-rc2-SNAPSHOT]
 at com.orientechnologies.orient.core.record.impl.ODocument.save(ODocument.
java:1353) [orientdb-core-1.7-rc2-SNAPSHOT.jar:1.7-rc2-SNAPSHOT]

The piece of code that is calling that save() method:

    public Map<String, Object> save(Map<String, Object> document) {
        try (ODatabaseDocumentTx db = connect()) {
            ODocument doc = new ODocument().fromJSON(new ObjectMapper().
writeValueAsString(document));
            ODocument saved = doc.save();
            return documentToMap(saved);
        } catch (JsonProcessingException e) {
            // HANDLE
        }
    }

The document I'm sending if just a hashmap with some @class and other key 
value pairs. The connect() method:

    private static ODatabaseDocumentTx connect() {
        return new ODatabaseDocumentTx("plocal:"+DB_LOCATION).open("user", 
"password");
    }

I tried looking for some clues if something change in 1.7-rc2 and I went 
through the bugtrack but couldn't find anything. Am I doing something wrong 
or is it indeed a bug?

The rest of my config is more or less the same as the ones in the docs.

Mateusz

-- 

--- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to