vercel / cosmosdb-server

A Cosmos DB server implementation for testing your applications locally.
MIT License
171 stars 30 forks source link

Support for Java client #17

Open nkzawa opened 5 years ago

nkzawa commented 5 years ago

Seems java client is stricter than node one and doesn't work properly. Maybe we want to add integration tests with the client and ensure it works.

https://github.com/zeit/cosmosdb-server/issues/7#issuecomment-531734111

enverbisevac commented 4 years ago

I am successfully conected with java but when I try to list items in collection error is shown: java.lang.IllegalStateException: com.microsoft.azure.documentdb.DocumentClientException: null, StatusCode: NotFound

nkzawa commented 4 years ago

Thanks for the information. I tried to fix this once but it's still ongoing. Java client sends unexpected requests to the server and don't get why yet.

chrisgolle commented 4 years ago

using spring data, encountering this error, it seems like the client tries to get the defaultconsistency level from cosmos, which is missing in this server

Caused by: java.lang.NullPointerException: Name is null at java.base/java.lang.Enum.valueOf(Enum.java:238) at com.azure.data.cosmos.ConsistencyLevel.valueOf(ConsistencyLevel.java:15) at com.azure.data.cosmos.ConsistencyPolicy.defaultConsistencyLevel(ConsistencyPolicy.java:45) at com.azure.data.cosmos.internal.directconnectivity.GatewayServiceConfigurationReader.lambda$initializeReaderAsync$1(GatewayServiceConfigurationReader.java:146)