Skip to content
This repository has been archived by the owner on Oct 5, 2021. It is now read-only.

trouble with connecting to dynamodb through Java #233

Open
greghines opened this issue Sep 18, 2017 · 2 comments
Open

trouble with connecting to dynamodb through Java #233

greghines opened this issue Sep 18, 2017 · 2 comments
Assignees
Milestone

Comments

@greghines
Copy link

Hi - I have the following Java code which I am trying to use to have Janusgraph connect to the cloud dynamodb (as opposed to the local test version).

import org.apache.commons.configuration.BaseConfiguration;
import com.amazon.janusgraph.diskstorage.dynamodb.DynamoDBStoreManager;
import org.janusgraph.core.JanusGraphFactory;
import org.janusgraph.core.JanusGraph;
.....
BaseConfiguration conf = new BaseConfiguration();
conf.setProperty("storage.backend","com.amazon.janusgraph.diskstorage.dynamodb.DynamoDBStoreManager");
....JanusGraph graph = JanusGraphFactory.open(conf);

The error I'm getting when trying to run is:
"errorMessage": "Could not instantiate implementation: com.amazon.janusgraph.diskstorage.dynamodb.DynamoDBStoreManager",
....
"errorType": "java.lang.NoClassDefFoundError",

Is this a bug or am I missing something? Thought importing com.amazon.janusgraph.diskstorage.dynamodb.DynamoDBStoreManager would be enough - I have dynamodb-janusgraph-storage-backend listed as a dependency in my pom.xml file so everything is compiling just fine.

I've found examples of how to use Gremlin with dynamodb/janusgraph but nothing about how to set things up purely in Java. An example would be greatly appreciated.

@amcp amcp self-assigned this Oct 13, 2017
@amcp
Copy link
Contributor

amcp commented Oct 13, 2017

Can you please provide more context? is the version of the plugin you target in pom.xml available in Maven? Where are you executing this code? if you can point me to a repo on GitHub where you reproduce this issue consistently, that would be extremely helpful.

@amcp
Copy link
Contributor

amcp commented Oct 30, 2017

@greghines If the class is not found, it appears that you have not installed the DynamoDB Storage Backend dependencies in Gremlin server. Did you build the server zip with src/test/resources/install-gremlin-server.sh? Or did you use the vanilla server zip from janusgraph.org?

@amcp amcp added this to the Backlog milestone Oct 30, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants