Getting Started

103 views
Skip to first unread message

Matthew

unread,
May 5, 2014, 11:55:56 AM5/5/14
to orient-...@googlegroups.com
All,

Just learning about OrientDB. I've searched for Java code examples, and have built the following simple example:

        ODatabaseDocumentTx db = new ODatabaseDocumentTx("local:/home/user/orientdb-community-1.7-rc2/databases/test");
        if( !db.exists()) {
            db.create();
        }
        else {
            db.open("admin", "admin");
        }
        ODocument doc = db.newInstance();
        doc.field("name", "Firstname");
        doc.field("surname", "Lastname");
        doc.save();
        db.close();

But, I keep getting the following error when I create the Database

java.lang.AbstractMethodError: com.orientechnologies.orient.core.index.ODefaultIndexFactory.createIndex(Lcom/orientechnologies/orient/core/db/record/ODatabaseRecord;Ljava/lang/String;)Lcom/orientechnologies/orient/core/index/OIndexInternal;
at com.orientechnologies.orient.core.index.OIndexes.createIndex(OIndexes.java:120)
at com.orientechnologies.orient.core.index.OIndexManagerShared.createIndex(OIndexManagerShared.java:89)
at com.orientechnologies.orient.core.index.OIndexManagerAbstract.create(OIndexManagerAbstract.java:159)
at com.orientechnologies.orient.core.index.OIndexManagerProxy.create(OIndexManagerProxy.java:47)
at com.orientechnologies.orient.core.metadata.OMetadata.create(OMetadata.java:83)
at com.orientechnologies.orient.core.db.record.ODatabaseRecordAbstract.create(ODatabaseRecordAbstract.java:195)
at com.orientechnologies.orient.core.db.ODatabaseWrapperAbstract.create(ODatabaseWrapperAbstract.java:55)
at com.orientechnologies.orient.core.db.ODatabaseRecordWrapperAbstract.create(ODatabaseRecordWrapperAbstract.java:58)

Any insight into what I may be doing wrong would really be helpful.

Thanks,
Matthew

Marc Tigges

unread,
May 5, 2014, 12:20:51 PM5/5/14
to orient-...@googlegroups.com
Which version of orientdb/tinkerpop dependencies do you use?

If i compile your code it works, i just get a simple warning:

Mai 05, 2014 6:18:28 PM com.orientechnologies.common.log.OLogManager log
WARNUNG: Current implementation of storage does not support sbtree collections


Matthew

unread,
May 5, 2014, 1:19:11 PM5/5/14
to orient-...@googlegroups.com
com.orientechnologies:orientdb-client:1.6.5
com.orientechnologies:orientdb-enterprise:1.6.5
com.tinkerpop.blueprints:blueprints-orient-graph:2.4.0
com.tinkerpop.gremlin:gremlin-groovy:2.4.0
com.tinkerpop.gremlin:gremlin-java:2.4.0
com.tinkerpop.:pipes:2.4.0

Marc Tigges

unread,
May 5, 2014, 2:13:41 PM5/5/14
to orient-...@googlegroups.com

Matthew

unread,
May 5, 2014, 3:34:28 PM5/5/14
to orient-...@googlegroups.com
Thank you for pointing out the obvious of which I was somehow blind. My maven repository search in Intellij only found up to 1.6.5.
I created a library to the lib path of my orientdb install root directory and it ran great.
Help much appreciated!

Matthew

Matthew Hailstone

unread,
May 12, 2014, 1:21:59 PM5/12/14
to orient-...@googlegroups.com
I'm still getting errors coming back to following the simple example on the tutorial page:


OrientGraphFactory factory = new OrientGraphFactory("plocal:test");
OrientGraph graph = factory.getTx();
Exception in thread "main" com.orientechnologies.orient.core.exception.OQueryParsingException: Error on parsing query at position #6: Error on parsing query
Query:  OUser where name = 'admin' limit 1
-----------^
at com.orientechnologies.orient.core.sql.filter.OSQLTarget.<init>(OSQLTarget.java:70)
at com.orientechnologies.orient.core.sql.OSQLEngine.parseTarget(OSQLEngine.java:292)
at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.parse(OCommandExecutorSQLSelect.java:129)
at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.parse(OCommandExecutorSQLSelect.java:1)
at com.orientechnologies.orient.core.sql.OCommandExecutorSQLDelegate.parse(OCommandExecutorSQLDelegate.java:49)
at com.orientechnologies.orient.core.sql.OCommandExecutorSQLDelegate.parse(OCommandExecutorSQLDelegate.java:1)
at com.orientechnologies.orient.core.storage.OStorageEmbedded.command(OStorageEmbedded.java:86)
at com.orientechnologies.orient.core.sql.query.OSQLQuery.run(OSQLQuery.java:69)
at com.orientechnologies.orient.core.sql.query.OSQLSynchQuery.run(OSQLSynchQuery.java:82)
at com.orientechnologies.orient.core.query.OQueryAbstract.execute(OQueryAbstract.java:29)
at com.orientechnologies.orient.core.metadata.security.OSecurityShared.getUser(OSecurityShared.java:181)
at com.orientechnologies.orient.core.metadata.security.OSecurityShared.authenticate(OSecurityShared.java:148)
at com.orientechnologies.orient.core.metadata.security.OSecurityProxy.authenticate(OSecurityProxy.java:83)
at com.orientechnologies.orient.core.db.record.ODatabaseRecordAbstract.open(ODatabaseRecordAbstract.java:128)
at com.orientechnologies.orient.core.db.ODatabaseWrapperAbstract.open(ODatabaseWrapperAbstract.java:49)
at com.tinkerpop.blueprints.impls.orient.OrientGraphFactory.getDatabase(OrientGraphFactory.java:67)
at com.tinkerpop.blueprints.impls.orient.OrientGraphFactory.getTx(OrientGraphFactory.java:47)
at Test.test(Test.java:49)
at Test.main(Test.java:75)
Caused by: com.orientechnologies.orient.core.exception.OCommandExecutionException: Class 'OUSER' was not found in current database
at com.orientechnologies.orient.core.sql.filter.OSQLTarget.extractTargets(OSQLTarget.java:161)
at com.orientechnologies.orient.core.sql.filter.OSQLTarget.<init>(OSQLTarget.java:61)
... 18 more

Configured libraries:
com.tinkerpop.blueprints:blueprints-orient-graph:2.4.0
com.tinkerpop.gremlin:gremlin-groovy:2.4.0
com.tinkerpop.gremlin:gremlin-java:2.4.0
com.tinkerpop:pipes:2.4.0
Orient DB 1.7rc2 (orientdb-community-1.7-rc2/lib)

I created and can access the "test" database through the HTML studio client view: http://localhost:2480/studio/index.html#/

Thoughts?

Thanks,
Matthew



--

---
You received this message because you are subscribed to a topic in the Google Groups "OrientDB" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/orient-database/ELXrIuwd6u4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to orient-databa...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
<iframe src="http://media.ldscdn.org/book-of-mormon-app/jesus-in-america/jesus-christ-300x250.html" width="300" height="250"></iframe>

Luca Garulli

unread,
May 12, 2014, 1:49:10 PM5/12/14
to orient-database
Hi Matthew,
Why are you using BP 2.4.0 with OrientDB 1.7-rc2? I suggest you to use OrientDB 1.7-SNAPSHOT, that has BP 2.5.0 bundled.

Lvc@



Lvc@


--

---
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.

Matthew Hailstone

unread,
May 12, 2014, 2:35:47 PM5/12/14
to orient-...@googlegroups.com
Luca,

I am working now. Thank you.

Matthew
Reply all
Reply to author
Forward
0 new messages