1
votes

I am new in OrientDB. I have several questions.

1) Where i can find list of current stable version of *.jar libraries to acess OrientDB instance (version 2.0.3). I use java 8 .

I connect to Orient DB from Java Spring. In pom.xml I write such lines:

<dependency>
     <groupId>com.orientechnologies</groupId>
     <artifactId>orientdb-core</artifactId>
     <version>2.0</version> 
</dependency>

<dependency>
    <groupId>com.orientechnologies</groupId>
    <artifactId>orient-commons</artifactId>
    <version>2.0-M1</version> 
</dependency>

<dependency>
     <groupId>com.orientechnologies</groupId>
     <artifactId>orientdb-enterprise</artifactId>
     <version>2.0.2</version> 
</dependency>

<dependency>
    <groupId>com.orientechnologies</groupId>
    <artifactId>orientdb-client</artifactId>
    <version>2.0.2</version> 
</dependency>

And everything is working, unless I add library to work with instance as with graph db

<dependency>
        <groupId>com.orientechnologies</groupId>
        <artifactId>orientdb-graphdb</artifactId>
        <version>2.0.4</version>
</dependency>

If I add "orientdb-graphdb" reference, my code works in wrong way, actually in one my controller where object of "org.codehaus.jackson.node.ObjectNode" is returned, this controller fails. it seems that some error occurs during converting of ObjectNode.

2) I can't sort out how to use both Document and Graph model of OrientDB in one instance. Which *.jar file to use and of which versions.

I think, the course of my troubles is wrong combination of jar files of wrong versions.

1

1 Answers

0
votes

You have mixed the versions as you imagined. You should try having everything at 2.0.5 for example

I had the same issue.. I had to figure it out myself based on what was online in the repositories but it was tough with the latest snapshots when I was reading guidelines from outdated documentation.

Here for the stable ones: http://mvnrepository.com/artifact/com.orientechnologies and here for the snapshot ones: https://oss.sonatype.org/content/repositories/snapshots/com/orientechnologies/

You need to put this one as a dependency:

<dependency> <groupId>com.orientechnologies</groupId> <artifactId>orientdb-graphdb</artifactId> <version>2.0.5</version> </dependency>

and this will fetch orientdb-core and all the others that it needs - so start from that and then add whatever is not in its dependencies that can be found here

In your case for example orientdb-graphdb 2.0.4 was trying to fetch orientdb-core 2.0.4 but you already had the dependency of orientdb-core 2.0.0 in there.

You can have repositories in your pom.xml like that (although I think there are better ways to configure them):

<repositories>
        <repository>
            <id>sonatype-nexus-snapshots</id>
            <name>Sonatype Nexus Snapshots</name>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </repository>
        <repository>
            <id>mvn-repository-com-artifacts</id>
            <name>mvnrepository.com</name>
            <url>http://mvnrepository.com/artifact/</url>
        </repository>
    </repositories>