Open piotrkot opened 8 years ago
Also tried defining region explicitly with new Credentials.Simple("cUniqueSessionID", "", "us-west-2")
but the exception was the same.
FYI: I am running jcabi-dynamo v0.20.
@piotrkot looks like table users
is not created. you should post your entire code, maybe I'll be able to help
@yegor256 The table seems to be fine. It was created from JS shell command with following instructions:
var params = {
TableName: 'users',
KeySchema: [
{
AttributeName: 'name',
KeyType: 'HASH',
}
],
AttributeDefinitions: [
{
AttributeName: 'name',
AttributeType: 'S',
}
],
ProvisionedThroughput: {
ReadCapacityUnits: 1,
WriteCapacityUnits: 1,
},
};
dynamodb.createTable(params, function(err, data) {
if (err) ppJson(err); // an error occurred
else ppJson(data); // successful response
});
Later I checked this table description and it also seems fine (listed in the first comment). As I said I was able to add item into the table from JavaScript shell but not from jcabi-dynamo.
@yegor256 That is all the code I have. JS to create a table, JS to check table description (to verify its OK), JS to add an item, and Java code to add the item with jcabi-dynamo. The Java code throws exception. The JS code are original snippets that the local shell (localhost:8000/shell) generated for me.
@yegor256 It is really simple to reproduce. Please, let me know what you are missing.
@yegor256 ping
@dmarkov @yegor256 ping
@piotrkot honestly, I have no idea what's wrong. Obviously, jcabi-dynamo works fine with DynamoDBLocal, you can see them in a few projects, for example here: https://github.com/yegor256/jare All I can suspect is that you drop your DynamoDBLocal before running Java tests. Make sure it's not happening.
I have a similar problem with local dynamoDB and I use python. Initially table was all right, i created it, put items in it, and was able to scan() or query(). And after a while, the table will just disappear and become 'non-exisiting'... I'm pretty confused since I run it locally, so there shouldn't be any user or region problem (:зゝ∠)
ps: i tested dynamoDB local previous ( create a table, restart the machine, and the table was still there. Hum)
I've got the same problem, it's pretty strange as the table is obviously created and present, but jvm app connected to that endpoint cannot see the table https://github.com/akka/akka-persistence-dynamodb/issues/47#issuecomment-334290000
Resolved here https://stackoverflow.com/a/29560004/306488
com.amazonaws.services.dynamodbv2.model.ResourceNotFoundException: Cannot do operations on a non-existent table (Service: AmazonDynamoDBv2; Status Code: 400; Error Code: ResourceNotFoundException; Need help
I am running local dynamoDB (2016-05-17) on port 8000. As described here the local jar file is created - cUniqueSessionID_us-west-2.db. New table - users - was successfully created from local Javascript shell
I am able to add an item to the table from local Javascript shell but not from jcabi-dynamo.
This is not working although I think it should: