Reputation: 692
I am trying to configure apache oak with mongo db. I am using newest dependencies:
<dependency>
<groupId>org.apache.jackrabbit</groupId>
<artifactId>oak-core</artifactId>
<version>1.68.0</version>
</dependency>
<dependency>
<groupId>org.apache.jackrabbit</groupId>
<artifactId>oak-jcr</artifactId>
<version>1.68.0</version>
</dependency>
<dependency>
<groupId>org.apache.jackrabbit</groupId>
<artifactId>oak-store-document</artifactId>
<version>1.68.0</version>
</dependency>
<dependency>
<groupId>org.mongodb</groupId>
<artifactId>mongodb-driver-sync</artifactId>
<version>5.1.4</version>
</dependency>
According to official documentation https://jackrabbit.apache.org/oak/docs/nodestore/document/mongo-document-store.html I should use MongoDB 5.0 version. The problem is that the example code that is on the official documentation page that initializes DocumentNodeStore uses com.mongodb.MongoClient
which is available in 3.x mongodb driver
DocumentNodeStore store = new MongoDocumentNodeStoreBuilder() .setMongoDB("mongodb://localhost:27017", "oak", 0).build();
After downgrading the driver to 3.12.14 I get different error java.lang.ClassNotFoundException: com.mongodb.operation.ReadOperation
Is this a bug or am I doing something wrong?
Upvotes: 0
Views: 62