Comments (6)
@sgireddy these are end to end integration tests and require a valid endpoint.
Which endpoint are you using?
from azure-cosmosdb-java.
I am using a live cosmosdb on azure (mongoDB endpoint)
Also, the original code sample came with version "0.9.0-SNAPSHOT" but maven central has "0.9.0-rc2" which I believe the latest. I was trying to build the master branch ("0.9.0-SNAPSHOT"), deploy locally but got the following error, could you help setting up gpg secret key?
INFO] Building jar: /Users/shashigireddy/code/git/azure-documentdb-rxjava/azure-documentdb-rx/target/azure-documentdb-rx-0.9.0-SNAPSHOT-javadoc.jar
[INFO]
[INFO] --- maven-gpg-plugin:1.6:sign (sign-artifacts) @ azure-documentdb-rx ---
gpg: no default secret key: No secret key
gpg: signing failed: No secret key
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 13.906 s
[INFO] Finished at: 2017-11-28T16:24:48-08:00
[INFO] Final Memory: 31M/103M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-gpg-plugin:1.6:sign (sign-artifacts) on project azure-documentdb-rx: Exit code: 2 -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
from azure-cosmosdb-java.
Tried building azure-documentdb-rx project with my own gpg key then building examples project build worked fine but I am seeing runtime errors (below). I removed target & jars from maven local repo (tried with and without gpg goal in mvn build). Didn't work.
java.lang.SecurityException: class "com.microsoft.azure.documentdb.BridgeInternal"'s signer information does not match signer information of other classes in the same package
at java.lang.ClassLoader.checkCerts(ClassLoader.java:898)
at java.lang.ClassLoader.preDefineClass(ClassLoader.java:668)
at java.lang.ClassLoader.defineClass(ClassLoader.java:761)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at com.microsoft.azure.documentdb.rx.internal.RxDocumentClientImpl.<init>(RxDocumentClientImpl.java:200)
at com.microsoft.azure.documentdb.rx.AsyncDocumentClient$Builder.build(AsyncDocumentClient.java:174)
at com.microsoft.azure.documentdb.rx.examples.DatabaseAndCollectionCreationAsyncAPITest.setUp(DatabaseAndCollectionCreationAsyncAPITest.java:97)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
java.lang.NullPointerException
at com.microsoft.azure.documentdb.rx.examples.DatabaseAndCollectionCreationAsyncAPITest.shutdown(DatabaseAndCollectionCreationAsyncAPITest.java:111)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:33)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
from azure-cosmosdb-java.
java.lang.SecurityException: class "com.microsoft.azure.documentdb.BridgeInternal"'s signer information does not match signer information of other classes in the same package
You are getting this because com.microsoft.azure:azure-documentdb-rx has dependency and also some shared packages with com.microsoft.azure:azure-documentdb. So signing with Microsoft keys are required otherwise java security policy will complain.
Short term solution:
If you want to build com.microsoft.azure:azure-documentdb-rx yourself either disable java's security feature or remove the signature from com.microsoft.azure:azure-documentdb.
you can remove signature from the main package (not safe for prod):
find $HOME/.m2/repository/com/microsoft/azure/azure-documentdb -iname '.jar' -exec sh -c 'zip -d "{}" META-INF/.SF META-INF/*.RSA' ; || echo "maybe already fixed and cached!"
Long term solution:
We are making some improvement which should be out in early 2018 and should fix this.
from azure-cosmosdb-java.
Thank you for details on gpg key issue.
Looks like my issue is related to the port number on the end point. The following endpoint (without port number) works perfectly fine using .Net connector:
<add key="endpoint" value="https://xxxxxxxxxx.documents.azure.com" />
But not using RxJava, got following:
[rxdocdb-computation1] WARN com.microsoft.azure.documentdb.rx.internal.RetryFunctionFactory - unknown failure, cannot retry [port out of range:-1], attempt number [1]
java.lang.IllegalArgumentException: port out of range:-1
I have been trying 8081 but it was supposed to be 443. Using endpoint https://xxxxxxxxxx.documents.azure.com:443 worked fine.
Ideally it should automatically infer the port number 443 when the protocol is https. I am not blocked anymore so I am ok to close the issue or let it open until the library automatically infer the default port number.
from azure-cosmosdb-java.
@sgireddy you seems to be unblocked for now. The other issue (port has to be explicitly passed) that's a limitation for the java sdk right now. We will fix it. Thanks.
from azure-cosmosdb-java.
Related Issues (20)
- In flight http request during failover not moving to other available region
- storePhysicalAddress is null - V2 Java Async SDK HOT 2
- Reliable connection configuration for Azure functions consumption plan HOT 1
- Bump to >2.4.0 yields DocumentClientException/ Request url is invalid. HOT 1
- QueryPlan should be a read request
- Add support of getDuration for Queries in Cosmos Diagnostics - V4 Java Cosmos SDK HOT 1
- FR Add an option to SQL API @Container to set auto scaling = true
- Duplicate results when DISTINCT querying
- "sortedRanges" exception when querying Unique Key IN list HOT 1
- I'm not able to see which branch is for latest version of V3 version (3.7.5) HOT 6
- Connection leak with Cosmos DB client SDK HOT 2
- Getting 404 even though cosmos has document
- Netty issue while using azure cosmos in android
- ETag Check in Cosmos SDK V4 batch
- Including "uri" in the Diagnostic logs
- 同学,您这个项目引入了119个开源组件,存在41个漏洞,辛苦升级一下
- Fail to reach global gateway HOT 1
- This repo is missing important files
- Direct Connectivity Issue from VNET SpringApps to CosmosDB HOT 2
- Java SDK not returning cumulative RU for operations with retries HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from azure-cosmosdb-java.