You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geode.apache.org by Kirk Lund <kl...@pivotal.io> on 2016/03/23 17:23:20 UTC

RestAPIsWithSSLDUnitTest fails

RestAPIsWithSSLDUnitTest failed in the nightly build. Failure stack is
below. I tried running this test by itself in intellij and it fails
with "java.lang.NoSuchFieldError:
INSTANCE" from "at
org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<init>(DefaultHttpRequestWriterFactory.java:52)".
I posted that failure stack below as well.

Any ideas what the NoSuckFieldError is about?

:geode-assembly:distributedTest

com.gemstone.gemfire.rest.internal.web.controllers.RestAPIsWithSSLDUnitTest
> testMutualAuthentication FAILED
    java.lang.RuntimeException: unexpected exception
        at com.gemstone.gemfire.rest.internal.web.controllers.
RestAPIsWithSSLDUnitTest.validateConnection(RestAPIsWithSSLDUnitTest.java:
495)
        at com.gemstone.gemfire.rest.internal.web.controllers.
RestAPIsWithSSLDUnitTest.testMutualAuthentication(
RestAPIsWithSSLDUnitTest.java:648)

        Caused by:
        javax.net.ssl.SSLHandshakeException: Remote host closed connection
during handshake
            at sun.security.ssl.SSLSocketImpl.readRecord(
SSLSocketImpl.java:992)
            at sun.security.ssl.SSLSocketImpl.waitForClose(
SSLSocketImpl.java:1769)
            at sun.security.ssl.HandshakeOutStream.flush(
HandshakeOutStream.java:124)
            at sun.security.ssl.Handshaker.sendChangeCipherSpec(
Handshaker.java:1083)
            at sun.security.ssl.ClientHandshaker.sendChangeCipherAndFinish(
ClientHandshaker.java:1222)
            at sun.security.ssl.ClientHandshaker.serverHelloDone(
ClientHandshaker.java:1134)
            at sun.security.ssl.ClientHandshaker.processMessage(
ClientHandshaker.java:348)
            at sun.security.ssl.Handshaker.processLoop(Handshaker.java:979)
            at sun.security.ssl.Handshaker.process_record(Handshaker.
java:914)
            at sun.security.ssl.SSLSocketImpl.readRecord(
SSLSocketImpl.java:1062)
            at sun.security.ssl.SSLSocketImpl.performInitialHandshake(
SSLSocketImpl.java:1375)
            at sun.security.ssl.SSLSocketImpl.startHandshake(
SSLSocketImpl.java:1403)
            at sun.security.ssl.SSLSocketImpl.startHandshake(
SSLSocketImpl.java:1387)
            at org.apache.http.conn.ssl.SSLConnectionSocketFactory.
createLayeredSocket(SSLConnectionSocketFactory.java:394)
            at org.apache.http.conn.ssl.SSLConnectionSocketFactory.
connectSocket(SSLConnectionSocketFactory.java:353)
            at org.apache.http.impl.conn.DefaultHttpClientConnectionOpe
rator.connect(DefaultHttpClientConnectionOperator.java:134)
            at org.apache.http.impl.conn.PoolingHttpClientConnectionMan
ager.connect(PoolingHttpClientConnectionManager.java:353)
            at org.apache.http.impl.execchain.MainClientExec.
establishRoute(MainClientExec.java:380)
            at org.apache.http.impl.execchain.MainClientExec.
execute(MainClientExec.java:236)
            at org.apache.http.impl.execchain.ProtocolExec.
execute(ProtocolExec.java:184)
            at org.apache.http.impl.execchain.RetryExec.execute(
RetryExec.java:88)
            at org.apache.http.impl.execchain.RedirectExec.
execute(RedirectExec.java:110)
            at org.apache.http.impl.client.InternalHttpClient.doExecute(
InternalHttpClient.java:184)
            at org.apache.http.impl.client.CloseableHttpClient.execute(
CloseableHttpClient.java:82)
            at org.apache.http.impl.client.CloseableHttpClient.execute(
CloseableHttpClient.java:107)
            at com.gemstone.gemfire.rest.internal.web.controllers.
RestAPIsWithSSLDUnitTest.validateConnection(RestAPIsWithSSLDUnitTest.java:
474)
            ... 1 more

            Caused by:
            java.io.EOFException: SSL peer shut down incorrectly
                at sun.security.ssl.InputRecord.read(InputRecord.java:505)
                at sun.security.ssl.SSLSocketImpl.readRecord(
SSLSocketImpl.java:973)
                ... 26 more

java.lang.NoSuchFieldError: INSTANCE

at
org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<init>(DefaultHttpRequestWriterFactory.java:52)
at
org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<init>(DefaultHttpRequestWriterFactory.java:56)
at
org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<clinit>(DefaultHttpRequestWriterFactory.java:46)
at
org.apache.http.impl.conn.ManagedHttpClientConnectionFactory.<init>(ManagedHttpClientConnectionFactory.java:72)
at
org.apache.http.impl.conn.ManagedHttpClientConnectionFactory.<init>(ManagedHttpClientConnectionFactory.java:84)
at
org.apache.http.impl.conn.ManagedHttpClientConnectionFactory.<clinit>(ManagedHttpClientConnectionFactory.java:59)
at
org.apache.http.impl.conn.PoolingHttpClientConnectionManager$InternalConnectionFactory.<init>(PoolingHttpClientConnectionManager.java:487)
at
org.apache.http.impl.conn.PoolingHttpClientConnectionManager.<init>(PoolingHttpClientConnectionManager.java:147)
at
org.apache.http.impl.conn.PoolingHttpClientConnectionManager.<init>(PoolingHttpClientConnectionManager.java:136)
at
org.apache.http.impl.conn.PoolingHttpClientConnectionManager.<init>(PoolingHttpClientConnectionManager.java:112)
at
org.apache.http.impl.client.HttpClientBuilder.build(HttpClientBuilder.java:726)
at
com.gemstone.gemfire.rest.internal.web.controllers.RestAPIsWithSSLDUnitTest.getSSLBasedHTTPClient(RestAPIsWithSSLDUnitTest.java:458)
at
com.gemstone.gemfire.rest.internal.web.controllers.RestAPIsWithSSLDUnitTest.validateConnection(RestAPIsWithSSLDUnitTest.java:473)
at
com.gemstone.gemfire.rest.internal.web.controllers.RestAPIsWithSSLDUnitTest.testSSLWithoutKeyStoreType(RestAPIsWithSSLDUnitTest.java:522)
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:497)
at junit.framework.TestCase.runTest(TestCase.java:176)
at junit.framework.TestCase.runBare(TestCase.java:141)
at junit.framework.TestResult$1.protect(TestResult.java:122)
at junit.framework.TestResult.runProtected(TestResult.java:142)
at junit.framework.TestResult.run(TestResult.java:125)
at junit.framework.TestCase.run(TestCase.java:129)
at junit.framework.TestSuite.runTest(TestSuite.java:252)
at junit.framework.TestSuite.run(TestSuite.java:247)
at
org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:86)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at
com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
at
com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:234)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:74)
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:497)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)

Re: RestAPIsWithSSLDUnitTest fails

Posted by Udo Kohlmeyer <uk...@pivotal.io>.
Also you can tell your Idea to fresh the libs by using the refresh in 
the gradle menu.



On 24/03/2016 7:45 am, John Blum wrote:
> I.e. ... "File" -> "New" -> "Project from Existing Sources..." -> <select
> your Geode working directory> -> "Import project from external model" ->
> "Gradle"
>
> I don't trust Gradle to do the right thing when setting up an IDE
> (especially as the IDE versions change).
>
> Disclaimer: I have not tried this recently, but I usually have more success
> going this route.
>
> -John
>
>
> On Wed, Mar 23, 2016 at 1:40 PM, John Blum <jb...@pivotal.io> wrote:
>
>> Kirk- rather than have Gradle generate the .idea project files, have you
>> tried importing the Geode project from existing sources using Gradle the
>> template?
>>
>> On Wed, Mar 23, 2016 at 1:28 PM, Kirk Lund <kl...@pivotal.io> wrote:
>>
>>> RestAPIsWithSSLDUnitTest passes on the command-line.
>>>
>>> When I execute RestAPIsWithSSLDUnitTest in my IntelliJ project, the
>>> classpath of the test prints out with two versions of httpclient and
>>> httpcore:
>>>
>>> [vm_1]
>>>
>>>   /Users/klund/.gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpclient/4.2.5/666e26e76f2e87d84e4f16acb546481ae1b8e9a6/httpclient-4.2.5.jar
>>> [vm_1]
>>>
>>>   /Users/klund/.gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpcore/4.2.4/3b7f38df6de5dd8b500e602ae8c2dd5ee446f883/httpcore-4.2.4.jar
>>> [vm_1]
>>>
>>>   /Users/klund/.gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpclient/4.5.1/7e3cecc566df91338c6c67883b89ddd05a17db43/httpclient-4.5.1.jar
>>> [vm_1]
>>>
>>>   /Users/klund/.gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpcore/4.4.3/e876a79d561e5c6207b78d347e198c8c4531a5e5/httpcore-4.4.3.jar
>>>
>>> If you use "./gradlew idea" the resulting module definitions are not
>>> sufficient (to illustrate, try generating intellij projects for
>>> closed+open
>>> and then try editing and running DUnits in legacyDUnit and both assembly
>>> projects) and require some manual adjusting which is obviously error
>>> prone.
>>> I'm not an IntelliJ or gradle expert so I doubt that I'll be the one to
>>> fix
>>> this.
>>>
>>> Ultimately I'd like to see all of this become easier and simpler. I
>>> believe
>>> too much complexity or difficulty will result in a smaller number of
>>> contributors. It also results in contributors spending their time with
>>> gradle or the IDE instead of on geode.
>>>
>>> -Kirk
>>>
>>>
>>> On Wed, Mar 23, 2016 at 12:04 PM, Dan Smith <ds...@pivotal.io> wrote:
>>>
>>>> First off, your intellij classpath and gradle classpath are pretty much
>>> the
>>>> same. The one exception, I think, is that the test target for
>>>> geode-assembly sets up a different runtime classpath to point at the
>>>> bundled product. I didn't set that up, but I think maybe the idea is
>>> that
>>>> we needed some tests of the actual bundled binary? Take a look at
>>>> geode-assembly/build.gradle. If someone knows how to fix the setup that
>>> so
>>>> we still have that test coverage of the bundled product and the tests do
>>>> work in intellij, please fix it! All of the rest of the tests should be
>>>> using exactly the same environment on the command line and in the IDE.
>>>>
>>>> I'm not sure if this is even your problem Kirk, did you try running from
>>>> the command line?
>>>>
>>>> Second, I don't see anything wrong with having transitive test
>>>> dependencies. It's a huge pain to track down the transitive dependencies
>>>> and keep them up to date manually. They aren't hurting you!
>>>>
>>>> Regarding John's struggles with dependencies of geode, what we really
>>> need
>>>> to do is clean up *product* dependencies of geode core - we're pulling
>>> in
>>>> all sorts of stuff for gfsh, pulse, the REST API, etc. GEODE-818 is all
>>>> about cleaning that up. I was hoping to take up GEODE-1072 (remove HDFS
>>>> code) when I get a chance. If you want to clean up the dependencies
>>> please
>>>> chip in and take on some of those subtasks, the sooner the better!
>>>>
>>>> -Dan
>>>>
>>>> On Wed, Mar 23, 2016 at 11:34 AM, John Blum <jb...@pivotal.io> wrote:
>>>>
>>>>> If you created the IntelliJ IDEA project from the Gradle build, then
>>> it
>>>> is
>>>>> Geode's Gradle build scripts that are specifying the dependencies and
>>>> thus
>>>>> the Gradle build scripts are wrong.  In Maven, you can declare a
>>>>> dependencyManagement section (along with exclusions) to manage
>>> transitive
>>>>> dependencies.  I don't recall what the equivalent is in Gradle for
>>>>> dependencyManagement.
>>>>>
>>>>> On Wed, Mar 23, 2016 at 11:24 AM, Kirk Lund <kl...@pivotal.io> wrote:
>>>>>
>>>>>> I think that maybe we don't want to continue with transitive
>>>> dependencies
>>>>>> enabled for testing. If we turn that off then we go back to having
>>> to
>>>>>> specify all versions even runtime test dependencies right? Are there
>>>> any
>>>>>> valid arguments for keeping transitive dependencies enabled for
>>>> testing?
>>>>>> Also, why would my intellij dependencies be different from gradle
>>>>>> command-line? The one was built from the *.gradle files in geode. If
>>>>>> intellij's gradle picks up multiple versions of libraries, then I
>>> think
>>>>>> that still means something isn't right in our *.gradle files.
>>>>>>
>>>>>> Not that I want to see test failures... BUT, I want to spend my time
>>>>>> diagnosing test failures instead of dealing with gradle and
>>> dependency
>>>>>> versioning and wondering why intellij is picking up 2 versions of
>>> jna,
>>>> 3
>>>>>> versions of apache http, etc.
>>>>>>
>>>>>> -Kirk
>>>>>>
>>>>>>
>>>>>> On Wed, Mar 23, 2016 at 11:04 AM, John Blum <jb...@pivotal.io>
>>> wrote:
>>>>>>> In a nutshell, you want the dependencies and all the transitive
>>>>>>> dependencies versions to agree, otherwise conflicts like what Kirk
>>>>>>> experienced, as well as what I experienced while integrating
>>> Apache
>>>>> Geode
>>>>>>> support into Spring Session, will occur, and users will have
>>> problems
>>>>>> using
>>>>>>> Geode in different contexts (e.g. App Server containers for
>>> Session
>>>>>>> management)
>>>>>>>
>>>>>>> Letting transitive dependencies of Geode (i.e. sub-projects)
>>> dictate
>>>>>>> dependency versions is NOT right and recipe for disaster.  Also,
>>> you
>>>>> are
>>>>>>> not testing the dependencies, you are testing Geode with the
>>>>>> dependencies.
>>>>>>>
>>>>>>> On Wed, Mar 23, 2016 at 10:48 AM, Dan Smith <ds...@pivotal.io>
>>>> wrote:
>>>>>>>> As far as the multiple versions of httpclient, I only see that
>>>>>> dependency
>>>>>>>> showing up in the test dependencies. Different sub projects have
>>>>>>> different
>>>>>>>> test dependencies, which are transitively pulling in different
>>>>> versions
>>>>>>> of
>>>>>>>> this jar.
>>>>>>>>
>>>>>>>> We can certainly force a version across all of the different
>>>> projects
>>>>>> in
>>>>>>>> dependency-resolution.gradle. But I think given these are
>>> different
>>>>>>>> projects with different test dependencies we should just let
>>> them
>>>>> pull
>>>>>> in
>>>>>>>> whatever test dependencies they need.
>>>>>>>>
>>>>>>>>
>>>>>>>>> ./gradlew geode-core:dependencyInsight --dependency httpclient
>>>>>>>> --configuration testRuntime
>>>>>>>> Picked up JAVA_TOOL_OPTIONS:
>>>>>>>> :geode-core:dependencyInsight
>>>>>>>> org.apache.httpcomponents:httpclient:4.2.5
>>>>>>>> \--- org.apache.hadoop:hadoop-auth:2.4.1
>>>>>>>>       \--- testRuntime
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>> ./gradlew geode-pulse:dependencyInsight --dependency
>>> httpclient
>>>>>>>> --configuration testRuntime
>>>>>>>> Picked up JAVA_TOOL_OPTIONS:
>>>>>>>> :geode-pulse:dependencyInsight
>>>>>>>> org.apache.httpcomponents:httpclient:4.5.1
>>>>>>>> +--- org.seleniumhq.selenium:selenium-api:2.52.0
>>>>>>>> |    +--- testRuntime
>>>>>>>> |    \--- org.seleniumhq.selenium:selenium-remote-driver:2.52.0
>>>>>>>> |         +--- testRuntime
>>>>>>>> |         +---
>>>> org.seleniumhq.selenium:selenium-firefox-driver:2.52.0
>>>>>>>> |         |    \--- testRuntime
>>>>>>>> |         \--- org.seleniumhq.selenium:selenium-support:2.52.0
>>>>>>>> |              \--- testRuntime
>>>>>>>> \--- org.seleniumhq.selenium:selenium-remote-driver:2.52.0 (*)
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> On Wed, Mar 23, 2016 at 10:27 AM, Dan Smith <ds...@pivotal.io>
>>>>> wrote:
>>>>>>>>> The tests in that geode-assembly project are supposed to run
>>> on
>>>> the
>>>>>>>> binary
>>>>>>>>> assembly of the project, so I think the classpath when run
>>> from
>>>> the
>>>>>>>> command
>>>>>>>>> line might be a bit different than what you get in intellij. I
>>>>> think
>>>>>>> the
>>>>>>>>> command line classpath just points at geode-dependencies.jar.
>>>>>>>>>
>>>>>>>>> -Dan
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Wed, Mar 23, 2016 at 10:01 AM, Kirk Lund <klund@pivotal.io
>>>>>> wrote:
>>>>>>>>>> So as I look at dependencies, I see that our gradle build is
>>>>>>> ultimately
>>>>>>>>>> depending on multiple versions of the same libraries. Can't
>>> we
>>>>> clean
>>>>>>>> this
>>>>>>>>>> up?
>>>>>>>>>>
>>>>>>>>>> org.apache.httpcomponents:httpclient:4.2.5
>>>>>>>>>> org.apache.httpcomponents:httpclient:4.3.3
>>>>>>>>>> org.apache.httpcomponents:httpclient:4.5.1
>>>>>>>>>>
>>>>>>>>>> I really don't want multiple versions of anything in this
>>>> project.
>>>>>> Are
>>>>>>>> we
>>>>>>>>>> not using gradle correctly?
>>>>>>>>>>
>>>>>>>>>> -Kirk
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On Wed, Mar 23, 2016 at 9:23 AM, Kirk Lund <klund@pivotal.io
>>>>>> wrote:
>>>>>>>>>>> RestAPIsWithSSLDUnitTest failed in the nightly build.
>>> Failure
>>>>>> stack
>>>>>>> is
>>>>>>>>>>> below. I tried running this test by itself in intellij and
>>> it
>>>>>> fails
>>>>>>>>>> with "java.lang.NoSuchFieldError:
>>>>>>>>>>> INSTANCE" from "at
>>>>>>>>>>>
>>> org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<init>(DefaultHttpRequestWriterFactory.java:52)".
>>>>>>>>>>> I posted that failure stack below as well.
>>>>>>>>>>>
>>>>>>>>>>> Any ideas what the NoSuckFieldError is about?
>>>>>>>>>>>
>>>>>>>>>>> :geode-assembly:distributedTest
>>>>>>>>>>>
>>>>>>>>>>>
>>> com.gemstone.gemfire.rest.internal.web.controllers.RestAPIsWithSSLDUnitTest
>>>>>>>>>>>> testMutualAuthentication FAILED
>>>>>>>>>>>      java.lang.RuntimeException: unexpected exception
>>>>>>>>>>>          at
>>> com.gemstone.gemfire.rest.internal.web.controllers.
>>> RestAPIsWithSSLDUnitTest.validateConnection(RestAPIsWithSSLDUnitTest.java:
>>>>>>>>>>> 495)
>>>>>>>>>>>          at
>>> com.gemstone.gemfire.rest.internal.web.controllers.
>>>>>>>>>>> RestAPIsWithSSLDUnitTest.testMutualAuthentication(
>>>>>>>>>>> RestAPIsWithSSLDUnitTest.java:648)
>>>>>>>>>>>
>>>>>>>>>>>          Caused by:
>>>>>>>>>>>          javax.net.ssl.SSLHandshakeException: Remote host
>>>> closed
>>>>>>>>>>> connection during handshake
>>>>>>>>>>>              at sun.security.ssl.SSLSocketImpl.readRecord(
>>>>>>>>>>> SSLSocketImpl.java:992)
>>>>>>>>>>>              at sun.security.ssl.SSLSocketImpl.waitForClose(
>>>>>>>>>>> SSLSocketImpl.java:1769)
>>>>>>>>>>>              at sun.security.ssl.HandshakeOutStream.flush(
>>>>>>>>>>> HandshakeOutStream.java:124)
>>>>>>>>>>>              at
>>>> sun.security.ssl.Handshaker.sendChangeCipherSpec(
>>>>>>>>>>> Handshaker.java:1083)
>>>>>>>>>>>              at sun.security.ssl.ClientHandshaker.
>>>>>>>>>>> sendChangeCipherAndFinish(ClientHandshaker.java:1222)
>>>>>>>>>>>              at
>>>>> sun.security.ssl.ClientHandshaker.serverHelloDone(
>>>>>>>>>>> ClientHandshaker.java:1134)
>>>>>>>>>>>              at
>>>> sun.security.ssl.ClientHandshaker.processMessage(
>>>>>>>>>>> ClientHandshaker.java:348)
>>>>>>>>>>>              at
>>>>>>>> sun.security.ssl.Handshaker.processLoop(Handshaker.java:
>>>>>>>>>>> 979)
>>>>>>>>>>>              at
>>>>>>> sun.security.ssl.Handshaker.process_record(Handshaker.
>>>>>>>>>>> java:914)
>>>>>>>>>>>              at sun.security.ssl.SSLSocketImpl.readRecord(
>>>>>>>>>>> SSLSocketImpl.java:1062)
>>>>>>>>>>>              at
>>>>>>> sun.security.ssl.SSLSocketImpl.performInitialHandshake(
>>>>>>>>>>> SSLSocketImpl.java:1375)
>>>>>>>>>>>              at
>>> sun.security.ssl.SSLSocketImpl.startHandshake(
>>>>>>>>>>> SSLSocketImpl.java:1403)
>>>>>>>>>>>              at
>>> sun.security.ssl.SSLSocketImpl.startHandshake(
>>>>>>>>>>> SSLSocketImpl.java:1387)
>>>>>>>>>>>              at
>>>>>> org.apache.http.conn.ssl.SSLConnectionSocketFactory.
>>>>>>>>>>> createLayeredSocket(SSLConnectionSocketFactory.java:394)
>>>>>>>>>>>              at
>>>>>> org.apache.http.conn.ssl.SSLConnectionSocketFactory.
>>>>>>>>>>> connectSocket(SSLConnectionSocketFactory.java:353)
>>>>>>>>>>>              at
>>>>>>>> org.apache.http.impl.conn.DefaultHttpClientConnectionOpe
>>>>>>>>>>> rator.connect(DefaultHttpClientConnectionOperator.java:134)
>>>>>>>>>>>              at
>>>>>>>> org.apache.http.impl.conn.PoolingHttpClientConnectionMan
>>>>>>>>>>> ager.connect(PoolingHttpClientConnectionManager.java:353)
>>>>>>>>>>>              at
>>> org.apache.http.impl.execchain.MainClientExec.
>>>>>>>>>>> establishRoute(MainClientExec.java:380)
>>>>>>>>>>>              at
>>> org.apache.http.impl.execchain.MainClientExec.
>>>>>>>>>>> execute(MainClientExec.java:236)
>>>>>>>>>>>              at org.apache.http.impl.execchain.ProtocolExec.
>>>>>>>>>>> execute(ProtocolExec.java:184)
>>>>>>>>>>>              at
>>>> org.apache.http.impl.execchain.RetryExec.execute(
>>>>>>>>>>> RetryExec.java:88)
>>>>>>>>>>>              at org.apache.http.impl.execchain.RedirectExec.
>>>>>>>>>>> execute(RedirectExec.java:110)
>>>>>>>>>>>              at
>>>>>>>> org.apache.http.impl.client.InternalHttpClient.doExecute(
>>>>>>>>>>> InternalHttpClient.java:184)
>>>>>>>>>>>              at
>>>>>>>> org.apache.http.impl.client.CloseableHttpClient.execute(
>>>>>>>>>>> CloseableHttpClient.java:82)
>>>>>>>>>>>              at
>>>>>>>> org.apache.http.impl.client.CloseableHttpClient.execute(
>>>>>>>>>>> CloseableHttpClient.java:107)
>>>>>>>>>>>              at
>>>>> com.gemstone.gemfire.rest.internal.web.controllers.
>>> RestAPIsWithSSLDUnitTest.validateConnection(RestAPIsWithSSLDUnitTest.java:
>>>>>>>>>>> 474)
>>>>>>>>>>>              ... 1 more
>>>>>>>>>>>
>>>>>>>>>>>              Caused by:
>>>>>>>>>>>              java.io.EOFException: SSL peer shut down
>>>> incorrectly
>>>>>>>>>>>                  at
>>>>>>>>>> sun.security.ssl.InputRecord.read(InputRecord.java:505)
>>>>>>>>>>>                  at
>>> sun.security.ssl.SSLSocketImpl.readRecord(
>>>>>>>>>>> SSLSocketImpl.java:973)
>>>>>>>>>>>                  ... 26 more
>>>>>>>>>>>
>>>>>>>>>>> java.lang.NoSuchFieldError: INSTANCE
>>>>>>>>>>>
>>>>>>>>>>> at
>>>>>>>>>>>
>>> org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<init>(DefaultHttpRequestWriterFactory.java:52)
>>>>>>>>>>> at
>>>>>>>>>>>
>>> org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<init>(DefaultHttpRequestWriterFactory.java:56)
>>>>>>>>>>> at
>>>>>>>>>>>
>>> org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<clinit>(DefaultHttpRequestWriterFactory.java:46)
>>>>>>>>>>> at
>>>>>>>>>>>
>>> org.apache.http.impl.conn.ManagedHttpClientConnectionFactory.<init>(ManagedHttpClientConnectionFactory.java:72)
>>>>>>>>>>> at
>>>>>>>>>>>
>>> org.apache.http.impl.conn.ManagedHttpClientConnectionFactory.<init>(ManagedHttpClientConnectionFactory.java:84)
>>>>>>>>>>> at
>>>>>>>>>>>
>>> org.apache.http.impl.conn.ManagedHttpClientConnectionFactory.<clinit>(ManagedHttpClientConnectionFactory.java:59)
>>>>>>>>>>> at
>>>>>>>>>>>
>>> org.apache.http.impl.conn.PoolingHttpClientConnectionManager$InternalConnectionFactory.<init>(PoolingHttpClientConnectionManager.java:487)
>>>>>>>>>>> at
>>>>>>>>>>>
>>> org.apache.http.impl.conn.PoolingHttpClientConnectionManager.<init>(PoolingHttpClientConnectionManager.java:147)
>>>>>>>>>>> at
>>>>>>>>>>>
>>> org.apache.http.impl.conn.PoolingHttpClientConnectionManager.<init>(PoolingHttpClientConnectionManager.java:136)
>>>>>>>>>>> at
>>>>>>>>>>>
>>> org.apache.http.impl.conn.PoolingHttpClientConnectionManager.<init>(PoolingHttpClientConnectionManager.java:112)
>>>>>>>>>>> at
>>>>>>>>>>>
>>> org.apache.http.impl.client.HttpClientBuilder.build(HttpClientBuilder.java:726)
>>>>>>>>>>> at
>>>>>>>>>>>
>>> com.gemstone.gemfire.rest.internal.web.controllers.RestAPIsWithSSLDUnitTest.getSSLBasedHTTPClient(RestAPIsWithSSLDUnitTest.java:458)
>>>>>>>>>>> at
>>>>>>>>>>>
>>> com.gemstone.gemfire.rest.internal.web.controllers.RestAPIsWithSSLDUnitTest.validateConnection(RestAPIsWithSSLDUnitTest.java:473)
>>>>>>>>>>> at
>>>>>>>>>>>
>>> com.gemstone.gemfire.rest.internal.web.controllers.RestAPIsWithSSLDUnitTest.testSSLWithoutKeyStoreType(RestAPIsWithSSLDUnitTest.java:522)
>>>>>>>>>>> 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:497)
>>>>>>>>>>> at junit.framework.TestCase.runTest(TestCase.java:176)
>>>>>>>>>>> at junit.framework.TestCase.runBare(TestCase.java:141)
>>>>>>>>>>> at
>>> junit.framework.TestResult$1.protect(TestResult.java:122)
>>>>>>>>>>> at
>>>> junit.framework.TestResult.runProtected(TestResult.java:142)
>>>>>>>>>>> at junit.framework.TestResult.run(TestResult.java:125)
>>>>>>>>>>> at junit.framework.TestCase.run(TestCase.java:129)
>>>>>>>>>>> at junit.framework.TestSuite.runTest(TestSuite.java:252)
>>>>>>>>>>> at junit.framework.TestSuite.run(TestSuite.java:247)
>>>>>>>>>>> at
>>>>>>>>>>>
>>> org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:86)
>>>>>>>>>>> at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
>>>>>>>>>>> at
>>>>>>>>>>>
>>> com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
>>>>>>>>>>> at
>>>>>>>>>>>
>>> com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:234)
>>>>>>>>>>> at
>>>> com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:74)
>>>>>>>>>>> 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:497)
>>>>>>>>>>> at
>>>> com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
>>>>>>>>>>>
>>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> -John
>>>>>>> 503-504-8657
>>>>>>> john.blum10101 (skype)
>>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> -John
>>>>> 503-504-8657
>>>>> john.blum10101 (skype)
>>>>>
>>
>>
>> --
>> -John
>> 503-504-8657
>> john.blum10101 (skype)
>>
>
>


Re: RestAPIsWithSSLDUnitTest fails

Posted by John Blum <jb...@pivotal.io>.
After updating with the latest on develop, the geode-assembly/build.gradle
file appears to be correct w.r.t. the httpclient dependency, anyway.  I am
only seeing version *4.5.1* in the dependency tree.  I.e. I ran...

$ gradlew -b *geode-assembly/build.gradle* dependencies | less

Then I search for httpclient (using "/httpclient"), and I only saw version
*4.5.1*.

However, when I run...

$ gradlew -b *geode-core/build.gradle* dependencies | less

I see version *4.2.5*.

And, when I run...

$ gradlew -b *geode-pulse/build.gradle* dependencies | less

I also see version *4.5.1*.  assembly, core and pulse seem to be in
disagreement anyway.

I am not exactly sure where *4.3.3* comes from, but httpclient does not
exist in...

*geode-common*,
*geode-cq*,
*geode-junit*,
*geode-wan*,
*geode-web*
or *geode-web-api*.

However, both *geode-lucene/build.gradle* as well as
*geode-rebalancer/build.gradle* have...


+--- org.apache.hadoop:hadoop-common:2.4.1
...
|    +--- commons-httpclient:*commons-httpclient:3.1*
*...*
|    +--- net.java.dev.jets3t:jets3t:0.9.0
|    |    +--- org.apache.httpcomponents:*httpclient:4.1.2 -> 4.2.5*

*...*
|    +--- org.apache.hadoop:hadoop-auth:2.4.1
...
|    |    +--- org.apache.httpcomponents:*httpclient:4.2.5 (*)*


A mess to be sure, compliments of Hadoop (an optional dep of Geode??).

-John



On Wed, Mar 23, 2016 at 3:27 PM, Kirk Lund <kl...@pivotal.io> wrote:

> Jianxia is also hitting the same error but in Eclipse. The resulting
> Eclipse project also has two versions of httpcore and httpclient in
> geode-assembly that results in java.lang.NoSuchFieldError: INSTANCE when
> trying to execute RestAPIsWithSSLDUnitTest in Eclipse. So it's not limited
> just to IntelliJ or to one unlucky Geode developer.
>
> The end result is that there are now at least two of us who are hindered in
> our ability to debug RestAPIsWithSSLDUnitTest. Hopefully he'll have more
> luck with Eclipse than I'm having with it in IntelliJ.
>
> -Kirk
>
>
> On Wed, Mar 23, 2016 at 3:09 PM, Mark Bretl <as...@gmail.com> wrote:
>
> > Each version of httpclient has a dependency on a different version of
> > httpcore, hence the reason seeing two versions of httpcore. If the IDEA
> > plugin is not respecting the configuration we have in the Gradle build
> > files, then that is an issue with the IDEA. I found an article from 2013,
> > which dealt with the issue,
> >
> >
> http://arhipov.blogspot.com/2013/10/managing-dependencies-for-intellij-idea.html
> >
> > I agree with John and Dan, we do not want to go back to non-transitive
> > dependencies because that is what led to this situation. Until GEODE-1072
> > is completed, we may be stuck in this mess. Maybe we should prioritize
> > GEODE-1072 for M2? I don't want to since it does not have direct affect
> on
> > the M2 release goals/scope, however, it is a step in the path to the
> 1.0.0
> > release.
> >
> > --Mark
> >
> > On Wed, Mar 23, 2016 at 2:48 PM, John Blum <jb...@pivotal.io> wrote:
> >
> > > The only way to properly (& reliably) control that then is with the
> > > equivalent of a dependencyManagement declaration in Geode's Gradle
> build
> > > script for the test dependencies.
> > >
> > > https://docs.gradle.org/current/userguide/dependency_management.html,
> > > section "*23.2.2. Managing transitive dependencies*" is a good place to
> > > start. Also, "*23.2.3. Resolve version conflicts*" talks about
> resolution
> > > strategies.
> > >
> > >
> > > On Wed, Mar 23, 2016 at 2:25 PM, Kirk Lund <kl...@pivotal.io> wrote:
> > >
> > > > Yep, that's the way I built one of the two projects I currently have
> > and
> > > it
> > > > does work better but it has duplicates of httpclient and httpcore.
> > > >
> > > >
> > > > On Wed, Mar 23, 2016 at 1:45 PM, John Blum <jb...@pivotal.io> wrote:
> > > >
> > > > > I.e. ... "File" -> "New" -> "Project from Existing Sources..." ->
> > > <select
> > > > > your Geode working directory> -> "Import project from external
> model"
> > > ->
> > > > > "Gradle"
> > > > >
> > > > > I don't trust Gradle to do the right thing when setting up an IDE
> > > > > (especially as the IDE versions change).
> > > > >
> > > > > Disclaimer: I have not tried this recently, but I usually have more
> > > > success
> > > > > going this route.
> > > > >
> > > > > -John
> > > > >
> > > > >
> > > > > On Wed, Mar 23, 2016 at 1:40 PM, John Blum <jb...@pivotal.io>
> wrote:
> > > > >
> > > > > > Kirk- rather than have Gradle generate the .idea project files,
> > have
> > > > you
> > > > > > tried importing the Geode project from existing sources using
> > Gradle
> > > > the
> > > > > > template?
> > > > > >
> > > > > > On Wed, Mar 23, 2016 at 1:28 PM, Kirk Lund <kl...@pivotal.io>
> > wrote:
> > > > > >
> > > > > >> RestAPIsWithSSLDUnitTest passes on the command-line.
> > > > > >>
> > > > > >> When I execute RestAPIsWithSSLDUnitTest in my IntelliJ project,
> > the
> > > > > >> classpath of the test prints out with two versions of httpclient
> > and
> > > > > >> httpcore:
> > > > > >>
> > > > > >> [vm_1]
> > > > > >>
> > > > > >>
> > > > >
> > > >
> > >
> >
> /Users/klund/.gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpclient/4.2.5/666e26e76f2e87d84e4f16acb546481ae1b8e9a6/httpclient-4.2.5.jar
> > > > > >> [vm_1]
> > > > > >>
> > > > > >>
> > > > >
> > > >
> > >
> >
> /Users/klund/.gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpcore/4.2.4/3b7f38df6de5dd8b500e602ae8c2dd5ee446f883/httpcore-4.2.4.jar
> > > > > >> [vm_1]
> > > > > >>
> > > > > >>
> > > > >
> > > >
> > >
> >
> /Users/klund/.gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpclient/4.5.1/7e3cecc566df91338c6c67883b89ddd05a17db43/httpclient-4.5.1.jar
> > > > > >> [vm_1]
> > > > > >>
> > > > > >>
> > > > >
> > > >
> > >
> >
> /Users/klund/.gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpcore/4.4.3/e876a79d561e5c6207b78d347e198c8c4531a5e5/httpcore-4.4.3.jar
> > > > > >>
> > > > > >> If you use "./gradlew idea" the resulting module definitions are
> > not
> > > > > >> sufficient (to illustrate, try generating intellij projects for
> > > > > >> closed+open
> > > > > >> and then try editing and running DUnits in legacyDUnit and both
> > > > assembly
> > > > > >> projects) and require some manual adjusting which is obviously
> > error
> > > > > >> prone.
> > > > > >> I'm not an IntelliJ or gradle expert so I doubt that I'll be the
> > one
> > > > to
> > > > > >> fix
> > > > > >> this.
> > > > > >>
> > > > > >> Ultimately I'd like to see all of this become easier and
> simpler.
> > I
> > > > > >> believe
> > > > > >> too much complexity or difficulty will result in a smaller
> number
> > of
> > > > > >> contributors. It also results in contributors spending their
> time
> > > with
> > > > > >> gradle or the IDE instead of on geode.
> > > > > >>
> > > > > >> -Kirk
> > > > > >>
> > > > > >>
> > > > > >> On Wed, Mar 23, 2016 at 12:04 PM, Dan Smith <ds...@pivotal.io>
> > > > wrote:
> > > > > >>
> > > > > >> > First off, your intellij classpath and gradle classpath are
> > pretty
> > > > > much
> > > > > >> the
> > > > > >> > same. The one exception, I think, is that the test target for
> > > > > >> > geode-assembly sets up a different runtime classpath to point
> at
> > > the
> > > > > >> > bundled product. I didn't set that up, but I think maybe the
> > idea
> > > is
> > > > > >> that
> > > > > >> > we needed some tests of the actual bundled binary? Take a look
> > at
> > > > > >> > geode-assembly/build.gradle. If someone knows how to fix the
> > setup
> > > > > that
> > > > > >> so
> > > > > >> > we still have that test coverage of the bundled product and
> the
> > > > tests
> > > > > do
> > > > > >> > work in intellij, please fix it! All of the rest of the tests
> > > should
> > > > > be
> > > > > >> > using exactly the same environment on the command line and in
> > the
> > > > IDE.
> > > > > >> >
> > > > > >> > I'm not sure if this is even your problem Kirk, did you try
> > > running
> > > > > from
> > > > > >> > the command line?
> > > > > >> >
> > > > > >> > Second, I don't see anything wrong with having transitive test
> > > > > >> > dependencies. It's a huge pain to track down the transitive
> > > > > dependencies
> > > > > >> > and keep them up to date manually. They aren't hurting you!
> > > > > >> >
> > > > > >> > Regarding John's struggles with dependencies of geode, what we
> > > > really
> > > > > >> need
> > > > > >> > to do is clean up *product* dependencies of geode core - we're
> > > > pulling
> > > > > >> in
> > > > > >> > all sorts of stuff for gfsh, pulse, the REST API, etc.
> GEODE-818
> > > is
> > > > > all
> > > > > >> > about cleaning that up. I was hoping to take up GEODE-1072
> > (remove
> > > > > HDFS
> > > > > >> > code) when I get a chance. If you want to clean up the
> > > dependencies
> > > > > >> please
> > > > > >> > chip in and take on some of those subtasks, the sooner the
> > better!
> > > > > >> >
> > > > > >> > -Dan
> > > > > >> >
> > > > > >> > On Wed, Mar 23, 2016 at 11:34 AM, John Blum <jblum@pivotal.io
> >
> > > > wrote:
> > > > > >> >
> > > > > >> > > If you created the IntelliJ IDEA project from the Gradle
> > build,
> > > > then
> > > > > >> it
> > > > > >> > is
> > > > > >> > > Geode's Gradle build scripts that are specifying the
> > > dependencies
> > > > > and
> > > > > >> > thus
> > > > > >> > > the Gradle build scripts are wrong.  In Maven, you can
> > declare a
> > > > > >> > > dependencyManagement section (along with exclusions) to
> manage
> > > > > >> transitive
> > > > > >> > > dependencies.  I don't recall what the equivalent is in
> Gradle
> > > for
> > > > > >> > > dependencyManagement.
> > > > > >> > >
> > > > > >> > > On Wed, Mar 23, 2016 at 11:24 AM, Kirk Lund <
> klund@pivotal.io
> > >
> > > > > wrote:
> > > > > >> > >
> > > > > >> > > > I think that maybe we don't want to continue with
> transitive
> > > > > >> > dependencies
> > > > > >> > > > enabled for testing. If we turn that off then we go back
> to
> > > > having
> > > > > >> to
> > > > > >> > > > specify all versions even runtime test dependencies right?
> > Are
> > > > > there
> > > > > >> > any
> > > > > >> > > > valid arguments for keeping transitive dependencies
> enabled
> > > for
> > > > > >> > testing?
> > > > > >> > > >
> > > > > >> > > > Also, why would my intellij dependencies be different from
> > > > gradle
> > > > > >> > > > command-line? The one was built from the *.gradle files in
> > > > geode.
> > > > > If
> > > > > >> > > > intellij's gradle picks up multiple versions of libraries,
> > > then
> > > > I
> > > > > >> think
> > > > > >> > > > that still means something isn't right in our *.gradle
> > files.
> > > > > >> > > >
> > > > > >> > > > Not that I want to see test failures... BUT, I want to
> spend
> > > my
> > > > > time
> > > > > >> > > > diagnosing test failures instead of dealing with gradle
> and
> > > > > >> dependency
> > > > > >> > > > versioning and wondering why intellij is picking up 2
> > versions
> > > > of
> > > > > >> jna,
> > > > > >> > 3
> > > > > >> > > > versions of apache http, etc.
> > > > > >> > > >
> > > > > >> > > > -Kirk
> > > > > >> > > >
> > > > > >> > > >
> > > > > >> > > > On Wed, Mar 23, 2016 at 11:04 AM, John Blum <
> > jblum@pivotal.io
> > > >
> > > > > >> wrote:
> > > > > >> > > >
> > > > > >> > > > > In a nutshell, you want the dependencies and all the
> > > > transitive
> > > > > >> > > > > dependencies versions to agree, otherwise conflicts like
> > > what
> > > > > Kirk
> > > > > >> > > > > experienced, as well as what I experienced while
> > integrating
> > > > > >> Apache
> > > > > >> > > Geode
> > > > > >> > > > > support into Spring Session, will occur, and users will
> > have
> > > > > >> problems
> > > > > >> > > > using
> > > > > >> > > > > Geode in different contexts (e.g. App Server containers
> > for
> > > > > >> Session
> > > > > >> > > > > management)
> > > > > >> > > > >
> > > > > >> > > > > Letting transitive dependencies of Geode (i.e.
> > sub-projects)
> > > > > >> dictate
> > > > > >> > > > > dependency versions is NOT right and recipe for
> disaster.
> > > > Also,
> > > > > >> you
> > > > > >> > > are
> > > > > >> > > > > not testing the dependencies, you are testing Geode with
> > the
> > > > > >> > > > dependencies.
> > > > > >> > > > >
> > > > > >> > > > >
> > > > > >> > > > > On Wed, Mar 23, 2016 at 10:48 AM, Dan Smith <
> > > > dsmith@pivotal.io>
> > > > > >> > wrote:
> > > > > >> > > > >
> > > > > >> > > > > > As far as the multiple versions of httpclient, I only
> > see
> > > > that
> > > > > >> > > > dependency
> > > > > >> > > > > > showing up in the test dependencies. Different sub
> > > projects
> > > > > have
> > > > > >> > > > > different
> > > > > >> > > > > > test dependencies, which are transitively pulling in
> > > > different
> > > > > >> > > versions
> > > > > >> > > > > of
> > > > > >> > > > > > this jar.
> > > > > >> > > > > >
> > > > > >> > > > > > We can certainly force a version across all of the
> > > different
> > > > > >> > projects
> > > > > >> > > > in
> > > > > >> > > > > > dependency-resolution.gradle. But I think given these
> > are
> > > > > >> different
> > > > > >> > > > > > projects with different test dependencies we should
> just
> > > let
> > > > > >> them
> > > > > >> > > pull
> > > > > >> > > > in
> > > > > >> > > > > > whatever test dependencies they need.
> > > > > >> > > > > >
> > > > > >> > > > > >
> > > > > >> > > > > > > ./gradlew geode-core:dependencyInsight --dependency
> > > > > httpclient
> > > > > >> > > > > > --configuration testRuntime
> > > > > >> > > > > > Picked up JAVA_TOOL_OPTIONS:
> > > > > >> > > > > > :geode-core:dependencyInsight
> > > > > >> > > > > > org.apache.httpcomponents:httpclient:4.2.5
> > > > > >> > > > > > \--- org.apache.hadoop:hadoop-auth:2.4.1
> > > > > >> > > > > >      \--- testRuntime
> > > > > >> > > > > >
> > > > > >> > > > > >
> > > > > >> > > > > >
> > > > > >> > > > > > > ./gradlew geode-pulse:dependencyInsight --dependency
> > > > > >> httpclient
> > > > > >> > > > > > --configuration testRuntime
> > > > > >> > > > > > Picked up JAVA_TOOL_OPTIONS:
> > > > > >> > > > > > :geode-pulse:dependencyInsight
> > > > > >> > > > > > org.apache.httpcomponents:httpclient:4.5.1
> > > > > >> > > > > > +--- org.seleniumhq.selenium:selenium-api:2.52.0
> > > > > >> > > > > > |    +--- testRuntime
> > > > > >> > > > > > |    \---
> > > > > org.seleniumhq.selenium:selenium-remote-driver:2.52.0
> > > > > >> > > > > > |         +--- testRuntime
> > > > > >> > > > > > |         +---
> > > > > >> > org.seleniumhq.selenium:selenium-firefox-driver:2.52.0
> > > > > >> > > > > > |         |    \--- testRuntime
> > > > > >> > > > > > |         \---
> > > > org.seleniumhq.selenium:selenium-support:2.52.0
> > > > > >> > > > > > |              \--- testRuntime
> > > > > >> > > > > > \---
> > org.seleniumhq.selenium:selenium-remote-driver:2.52.0
> > > > (*)
> > > > > >> > > > > >
> > > > > >> > > > > >
> > > > > >> > > > > >
> > > > > >> > > > > > On Wed, Mar 23, 2016 at 10:27 AM, Dan Smith <
> > > > > dsmith@pivotal.io>
> > > > > >> > > wrote:
> > > > > >> > > > > >
> > > > > >> > > > > > > The tests in that geode-assembly project are
> supposed
> > to
> > > > run
> > > > > >> on
> > > > > >> > the
> > > > > >> > > > > > binary
> > > > > >> > > > > > > assembly of the project, so I think the classpath
> when
> > > run
> > > > > >> from
> > > > > >> > the
> > > > > >> > > > > > command
> > > > > >> > > > > > > line might be a bit different than what you get in
> > > > > intellij. I
> > > > > >> > > think
> > > > > >> > > > > the
> > > > > >> > > > > > > command line classpath just points at
> > > > > geode-dependencies.jar.
> > > > > >> > > > > > >
> > > > > >> > > > > > > -Dan
> > > > > >> > > > > > >
> > > > > >> > > > > > >
> > > > > >> > > > > > > On Wed, Mar 23, 2016 at 10:01 AM, Kirk Lund <
> > > > > klund@pivotal.io
> > > > > >> >
> > > > > >> > > > wrote:
> > > > > >> > > > > > >
> > > > > >> > > > > > >> So as I look at dependencies, I see that our gradle
> > > build
> > > > > is
> > > > > >> > > > > ultimately
> > > > > >> > > > > > >> depending on multiple versions of the same
> libraries.
> > > > Can't
> > > > > >> we
> > > > > >> > > clean
> > > > > >> > > > > > this
> > > > > >> > > > > > >> up?
> > > > > >> > > > > > >>
> > > > > >> > > > > > >> org.apache.httpcomponents:httpclient:4.2.5
> > > > > >> > > > > > >> org.apache.httpcomponents:httpclient:4.3.3
> > > > > >> > > > > > >> org.apache.httpcomponents:httpclient:4.5.1
> > > > > >> > > > > > >>
> > > > > >> > > > > > >> I really don't want multiple versions of anything
> in
> > > this
> > > > > >> > project.
> > > > > >> > > > Are
> > > > > >> > > > > > we
> > > > > >> > > > > > >> not using gradle correctly?
> > > > > >> > > > > > >>
> > > > > >> > > > > > >> -Kirk
> > > > > >> > > > > > >>
> > > > > >> > > > > > >>
> > > > > >> > > > > > >> On Wed, Mar 23, 2016 at 9:23 AM, Kirk Lund <
> > > > > klund@pivotal.io
> > > > > >> >
> > > > > >> > > > wrote:
> > > > > >> > > > > > >>
> > > > > >> > > > > > >> > RestAPIsWithSSLDUnitTest failed in the nightly
> > build.
> > > > > >> Failure
> > > > > >> > > > stack
> > > > > >> > > > > is
> > > > > >> > > > > > >> > below. I tried running this test by itself in
> > > intellij
> > > > > and
> > > > > >> it
> > > > > >> > > > fails
> > > > > >> > > > > > >> with "java.lang.NoSuchFieldError:
> > > > > >> > > > > > >> > INSTANCE" from "at
> > > > > >> > > > > > >> >
> > > > > >> > > > > > >>
> > > > > >> > > > > >
> > > > > >> > > > >
> > > > > >> > > >
> > > > > >> > >
> > > > > >> >
> > > > > >>
> > > > >
> > > >
> > >
> >
> org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<init>(DefaultHttpRequestWriterFactory.java:52)".
> > > > > >> > > > > > >> > I posted that failure stack below as well.
> > > > > >> > > > > > >> >
> > > > > >> > > > > > >> > Any ideas what the NoSuckFieldError is about?
> > > > > >> > > > > > >> >
> > > > > >> > > > > > >> > :geode-assembly:distributedTest
> > > > > >> > > > > > >> >
> > > > > >> > > > > > >> >
> > > > > >> > > > > > >>
> > > > > >> > > > > >
> > > > > >> > > > >
> > > > > >> > > >
> > > > > >> > >
> > > > > >> >
> > > > > >>
> > > > >
> > > >
> > >
> >
> com.gemstone.gemfire.rest.internal.web.controllers.RestAPIsWithSSLDUnitTest
> > > > > >> > > > > > >> > > testMutualAuthentication FAILED
> > > > > >> > > > > > >> >     java.lang.RuntimeException: unexpected
> > exception
> > > > > >> > > > > > >> >         at
> > > > > >> com.gemstone.gemfire.rest.internal.web.controllers.
> > > > > >> > > > > > >> >
> > > > > >> > > > > > >>
> > > > > >> > > > > >
> > > > > >> > > > >
> > > > > >> > > >
> > > > > >> > >
> > > > > >> >
> > > > > >>
> > > > >
> > > >
> > >
> >
> RestAPIsWithSSLDUnitTest.validateConnection(RestAPIsWithSSLDUnitTest.java:
> > > > > >> > > > > > >> > 495)
> > > > > >> > > > > > >> >         at
> > > > > >> com.gemstone.gemfire.rest.internal.web.controllers.
> > > > > >> > > > > > >> >
> RestAPIsWithSSLDUnitTest.testMutualAuthentication(
> > > > > >> > > > > > >> > RestAPIsWithSSLDUnitTest.java:648)
> > > > > >> > > > > > >> >
> > > > > >> > > > > > >> >         Caused by:
> > > > > >> > > > > > >> >         javax.net.ssl.SSLHandshakeException:
> Remote
> > > > host
> > > > > >> > closed
> > > > > >> > > > > > >> > connection during handshake
> > > > > >> > > > > > >> >             at
> > > > sun.security.ssl.SSLSocketImpl.readRecord(
> > > > > >> > > > > > >> > SSLSocketImpl.java:992)
> > > > > >> > > > > > >> >             at
> > > > > sun.security.ssl.SSLSocketImpl.waitForClose(
> > > > > >> > > > > > >> > SSLSocketImpl.java:1769)
> > > > > >> > > > > > >> >             at
> > > > sun.security.ssl.HandshakeOutStream.flush(
> > > > > >> > > > > > >> > HandshakeOutStream.java:124)
> > > > > >> > > > > > >> >             at
> > > > > >> > sun.security.ssl.Handshaker.sendChangeCipherSpec(
> > > > > >> > > > > > >> > Handshaker.java:1083)
> > > > > >> > > > > > >> >             at sun.security.ssl.ClientHandshaker.
> > > > > >> > > > > > >> >
> > sendChangeCipherAndFinish(ClientHandshaker.java:1222)
> > > > > >> > > > > > >> >             at
> > > > > >> > > sun.security.ssl.ClientHandshaker.serverHelloDone(
> > > > > >> > > > > > >> > ClientHandshaker.java:1134)
> > > > > >> > > > > > >> >             at
> > > > > >> > sun.security.ssl.ClientHandshaker.processMessage(
> > > > > >> > > > > > >> > ClientHandshaker.java:348)
> > > > > >> > > > > > >> >             at
> > > > > >> > > > > >
> sun.security.ssl.Handshaker.processLoop(Handshaker.java:
> > > > > >> > > > > > >> > 979)
> > > > > >> > > > > > >> >             at
> > > > > >> > > > > sun.security.ssl.Handshaker.process_record(Handshaker.
> > > > > >> > > > > > >> > java:914)
> > > > > >> > > > > > >> >             at
> > > > sun.security.ssl.SSLSocketImpl.readRecord(
> > > > > >> > > > > > >> > SSLSocketImpl.java:1062)
> > > > > >> > > > > > >> >             at
> > > > > >> > > > > sun.security.ssl.SSLSocketImpl.performInitialHandshake(
> > > > > >> > > > > > >> > SSLSocketImpl.java:1375)
> > > > > >> > > > > > >> >             at
> > > > > >> sun.security.ssl.SSLSocketImpl.startHandshake(
> > > > > >> > > > > > >> > SSLSocketImpl.java:1403)
> > > > > >> > > > > > >> >             at
> > > > > >> sun.security.ssl.SSLSocketImpl.startHandshake(
> > > > > >> > > > > > >> > SSLSocketImpl.java:1387)
> > > > > >> > > > > > >> >             at
> > > > > >> > > > org.apache.http.conn.ssl.SSLConnectionSocketFactory.
> > > > > >> > > > > > >> >
> > > > createLayeredSocket(SSLConnectionSocketFactory.java:394)
> > > > > >> > > > > > >> >             at
> > > > > >> > > > org.apache.http.conn.ssl.SSLConnectionSocketFactory.
> > > > > >> > > > > > >> >
> connectSocket(SSLConnectionSocketFactory.java:353)
> > > > > >> > > > > > >> >             at
> > > > > >> > > > > >
> org.apache.http.impl.conn.DefaultHttpClientConnectionOpe
> > > > > >> > > > > > >> >
> > > > > rator.connect(DefaultHttpClientConnectionOperator.java:134)
> > > > > >> > > > > > >> >             at
> > > > > >> > > > > >
> org.apache.http.impl.conn.PoolingHttpClientConnectionMan
> > > > > >> > > > > > >> >
> > > > ager.connect(PoolingHttpClientConnectionManager.java:353)
> > > > > >> > > > > > >> >             at
> > > > > >> org.apache.http.impl.execchain.MainClientExec.
> > > > > >> > > > > > >> > establishRoute(MainClientExec.java:380)
> > > > > >> > > > > > >> >             at
> > > > > >> org.apache.http.impl.execchain.MainClientExec.
> > > > > >> > > > > > >> > execute(MainClientExec.java:236)
> > > > > >> > > > > > >> >             at
> > > > > org.apache.http.impl.execchain.ProtocolExec.
> > > > > >> > > > > > >> > execute(ProtocolExec.java:184)
> > > > > >> > > > > > >> >             at
> > > > > >> > org.apache.http.impl.execchain.RetryExec.execute(
> > > > > >> > > > > > >> > RetryExec.java:88)
> > > > > >> > > > > > >> >             at
> > > > > org.apache.http.impl.execchain.RedirectExec.
> > > > > >> > > > > > >> > execute(RedirectExec.java:110)
> > > > > >> > > > > > >> >             at
> > > > > >> > > > > >
> > org.apache.http.impl.client.InternalHttpClient.doExecute(
> > > > > >> > > > > > >> > InternalHttpClient.java:184)
> > > > > >> > > > > > >> >             at
> > > > > >> > > > > >
> org.apache.http.impl.client.CloseableHttpClient.execute(
> > > > > >> > > > > > >> > CloseableHttpClient.java:82)
> > > > > >> > > > > > >> >             at
> > > > > >> > > > > >
> org.apache.http.impl.client.CloseableHttpClient.execute(
> > > > > >> > > > > > >> > CloseableHttpClient.java:107)
> > > > > >> > > > > > >> >             at
> > > > > >> > > com.gemstone.gemfire.rest.internal.web.controllers.
> > > > > >> > > > > > >> >
> > > > > >> > > > > > >>
> > > > > >> > > > > >
> > > > > >> > > > >
> > > > > >> > > >
> > > > > >> > >
> > > > > >> >
> > > > > >>
> > > > >
> > > >
> > >
> >
> RestAPIsWithSSLDUnitTest.validateConnection(RestAPIsWithSSLDUnitTest.java:
> > > > > >> > > > > > >> > 474)
> > > > > >> > > > > > >> >             ... 1 more
> > > > > >> > > > > > >> >
> > > > > >> > > > > > >> >             Caused by:
> > > > > >> > > > > > >> >             java.io.EOFException: SSL peer shut
> > down
> > > > > >> > incorrectly
> > > > > >> > > > > > >> >                 at
> > > > > >> > > > > > >>
> > sun.security.ssl.InputRecord.read(InputRecord.java:505)
> > > > > >> > > > > > >> >                 at
> > > > > >> sun.security.ssl.SSLSocketImpl.readRecord(
> > > > > >> > > > > > >> > SSLSocketImpl.java:973)
> > > > > >> > > > > > >> >                 ... 26 more
> > > > > >> > > > > > >> >
> > > > > >> > > > > > >> > java.lang.NoSuchFieldError: INSTANCE
> > > > > >> > > > > > >> >
> > > > > >> > > > > > >> > at
> > > > > >> > > > > > >> >
> > > > > >> > > > > > >>
> > > > > >> > > > > >
> > > > > >> > > > >
> > > > > >> > > >
> > > > > >> > >
> > > > > >> >
> > > > > >>
> > > > >
> > > >
> > >
> >
> org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<init>(DefaultHttpRequestWriterFactory.java:52)
> > > > > >> > > > > > >> > at
> > > > > >> > > > > > >> >
> > > > > >> > > > > > >>
> > > > > >> > > > > >
> > > > > >> > > > >
> > > > > >> > > >
> > > > > >> > >
> > > > > >> >
> > > > > >>
> > > > >
> > > >
> > >
> >
> org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<init>(DefaultHttpRequestWriterFactory.java:56)
> > > > > >> > > > > > >> > at
> > > > > >> > > > > > >> >
> > > > > >> > > > > > >>
> > > > > >> > > > > >
> > > > > >> > > > >
> > > > > >> > > >
> > > > > >> > >
> > > > > >> >
> > > > > >>
> > > > >
> > > >
> > >
> >
> org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<clinit>(DefaultHttpRequestWriterFactory.java:46)
> > > > > >> > > > > > >> > at
> > > > > >> > > > > > >> >
> > > > > >> > > > > > >>
> > > > > >> > > > > >
> > > > > >> > > > >
> > > > > >> > > >
> > > > > >> > >
> > > > > >> >
> > > > > >>
> > > > >
> > > >
> > >
> >
> org.apache.http.impl.conn.ManagedHttpClientConnectionFactory.<init>(ManagedHttpClientConnectionFactory.java:72)
> > > > > >> > > > > > >> > at
> > > > > >> > > > > > >> >
> > > > > >> > > > > > >>
> > > > > >> > > > > >
> > > > > >> > > > >
> > > > > >> > > >
> > > > > >> > >
> > > > > >> >
> > > > > >>
> > > > >
> > > >
> > >
> >
> org.apache.http.impl.conn.ManagedHttpClientConnectionFactory.<init>(ManagedHttpClientConnectionFactory.java:84)
> > > > > >> > > > > > >> > at
> > > > > >> > > > > > >> >
> > > > > >> > > > > > >>
> > > > > >> > > > > >
> > > > > >> > > > >
> > > > > >> > > >
> > > > > >> > >
> > > > > >> >
> > > > > >>
> > > > >
> > > >
> > >
> >
> org.apache.http.impl.conn.ManagedHttpClientConnectionFactory.<clinit>(ManagedHttpClientConnectionFactory.java:59)
> > > > > >> > > > > > >> > at
> > > > > >> > > > > > >> >
> > > > > >> > > > > > >>
> > > > > >> > > > > >
> > > > > >> > > > >
> > > > > >> > > >
> > > > > >> > >
> > > > > >> >
> > > > > >>
> > > > >
> > > >
> > >
> >
> org.apache.http.impl.conn.PoolingHttpClientConnectionManager$InternalConnectionFactory.<init>(PoolingHttpClientConnectionManager.java:487)
> > > > > >> > > > > > >> > at
> > > > > >> > > > > > >> >
> > > > > >> > > > > > >>
> > > > > >> > > > > >
> > > > > >> > > > >
> > > > > >> > > >
> > > > > >> > >
> > > > > >> >
> > > > > >>
> > > > >
> > > >
> > >
> >
> org.apache.http.impl.conn.PoolingHttpClientConnectionManager.<init>(PoolingHttpClientConnectionManager.java:147)
> > > > > >> > > > > > >> > at
> > > > > >> > > > > > >> >
> > > > > >> > > > > > >>
> > > > > >> > > > > >
> > > > > >> > > > >
> > > > > >> > > >
> > > > > >> > >
> > > > > >> >
> > > > > >>
> > > > >
> > > >
> > >
> >
> org.apache.http.impl.conn.PoolingHttpClientConnectionManager.<init>(PoolingHttpClientConnectionManager.java:136)
> > > > > >> > > > > > >> > at
> > > > > >> > > > > > >> >
> > > > > >> > > > > > >>
> > > > > >> > > > > >
> > > > > >> > > > >
> > > > > >> > > >
> > > > > >> > >
> > > > > >> >
> > > > > >>
> > > > >
> > > >
> > >
> >
> org.apache.http.impl.conn.PoolingHttpClientConnectionManager.<init>(PoolingHttpClientConnectionManager.java:112)
> > > > > >> > > > > > >> > at
> > > > > >> > > > > > >> >
> > > > > >> > > > > > >>
> > > > > >> > > > > >
> > > > > >> > > > >
> > > > > >> > > >
> > > > > >> > >
> > > > > >> >
> > > > > >>
> > > > >
> > > >
> > >
> >
> org.apache.http.impl.client.HttpClientBuilder.build(HttpClientBuilder.java:726)
> > > > > >> > > > > > >> > at
> > > > > >> > > > > > >> >
> > > > > >> > > > > > >>
> > > > > >> > > > > >
> > > > > >> > > > >
> > > > > >> > > >
> > > > > >> > >
> > > > > >> >
> > > > > >>
> > > > >
> > > >
> > >
> >
> com.gemstone.gemfire.rest.internal.web.controllers.RestAPIsWithSSLDUnitTest.getSSLBasedHTTPClient(RestAPIsWithSSLDUnitTest.java:458)
> > > > > >> > > > > > >> > at
> > > > > >> > > > > > >> >
> > > > > >> > > > > > >>
> > > > > >> > > > > >
> > > > > >> > > > >
> > > > > >> > > >
> > > > > >> > >
> > > > > >> >
> > > > > >>
> > > > >
> > > >
> > >
> >
> com.gemstone.gemfire.rest.internal.web.controllers.RestAPIsWithSSLDUnitTest.validateConnection(RestAPIsWithSSLDUnitTest.java:473)
> > > > > >> > > > > > >> > at
> > > > > >> > > > > > >> >
> > > > > >> > > > > > >>
> > > > > >> > > > > >
> > > > > >> > > > >
> > > > > >> > > >
> > > > > >> > >
> > > > > >> >
> > > > > >>
> > > > >
> > > >
> > >
> >
> com.gemstone.gemfire.rest.internal.web.controllers.RestAPIsWithSSLDUnitTest.testSSLWithoutKeyStoreType(RestAPIsWithSSLDUnitTest.java:522)
> > > > > >> > > > > > >> > 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:497)
> > > > > >> > > > > > >> > at
> > > junit.framework.TestCase.runTest(TestCase.java:176)
> > > > > >> > > > > > >> > at
> > > junit.framework.TestCase.runBare(TestCase.java:141)
> > > > > >> > > > > > >> > at
> > > > > >> junit.framework.TestResult$1.protect(TestResult.java:122)
> > > > > >> > > > > > >> > at
> > > > > >> > junit.framework.TestResult.runProtected(TestResult.java:142)
> > > > > >> > > > > > >> > at
> > > junit.framework.TestResult.run(TestResult.java:125)
> > > > > >> > > > > > >> > at
> junit.framework.TestCase.run(TestCase.java:129)
> > > > > >> > > > > > >> > at
> > > > junit.framework.TestSuite.runTest(TestSuite.java:252)
> > > > > >> > > > > > >> > at
> > junit.framework.TestSuite.run(TestSuite.java:247)
> > > > > >> > > > > > >> > at
> > > > > >> > > > > > >> >
> > > > > >> > > > > > >>
> > > > > >> > > > > >
> > > > > >> > > > >
> > > > > >> > > >
> > > > > >> > >
> > > > > >> >
> > > > > >>
> > > > >
> > > >
> > >
> >
> org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:86)
> > > > > >> > > > > > >> > at
> > org.junit.runner.JUnitCore.run(JUnitCore.java:137)
> > > > > >> > > > > > >> > at
> > > > > >> > > > > > >> >
> > > > > >> > > > > > >>
> > > > > >> > > > > >
> > > > > >> > > > >
> > > > > >> > > >
> > > > > >> > >
> > > > > >> >
> > > > > >>
> > > > >
> > > >
> > >
> >
> com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
> > > > > >> > > > > > >> > at
> > > > > >> > > > > > >> >
> > > > > >> > > > > > >>
> > > > > >> > > > > >
> > > > > >> > > > >
> > > > > >> > > >
> > > > > >> > >
> > > > > >> >
> > > > > >>
> > > > >
> > > >
> > >
> >
> com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:234)
> > > > > >> > > > > > >> > at
> > > > > >> > > > > > >>
> > > > > >> > > > >
> > > > > >> >
> > > > >
> > com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:74)
> > > > > >> > > > > > >> > 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:497)
> > > > > >> > > > > > >> > at
> > > > > >> > > > > >
> > > > > >> >
> > > com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
> > > > > >> > > > > > >> >
> > > > > >> > > > > > >> >
> > > > > >> > > > > > >>
> > > > > >> > > > > > >
> > > > > >> > > > > > >
> > > > > >> > > > > >
> > > > > >> > > > >
> > > > > >> > > > >
> > > > > >> > > > >
> > > > > >> > > > > --
> > > > > >> > > > > -John
> > > > > >> > > > > 503-504-8657
> > > > > >> > > > > john.blum10101 (skype)
> > > > > >> > > > >
> > > > > >> > > >
> > > > > >> > >
> > > > > >> > >
> > > > > >> > >
> > > > > >> > > --
> > > > > >> > > -John
> > > > > >> > > 503-504-8657
> > > > > >> > > john.blum10101 (skype)
> > > > > >> > >
> > > > > >> >
> > > > > >>
> > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > -John
> > > > > > 503-504-8657
> > > > > > john.blum10101 (skype)
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > -John
> > > > > 503-504-8657
> > > > > john.blum10101 (skype)
> > > > >
> > > >
> > >
> > >
> > >
> > > --
> > > -John
> > > 503-504-8657
> > > john.blum10101 (skype)
> > >
> >
>



-- 
-John
503-504-8657
john.blum10101 (skype)

Re: RestAPIsWithSSLDUnitTest fails

Posted by Kirk Lund <kl...@pivotal.io>.
Jianxia is also hitting the same error but in Eclipse. The resulting
Eclipse project also has two versions of httpcore and httpclient in
geode-assembly that results in java.lang.NoSuchFieldError: INSTANCE when
trying to execute RestAPIsWithSSLDUnitTest in Eclipse. So it's not limited
just to IntelliJ or to one unlucky Geode developer.

The end result is that there are now at least two of us who are hindered in
our ability to debug RestAPIsWithSSLDUnitTest. Hopefully he'll have more
luck with Eclipse than I'm having with it in IntelliJ.

-Kirk


On Wed, Mar 23, 2016 at 3:09 PM, Mark Bretl <as...@gmail.com> wrote:

> Each version of httpclient has a dependency on a different version of
> httpcore, hence the reason seeing two versions of httpcore. If the IDEA
> plugin is not respecting the configuration we have in the Gradle build
> files, then that is an issue with the IDEA. I found an article from 2013,
> which dealt with the issue,
>
> http://arhipov.blogspot.com/2013/10/managing-dependencies-for-intellij-idea.html
>
> I agree with John and Dan, we do not want to go back to non-transitive
> dependencies because that is what led to this situation. Until GEODE-1072
> is completed, we may be stuck in this mess. Maybe we should prioritize
> GEODE-1072 for M2? I don't want to since it does not have direct affect on
> the M2 release goals/scope, however, it is a step in the path to the 1.0.0
> release.
>
> --Mark
>
> On Wed, Mar 23, 2016 at 2:48 PM, John Blum <jb...@pivotal.io> wrote:
>
> > The only way to properly (& reliably) control that then is with the
> > equivalent of a dependencyManagement declaration in Geode's Gradle build
> > script for the test dependencies.
> >
> > https://docs.gradle.org/current/userguide/dependency_management.html,
> > section "*23.2.2. Managing transitive dependencies*" is a good place to
> > start. Also, "*23.2.3. Resolve version conflicts*" talks about resolution
> > strategies.
> >
> >
> > On Wed, Mar 23, 2016 at 2:25 PM, Kirk Lund <kl...@pivotal.io> wrote:
> >
> > > Yep, that's the way I built one of the two projects I currently have
> and
> > it
> > > does work better but it has duplicates of httpclient and httpcore.
> > >
> > >
> > > On Wed, Mar 23, 2016 at 1:45 PM, John Blum <jb...@pivotal.io> wrote:
> > >
> > > > I.e. ... "File" -> "New" -> "Project from Existing Sources..." ->
> > <select
> > > > your Geode working directory> -> "Import project from external model"
> > ->
> > > > "Gradle"
> > > >
> > > > I don't trust Gradle to do the right thing when setting up an IDE
> > > > (especially as the IDE versions change).
> > > >
> > > > Disclaimer: I have not tried this recently, but I usually have more
> > > success
> > > > going this route.
> > > >
> > > > -John
> > > >
> > > >
> > > > On Wed, Mar 23, 2016 at 1:40 PM, John Blum <jb...@pivotal.io> wrote:
> > > >
> > > > > Kirk- rather than have Gradle generate the .idea project files,
> have
> > > you
> > > > > tried importing the Geode project from existing sources using
> Gradle
> > > the
> > > > > template?
> > > > >
> > > > > On Wed, Mar 23, 2016 at 1:28 PM, Kirk Lund <kl...@pivotal.io>
> wrote:
> > > > >
> > > > >> RestAPIsWithSSLDUnitTest passes on the command-line.
> > > > >>
> > > > >> When I execute RestAPIsWithSSLDUnitTest in my IntelliJ project,
> the
> > > > >> classpath of the test prints out with two versions of httpclient
> and
> > > > >> httpcore:
> > > > >>
> > > > >> [vm_1]
> > > > >>
> > > > >>
> > > >
> > >
> >
> /Users/klund/.gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpclient/4.2.5/666e26e76f2e87d84e4f16acb546481ae1b8e9a6/httpclient-4.2.5.jar
> > > > >> [vm_1]
> > > > >>
> > > > >>
> > > >
> > >
> >
> /Users/klund/.gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpcore/4.2.4/3b7f38df6de5dd8b500e602ae8c2dd5ee446f883/httpcore-4.2.4.jar
> > > > >> [vm_1]
> > > > >>
> > > > >>
> > > >
> > >
> >
> /Users/klund/.gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpclient/4.5.1/7e3cecc566df91338c6c67883b89ddd05a17db43/httpclient-4.5.1.jar
> > > > >> [vm_1]
> > > > >>
> > > > >>
> > > >
> > >
> >
> /Users/klund/.gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpcore/4.4.3/e876a79d561e5c6207b78d347e198c8c4531a5e5/httpcore-4.4.3.jar
> > > > >>
> > > > >> If you use "./gradlew idea" the resulting module definitions are
> not
> > > > >> sufficient (to illustrate, try generating intellij projects for
> > > > >> closed+open
> > > > >> and then try editing and running DUnits in legacyDUnit and both
> > > assembly
> > > > >> projects) and require some manual adjusting which is obviously
> error
> > > > >> prone.
> > > > >> I'm not an IntelliJ or gradle expert so I doubt that I'll be the
> one
> > > to
> > > > >> fix
> > > > >> this.
> > > > >>
> > > > >> Ultimately I'd like to see all of this become easier and simpler.
> I
> > > > >> believe
> > > > >> too much complexity or difficulty will result in a smaller number
> of
> > > > >> contributors. It also results in contributors spending their time
> > with
> > > > >> gradle or the IDE instead of on geode.
> > > > >>
> > > > >> -Kirk
> > > > >>
> > > > >>
> > > > >> On Wed, Mar 23, 2016 at 12:04 PM, Dan Smith <ds...@pivotal.io>
> > > wrote:
> > > > >>
> > > > >> > First off, your intellij classpath and gradle classpath are
> pretty
> > > > much
> > > > >> the
> > > > >> > same. The one exception, I think, is that the test target for
> > > > >> > geode-assembly sets up a different runtime classpath to point at
> > the
> > > > >> > bundled product. I didn't set that up, but I think maybe the
> idea
> > is
> > > > >> that
> > > > >> > we needed some tests of the actual bundled binary? Take a look
> at
> > > > >> > geode-assembly/build.gradle. If someone knows how to fix the
> setup
> > > > that
> > > > >> so
> > > > >> > we still have that test coverage of the bundled product and the
> > > tests
> > > > do
> > > > >> > work in intellij, please fix it! All of the rest of the tests
> > should
> > > > be
> > > > >> > using exactly the same environment on the command line and in
> the
> > > IDE.
> > > > >> >
> > > > >> > I'm not sure if this is even your problem Kirk, did you try
> > running
> > > > from
> > > > >> > the command line?
> > > > >> >
> > > > >> > Second, I don't see anything wrong with having transitive test
> > > > >> > dependencies. It's a huge pain to track down the transitive
> > > > dependencies
> > > > >> > and keep them up to date manually. They aren't hurting you!
> > > > >> >
> > > > >> > Regarding John's struggles with dependencies of geode, what we
> > > really
> > > > >> need
> > > > >> > to do is clean up *product* dependencies of geode core - we're
> > > pulling
> > > > >> in
> > > > >> > all sorts of stuff for gfsh, pulse, the REST API, etc. GEODE-818
> > is
> > > > all
> > > > >> > about cleaning that up. I was hoping to take up GEODE-1072
> (remove
> > > > HDFS
> > > > >> > code) when I get a chance. If you want to clean up the
> > dependencies
> > > > >> please
> > > > >> > chip in and take on some of those subtasks, the sooner the
> better!
> > > > >> >
> > > > >> > -Dan
> > > > >> >
> > > > >> > On Wed, Mar 23, 2016 at 11:34 AM, John Blum <jb...@pivotal.io>
> > > wrote:
> > > > >> >
> > > > >> > > If you created the IntelliJ IDEA project from the Gradle
> build,
> > > then
> > > > >> it
> > > > >> > is
> > > > >> > > Geode's Gradle build scripts that are specifying the
> > dependencies
> > > > and
> > > > >> > thus
> > > > >> > > the Gradle build scripts are wrong.  In Maven, you can
> declare a
> > > > >> > > dependencyManagement section (along with exclusions) to manage
> > > > >> transitive
> > > > >> > > dependencies.  I don't recall what the equivalent is in Gradle
> > for
> > > > >> > > dependencyManagement.
> > > > >> > >
> > > > >> > > On Wed, Mar 23, 2016 at 11:24 AM, Kirk Lund <klund@pivotal.io
> >
> > > > wrote:
> > > > >> > >
> > > > >> > > > I think that maybe we don't want to continue with transitive
> > > > >> > dependencies
> > > > >> > > > enabled for testing. If we turn that off then we go back to
> > > having
> > > > >> to
> > > > >> > > > specify all versions even runtime test dependencies right?
> Are
> > > > there
> > > > >> > any
> > > > >> > > > valid arguments for keeping transitive dependencies enabled
> > for
> > > > >> > testing?
> > > > >> > > >
> > > > >> > > > Also, why would my intellij dependencies be different from
> > > gradle
> > > > >> > > > command-line? The one was built from the *.gradle files in
> > > geode.
> > > > If
> > > > >> > > > intellij's gradle picks up multiple versions of libraries,
> > then
> > > I
> > > > >> think
> > > > >> > > > that still means something isn't right in our *.gradle
> files.
> > > > >> > > >
> > > > >> > > > Not that I want to see test failures... BUT, I want to spend
> > my
> > > > time
> > > > >> > > > diagnosing test failures instead of dealing with gradle and
> > > > >> dependency
> > > > >> > > > versioning and wondering why intellij is picking up 2
> versions
> > > of
> > > > >> jna,
> > > > >> > 3
> > > > >> > > > versions of apache http, etc.
> > > > >> > > >
> > > > >> > > > -Kirk
> > > > >> > > >
> > > > >> > > >
> > > > >> > > > On Wed, Mar 23, 2016 at 11:04 AM, John Blum <
> jblum@pivotal.io
> > >
> > > > >> wrote:
> > > > >> > > >
> > > > >> > > > > In a nutshell, you want the dependencies and all the
> > > transitive
> > > > >> > > > > dependencies versions to agree, otherwise conflicts like
> > what
> > > > Kirk
> > > > >> > > > > experienced, as well as what I experienced while
> integrating
> > > > >> Apache
> > > > >> > > Geode
> > > > >> > > > > support into Spring Session, will occur, and users will
> have
> > > > >> problems
> > > > >> > > > using
> > > > >> > > > > Geode in different contexts (e.g. App Server containers
> for
> > > > >> Session
> > > > >> > > > > management)
> > > > >> > > > >
> > > > >> > > > > Letting transitive dependencies of Geode (i.e.
> sub-projects)
> > > > >> dictate
> > > > >> > > > > dependency versions is NOT right and recipe for disaster.
> > > Also,
> > > > >> you
> > > > >> > > are
> > > > >> > > > > not testing the dependencies, you are testing Geode with
> the
> > > > >> > > > dependencies.
> > > > >> > > > >
> > > > >> > > > >
> > > > >> > > > > On Wed, Mar 23, 2016 at 10:48 AM, Dan Smith <
> > > dsmith@pivotal.io>
> > > > >> > wrote:
> > > > >> > > > >
> > > > >> > > > > > As far as the multiple versions of httpclient, I only
> see
> > > that
> > > > >> > > > dependency
> > > > >> > > > > > showing up in the test dependencies. Different sub
> > projects
> > > > have
> > > > >> > > > > different
> > > > >> > > > > > test dependencies, which are transitively pulling in
> > > different
> > > > >> > > versions
> > > > >> > > > > of
> > > > >> > > > > > this jar.
> > > > >> > > > > >
> > > > >> > > > > > We can certainly force a version across all of the
> > different
> > > > >> > projects
> > > > >> > > > in
> > > > >> > > > > > dependency-resolution.gradle. But I think given these
> are
> > > > >> different
> > > > >> > > > > > projects with different test dependencies we should just
> > let
> > > > >> them
> > > > >> > > pull
> > > > >> > > > in
> > > > >> > > > > > whatever test dependencies they need.
> > > > >> > > > > >
> > > > >> > > > > >
> > > > >> > > > > > > ./gradlew geode-core:dependencyInsight --dependency
> > > > httpclient
> > > > >> > > > > > --configuration testRuntime
> > > > >> > > > > > Picked up JAVA_TOOL_OPTIONS:
> > > > >> > > > > > :geode-core:dependencyInsight
> > > > >> > > > > > org.apache.httpcomponents:httpclient:4.2.5
> > > > >> > > > > > \--- org.apache.hadoop:hadoop-auth:2.4.1
> > > > >> > > > > >      \--- testRuntime
> > > > >> > > > > >
> > > > >> > > > > >
> > > > >> > > > > >
> > > > >> > > > > > > ./gradlew geode-pulse:dependencyInsight --dependency
> > > > >> httpclient
> > > > >> > > > > > --configuration testRuntime
> > > > >> > > > > > Picked up JAVA_TOOL_OPTIONS:
> > > > >> > > > > > :geode-pulse:dependencyInsight
> > > > >> > > > > > org.apache.httpcomponents:httpclient:4.5.1
> > > > >> > > > > > +--- org.seleniumhq.selenium:selenium-api:2.52.0
> > > > >> > > > > > |    +--- testRuntime
> > > > >> > > > > > |    \---
> > > > org.seleniumhq.selenium:selenium-remote-driver:2.52.0
> > > > >> > > > > > |         +--- testRuntime
> > > > >> > > > > > |         +---
> > > > >> > org.seleniumhq.selenium:selenium-firefox-driver:2.52.0
> > > > >> > > > > > |         |    \--- testRuntime
> > > > >> > > > > > |         \---
> > > org.seleniumhq.selenium:selenium-support:2.52.0
> > > > >> > > > > > |              \--- testRuntime
> > > > >> > > > > > \---
> org.seleniumhq.selenium:selenium-remote-driver:2.52.0
> > > (*)
> > > > >> > > > > >
> > > > >> > > > > >
> > > > >> > > > > >
> > > > >> > > > > > On Wed, Mar 23, 2016 at 10:27 AM, Dan Smith <
> > > > dsmith@pivotal.io>
> > > > >> > > wrote:
> > > > >> > > > > >
> > > > >> > > > > > > The tests in that geode-assembly project are supposed
> to
> > > run
> > > > >> on
> > > > >> > the
> > > > >> > > > > > binary
> > > > >> > > > > > > assembly of the project, so I think the classpath when
> > run
> > > > >> from
> > > > >> > the
> > > > >> > > > > > command
> > > > >> > > > > > > line might be a bit different than what you get in
> > > > intellij. I
> > > > >> > > think
> > > > >> > > > > the
> > > > >> > > > > > > command line classpath just points at
> > > > geode-dependencies.jar.
> > > > >> > > > > > >
> > > > >> > > > > > > -Dan
> > > > >> > > > > > >
> > > > >> > > > > > >
> > > > >> > > > > > > On Wed, Mar 23, 2016 at 10:01 AM, Kirk Lund <
> > > > klund@pivotal.io
> > > > >> >
> > > > >> > > > wrote:
> > > > >> > > > > > >
> > > > >> > > > > > >> So as I look at dependencies, I see that our gradle
> > build
> > > > is
> > > > >> > > > > ultimately
> > > > >> > > > > > >> depending on multiple versions of the same libraries.
> > > Can't
> > > > >> we
> > > > >> > > clean
> > > > >> > > > > > this
> > > > >> > > > > > >> up?
> > > > >> > > > > > >>
> > > > >> > > > > > >> org.apache.httpcomponents:httpclient:4.2.5
> > > > >> > > > > > >> org.apache.httpcomponents:httpclient:4.3.3
> > > > >> > > > > > >> org.apache.httpcomponents:httpclient:4.5.1
> > > > >> > > > > > >>
> > > > >> > > > > > >> I really don't want multiple versions of anything in
> > this
> > > > >> > project.
> > > > >> > > > Are
> > > > >> > > > > > we
> > > > >> > > > > > >> not using gradle correctly?
> > > > >> > > > > > >>
> > > > >> > > > > > >> -Kirk
> > > > >> > > > > > >>
> > > > >> > > > > > >>
> > > > >> > > > > > >> On Wed, Mar 23, 2016 at 9:23 AM, Kirk Lund <
> > > > klund@pivotal.io
> > > > >> >
> > > > >> > > > wrote:
> > > > >> > > > > > >>
> > > > >> > > > > > >> > RestAPIsWithSSLDUnitTest failed in the nightly
> build.
> > > > >> Failure
> > > > >> > > > stack
> > > > >> > > > > is
> > > > >> > > > > > >> > below. I tried running this test by itself in
> > intellij
> > > > and
> > > > >> it
> > > > >> > > > fails
> > > > >> > > > > > >> with "java.lang.NoSuchFieldError:
> > > > >> > > > > > >> > INSTANCE" from "at
> > > > >> > > > > > >> >
> > > > >> > > > > > >>
> > > > >> > > > > >
> > > > >> > > > >
> > > > >> > > >
> > > > >> > >
> > > > >> >
> > > > >>
> > > >
> > >
> >
> org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<init>(DefaultHttpRequestWriterFactory.java:52)".
> > > > >> > > > > > >> > I posted that failure stack below as well.
> > > > >> > > > > > >> >
> > > > >> > > > > > >> > Any ideas what the NoSuckFieldError is about?
> > > > >> > > > > > >> >
> > > > >> > > > > > >> > :geode-assembly:distributedTest
> > > > >> > > > > > >> >
> > > > >> > > > > > >> >
> > > > >> > > > > > >>
> > > > >> > > > > >
> > > > >> > > > >
> > > > >> > > >
> > > > >> > >
> > > > >> >
> > > > >>
> > > >
> > >
> >
> com.gemstone.gemfire.rest.internal.web.controllers.RestAPIsWithSSLDUnitTest
> > > > >> > > > > > >> > > testMutualAuthentication FAILED
> > > > >> > > > > > >> >     java.lang.RuntimeException: unexpected
> exception
> > > > >> > > > > > >> >         at
> > > > >> com.gemstone.gemfire.rest.internal.web.controllers.
> > > > >> > > > > > >> >
> > > > >> > > > > > >>
> > > > >> > > > > >
> > > > >> > > > >
> > > > >> > > >
> > > > >> > >
> > > > >> >
> > > > >>
> > > >
> > >
> >
> RestAPIsWithSSLDUnitTest.validateConnection(RestAPIsWithSSLDUnitTest.java:
> > > > >> > > > > > >> > 495)
> > > > >> > > > > > >> >         at
> > > > >> com.gemstone.gemfire.rest.internal.web.controllers.
> > > > >> > > > > > >> > RestAPIsWithSSLDUnitTest.testMutualAuthentication(
> > > > >> > > > > > >> > RestAPIsWithSSLDUnitTest.java:648)
> > > > >> > > > > > >> >
> > > > >> > > > > > >> >         Caused by:
> > > > >> > > > > > >> >         javax.net.ssl.SSLHandshakeException: Remote
> > > host
> > > > >> > closed
> > > > >> > > > > > >> > connection during handshake
> > > > >> > > > > > >> >             at
> > > sun.security.ssl.SSLSocketImpl.readRecord(
> > > > >> > > > > > >> > SSLSocketImpl.java:992)
> > > > >> > > > > > >> >             at
> > > > sun.security.ssl.SSLSocketImpl.waitForClose(
> > > > >> > > > > > >> > SSLSocketImpl.java:1769)
> > > > >> > > > > > >> >             at
> > > sun.security.ssl.HandshakeOutStream.flush(
> > > > >> > > > > > >> > HandshakeOutStream.java:124)
> > > > >> > > > > > >> >             at
> > > > >> > sun.security.ssl.Handshaker.sendChangeCipherSpec(
> > > > >> > > > > > >> > Handshaker.java:1083)
> > > > >> > > > > > >> >             at sun.security.ssl.ClientHandshaker.
> > > > >> > > > > > >> >
> sendChangeCipherAndFinish(ClientHandshaker.java:1222)
> > > > >> > > > > > >> >             at
> > > > >> > > sun.security.ssl.ClientHandshaker.serverHelloDone(
> > > > >> > > > > > >> > ClientHandshaker.java:1134)
> > > > >> > > > > > >> >             at
> > > > >> > sun.security.ssl.ClientHandshaker.processMessage(
> > > > >> > > > > > >> > ClientHandshaker.java:348)
> > > > >> > > > > > >> >             at
> > > > >> > > > > > sun.security.ssl.Handshaker.processLoop(Handshaker.java:
> > > > >> > > > > > >> > 979)
> > > > >> > > > > > >> >             at
> > > > >> > > > > sun.security.ssl.Handshaker.process_record(Handshaker.
> > > > >> > > > > > >> > java:914)
> > > > >> > > > > > >> >             at
> > > sun.security.ssl.SSLSocketImpl.readRecord(
> > > > >> > > > > > >> > SSLSocketImpl.java:1062)
> > > > >> > > > > > >> >             at
> > > > >> > > > > sun.security.ssl.SSLSocketImpl.performInitialHandshake(
> > > > >> > > > > > >> > SSLSocketImpl.java:1375)
> > > > >> > > > > > >> >             at
> > > > >> sun.security.ssl.SSLSocketImpl.startHandshake(
> > > > >> > > > > > >> > SSLSocketImpl.java:1403)
> > > > >> > > > > > >> >             at
> > > > >> sun.security.ssl.SSLSocketImpl.startHandshake(
> > > > >> > > > > > >> > SSLSocketImpl.java:1387)
> > > > >> > > > > > >> >             at
> > > > >> > > > org.apache.http.conn.ssl.SSLConnectionSocketFactory.
> > > > >> > > > > > >> >
> > > createLayeredSocket(SSLConnectionSocketFactory.java:394)
> > > > >> > > > > > >> >             at
> > > > >> > > > org.apache.http.conn.ssl.SSLConnectionSocketFactory.
> > > > >> > > > > > >> > connectSocket(SSLConnectionSocketFactory.java:353)
> > > > >> > > > > > >> >             at
> > > > >> > > > > > org.apache.http.impl.conn.DefaultHttpClientConnectionOpe
> > > > >> > > > > > >> >
> > > > rator.connect(DefaultHttpClientConnectionOperator.java:134)
> > > > >> > > > > > >> >             at
> > > > >> > > > > > org.apache.http.impl.conn.PoolingHttpClientConnectionMan
> > > > >> > > > > > >> >
> > > ager.connect(PoolingHttpClientConnectionManager.java:353)
> > > > >> > > > > > >> >             at
> > > > >> org.apache.http.impl.execchain.MainClientExec.
> > > > >> > > > > > >> > establishRoute(MainClientExec.java:380)
> > > > >> > > > > > >> >             at
> > > > >> org.apache.http.impl.execchain.MainClientExec.
> > > > >> > > > > > >> > execute(MainClientExec.java:236)
> > > > >> > > > > > >> >             at
> > > > org.apache.http.impl.execchain.ProtocolExec.
> > > > >> > > > > > >> > execute(ProtocolExec.java:184)
> > > > >> > > > > > >> >             at
> > > > >> > org.apache.http.impl.execchain.RetryExec.execute(
> > > > >> > > > > > >> > RetryExec.java:88)
> > > > >> > > > > > >> >             at
> > > > org.apache.http.impl.execchain.RedirectExec.
> > > > >> > > > > > >> > execute(RedirectExec.java:110)
> > > > >> > > > > > >> >             at
> > > > >> > > > > >
> org.apache.http.impl.client.InternalHttpClient.doExecute(
> > > > >> > > > > > >> > InternalHttpClient.java:184)
> > > > >> > > > > > >> >             at
> > > > >> > > > > > org.apache.http.impl.client.CloseableHttpClient.execute(
> > > > >> > > > > > >> > CloseableHttpClient.java:82)
> > > > >> > > > > > >> >             at
> > > > >> > > > > > org.apache.http.impl.client.CloseableHttpClient.execute(
> > > > >> > > > > > >> > CloseableHttpClient.java:107)
> > > > >> > > > > > >> >             at
> > > > >> > > com.gemstone.gemfire.rest.internal.web.controllers.
> > > > >> > > > > > >> >
> > > > >> > > > > > >>
> > > > >> > > > > >
> > > > >> > > > >
> > > > >> > > >
> > > > >> > >
> > > > >> >
> > > > >>
> > > >
> > >
> >
> RestAPIsWithSSLDUnitTest.validateConnection(RestAPIsWithSSLDUnitTest.java:
> > > > >> > > > > > >> > 474)
> > > > >> > > > > > >> >             ... 1 more
> > > > >> > > > > > >> >
> > > > >> > > > > > >> >             Caused by:
> > > > >> > > > > > >> >             java.io.EOFException: SSL peer shut
> down
> > > > >> > incorrectly
> > > > >> > > > > > >> >                 at
> > > > >> > > > > > >>
> sun.security.ssl.InputRecord.read(InputRecord.java:505)
> > > > >> > > > > > >> >                 at
> > > > >> sun.security.ssl.SSLSocketImpl.readRecord(
> > > > >> > > > > > >> > SSLSocketImpl.java:973)
> > > > >> > > > > > >> >                 ... 26 more
> > > > >> > > > > > >> >
> > > > >> > > > > > >> > java.lang.NoSuchFieldError: INSTANCE
> > > > >> > > > > > >> >
> > > > >> > > > > > >> > at
> > > > >> > > > > > >> >
> > > > >> > > > > > >>
> > > > >> > > > > >
> > > > >> > > > >
> > > > >> > > >
> > > > >> > >
> > > > >> >
> > > > >>
> > > >
> > >
> >
> org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<init>(DefaultHttpRequestWriterFactory.java:52)
> > > > >> > > > > > >> > at
> > > > >> > > > > > >> >
> > > > >> > > > > > >>
> > > > >> > > > > >
> > > > >> > > > >
> > > > >> > > >
> > > > >> > >
> > > > >> >
> > > > >>
> > > >
> > >
> >
> org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<init>(DefaultHttpRequestWriterFactory.java:56)
> > > > >> > > > > > >> > at
> > > > >> > > > > > >> >
> > > > >> > > > > > >>
> > > > >> > > > > >
> > > > >> > > > >
> > > > >> > > >
> > > > >> > >
> > > > >> >
> > > > >>
> > > >
> > >
> >
> org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<clinit>(DefaultHttpRequestWriterFactory.java:46)
> > > > >> > > > > > >> > at
> > > > >> > > > > > >> >
> > > > >> > > > > > >>
> > > > >> > > > > >
> > > > >> > > > >
> > > > >> > > >
> > > > >> > >
> > > > >> >
> > > > >>
> > > >
> > >
> >
> org.apache.http.impl.conn.ManagedHttpClientConnectionFactory.<init>(ManagedHttpClientConnectionFactory.java:72)
> > > > >> > > > > > >> > at
> > > > >> > > > > > >> >
> > > > >> > > > > > >>
> > > > >> > > > > >
> > > > >> > > > >
> > > > >> > > >
> > > > >> > >
> > > > >> >
> > > > >>
> > > >
> > >
> >
> org.apache.http.impl.conn.ManagedHttpClientConnectionFactory.<init>(ManagedHttpClientConnectionFactory.java:84)
> > > > >> > > > > > >> > at
> > > > >> > > > > > >> >
> > > > >> > > > > > >>
> > > > >> > > > > >
> > > > >> > > > >
> > > > >> > > >
> > > > >> > >
> > > > >> >
> > > > >>
> > > >
> > >
> >
> org.apache.http.impl.conn.ManagedHttpClientConnectionFactory.<clinit>(ManagedHttpClientConnectionFactory.java:59)
> > > > >> > > > > > >> > at
> > > > >> > > > > > >> >
> > > > >> > > > > > >>
> > > > >> > > > > >
> > > > >> > > > >
> > > > >> > > >
> > > > >> > >
> > > > >> >
> > > > >>
> > > >
> > >
> >
> org.apache.http.impl.conn.PoolingHttpClientConnectionManager$InternalConnectionFactory.<init>(PoolingHttpClientConnectionManager.java:487)
> > > > >> > > > > > >> > at
> > > > >> > > > > > >> >
> > > > >> > > > > > >>
> > > > >> > > > > >
> > > > >> > > > >
> > > > >> > > >
> > > > >> > >
> > > > >> >
> > > > >>
> > > >
> > >
> >
> org.apache.http.impl.conn.PoolingHttpClientConnectionManager.<init>(PoolingHttpClientConnectionManager.java:147)
> > > > >> > > > > > >> > at
> > > > >> > > > > > >> >
> > > > >> > > > > > >>
> > > > >> > > > > >
> > > > >> > > > >
> > > > >> > > >
> > > > >> > >
> > > > >> >
> > > > >>
> > > >
> > >
> >
> org.apache.http.impl.conn.PoolingHttpClientConnectionManager.<init>(PoolingHttpClientConnectionManager.java:136)
> > > > >> > > > > > >> > at
> > > > >> > > > > > >> >
> > > > >> > > > > > >>
> > > > >> > > > > >
> > > > >> > > > >
> > > > >> > > >
> > > > >> > >
> > > > >> >
> > > > >>
> > > >
> > >
> >
> org.apache.http.impl.conn.PoolingHttpClientConnectionManager.<init>(PoolingHttpClientConnectionManager.java:112)
> > > > >> > > > > > >> > at
> > > > >> > > > > > >> >
> > > > >> > > > > > >>
> > > > >> > > > > >
> > > > >> > > > >
> > > > >> > > >
> > > > >> > >
> > > > >> >
> > > > >>
> > > >
> > >
> >
> org.apache.http.impl.client.HttpClientBuilder.build(HttpClientBuilder.java:726)
> > > > >> > > > > > >> > at
> > > > >> > > > > > >> >
> > > > >> > > > > > >>
> > > > >> > > > > >
> > > > >> > > > >
> > > > >> > > >
> > > > >> > >
> > > > >> >
> > > > >>
> > > >
> > >
> >
> com.gemstone.gemfire.rest.internal.web.controllers.RestAPIsWithSSLDUnitTest.getSSLBasedHTTPClient(RestAPIsWithSSLDUnitTest.java:458)
> > > > >> > > > > > >> > at
> > > > >> > > > > > >> >
> > > > >> > > > > > >>
> > > > >> > > > > >
> > > > >> > > > >
> > > > >> > > >
> > > > >> > >
> > > > >> >
> > > > >>
> > > >
> > >
> >
> com.gemstone.gemfire.rest.internal.web.controllers.RestAPIsWithSSLDUnitTest.validateConnection(RestAPIsWithSSLDUnitTest.java:473)
> > > > >> > > > > > >> > at
> > > > >> > > > > > >> >
> > > > >> > > > > > >>
> > > > >> > > > > >
> > > > >> > > > >
> > > > >> > > >
> > > > >> > >
> > > > >> >
> > > > >>
> > > >
> > >
> >
> com.gemstone.gemfire.rest.internal.web.controllers.RestAPIsWithSSLDUnitTest.testSSLWithoutKeyStoreType(RestAPIsWithSSLDUnitTest.java:522)
> > > > >> > > > > > >> > 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:497)
> > > > >> > > > > > >> > at
> > junit.framework.TestCase.runTest(TestCase.java:176)
> > > > >> > > > > > >> > at
> > junit.framework.TestCase.runBare(TestCase.java:141)
> > > > >> > > > > > >> > at
> > > > >> junit.framework.TestResult$1.protect(TestResult.java:122)
> > > > >> > > > > > >> > at
> > > > >> > junit.framework.TestResult.runProtected(TestResult.java:142)
> > > > >> > > > > > >> > at
> > junit.framework.TestResult.run(TestResult.java:125)
> > > > >> > > > > > >> > at junit.framework.TestCase.run(TestCase.java:129)
> > > > >> > > > > > >> > at
> > > junit.framework.TestSuite.runTest(TestSuite.java:252)
> > > > >> > > > > > >> > at
> junit.framework.TestSuite.run(TestSuite.java:247)
> > > > >> > > > > > >> > at
> > > > >> > > > > > >> >
> > > > >> > > > > > >>
> > > > >> > > > > >
> > > > >> > > > >
> > > > >> > > >
> > > > >> > >
> > > > >> >
> > > > >>
> > > >
> > >
> >
> org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:86)
> > > > >> > > > > > >> > at
> org.junit.runner.JUnitCore.run(JUnitCore.java:137)
> > > > >> > > > > > >> > at
> > > > >> > > > > > >> >
> > > > >> > > > > > >>
> > > > >> > > > > >
> > > > >> > > > >
> > > > >> > > >
> > > > >> > >
> > > > >> >
> > > > >>
> > > >
> > >
> >
> com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
> > > > >> > > > > > >> > at
> > > > >> > > > > > >> >
> > > > >> > > > > > >>
> > > > >> > > > > >
> > > > >> > > > >
> > > > >> > > >
> > > > >> > >
> > > > >> >
> > > > >>
> > > >
> > >
> >
> com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:234)
> > > > >> > > > > > >> > at
> > > > >> > > > > > >>
> > > > >> > > > >
> > > > >> >
> > > >
> com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:74)
> > > > >> > > > > > >> > 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:497)
> > > > >> > > > > > >> > at
> > > > >> > > > > >
> > > > >> >
> > com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
> > > > >> > > > > > >> >
> > > > >> > > > > > >> >
> > > > >> > > > > > >>
> > > > >> > > > > > >
> > > > >> > > > > > >
> > > > >> > > > > >
> > > > >> > > > >
> > > > >> > > > >
> > > > >> > > > >
> > > > >> > > > > --
> > > > >> > > > > -John
> > > > >> > > > > 503-504-8657
> > > > >> > > > > john.blum10101 (skype)
> > > > >> > > > >
> > > > >> > > >
> > > > >> > >
> > > > >> > >
> > > > >> > >
> > > > >> > > --
> > > > >> > > -John
> > > > >> > > 503-504-8657
> > > > >> > > john.blum10101 (skype)
> > > > >> > >
> > > > >> >
> > > > >>
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > -John
> > > > > 503-504-8657
> > > > > john.blum10101 (skype)
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > -John
> > > > 503-504-8657
> > > > john.blum10101 (skype)
> > > >
> > >
> >
> >
> >
> > --
> > -John
> > 503-504-8657
> > john.blum10101 (skype)
> >
>

Re: RestAPIsWithSSLDUnitTest fails

Posted by Mark Bretl <as...@gmail.com>.
Each version of httpclient has a dependency on a different version of
httpcore, hence the reason seeing two versions of httpcore. If the IDEA
plugin is not respecting the configuration we have in the Gradle build
files, then that is an issue with the IDEA. I found an article from 2013,
which dealt with the issue,
http://arhipov.blogspot.com/2013/10/managing-dependencies-for-intellij-idea.html

I agree with John and Dan, we do not want to go back to non-transitive
dependencies because that is what led to this situation. Until GEODE-1072
is completed, we may be stuck in this mess. Maybe we should prioritize
GEODE-1072 for M2? I don't want to since it does not have direct affect on
the M2 release goals/scope, however, it is a step in the path to the 1.0.0
release.

--Mark

On Wed, Mar 23, 2016 at 2:48 PM, John Blum <jb...@pivotal.io> wrote:

> The only way to properly (& reliably) control that then is with the
> equivalent of a dependencyManagement declaration in Geode's Gradle build
> script for the test dependencies.
>
> https://docs.gradle.org/current/userguide/dependency_management.html,
> section "*23.2.2. Managing transitive dependencies*" is a good place to
> start. Also, "*23.2.3. Resolve version conflicts*" talks about resolution
> strategies.
>
>
> On Wed, Mar 23, 2016 at 2:25 PM, Kirk Lund <kl...@pivotal.io> wrote:
>
> > Yep, that's the way I built one of the two projects I currently have and
> it
> > does work better but it has duplicates of httpclient and httpcore.
> >
> >
> > On Wed, Mar 23, 2016 at 1:45 PM, John Blum <jb...@pivotal.io> wrote:
> >
> > > I.e. ... "File" -> "New" -> "Project from Existing Sources..." ->
> <select
> > > your Geode working directory> -> "Import project from external model"
> ->
> > > "Gradle"
> > >
> > > I don't trust Gradle to do the right thing when setting up an IDE
> > > (especially as the IDE versions change).
> > >
> > > Disclaimer: I have not tried this recently, but I usually have more
> > success
> > > going this route.
> > >
> > > -John
> > >
> > >
> > > On Wed, Mar 23, 2016 at 1:40 PM, John Blum <jb...@pivotal.io> wrote:
> > >
> > > > Kirk- rather than have Gradle generate the .idea project files, have
> > you
> > > > tried importing the Geode project from existing sources using Gradle
> > the
> > > > template?
> > > >
> > > > On Wed, Mar 23, 2016 at 1:28 PM, Kirk Lund <kl...@pivotal.io> wrote:
> > > >
> > > >> RestAPIsWithSSLDUnitTest passes on the command-line.
> > > >>
> > > >> When I execute RestAPIsWithSSLDUnitTest in my IntelliJ project, the
> > > >> classpath of the test prints out with two versions of httpclient and
> > > >> httpcore:
> > > >>
> > > >> [vm_1]
> > > >>
> > > >>
> > >
> >
> /Users/klund/.gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpclient/4.2.5/666e26e76f2e87d84e4f16acb546481ae1b8e9a6/httpclient-4.2.5.jar
> > > >> [vm_1]
> > > >>
> > > >>
> > >
> >
> /Users/klund/.gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpcore/4.2.4/3b7f38df6de5dd8b500e602ae8c2dd5ee446f883/httpcore-4.2.4.jar
> > > >> [vm_1]
> > > >>
> > > >>
> > >
> >
> /Users/klund/.gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpclient/4.5.1/7e3cecc566df91338c6c67883b89ddd05a17db43/httpclient-4.5.1.jar
> > > >> [vm_1]
> > > >>
> > > >>
> > >
> >
> /Users/klund/.gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpcore/4.4.3/e876a79d561e5c6207b78d347e198c8c4531a5e5/httpcore-4.4.3.jar
> > > >>
> > > >> If you use "./gradlew idea" the resulting module definitions are not
> > > >> sufficient (to illustrate, try generating intellij projects for
> > > >> closed+open
> > > >> and then try editing and running DUnits in legacyDUnit and both
> > assembly
> > > >> projects) and require some manual adjusting which is obviously error
> > > >> prone.
> > > >> I'm not an IntelliJ or gradle expert so I doubt that I'll be the one
> > to
> > > >> fix
> > > >> this.
> > > >>
> > > >> Ultimately I'd like to see all of this become easier and simpler. I
> > > >> believe
> > > >> too much complexity or difficulty will result in a smaller number of
> > > >> contributors. It also results in contributors spending their time
> with
> > > >> gradle or the IDE instead of on geode.
> > > >>
> > > >> -Kirk
> > > >>
> > > >>
> > > >> On Wed, Mar 23, 2016 at 12:04 PM, Dan Smith <ds...@pivotal.io>
> > wrote:
> > > >>
> > > >> > First off, your intellij classpath and gradle classpath are pretty
> > > much
> > > >> the
> > > >> > same. The one exception, I think, is that the test target for
> > > >> > geode-assembly sets up a different runtime classpath to point at
> the
> > > >> > bundled product. I didn't set that up, but I think maybe the idea
> is
> > > >> that
> > > >> > we needed some tests of the actual bundled binary? Take a look at
> > > >> > geode-assembly/build.gradle. If someone knows how to fix the setup
> > > that
> > > >> so
> > > >> > we still have that test coverage of the bundled product and the
> > tests
> > > do
> > > >> > work in intellij, please fix it! All of the rest of the tests
> should
> > > be
> > > >> > using exactly the same environment on the command line and in the
> > IDE.
> > > >> >
> > > >> > I'm not sure if this is even your problem Kirk, did you try
> running
> > > from
> > > >> > the command line?
> > > >> >
> > > >> > Second, I don't see anything wrong with having transitive test
> > > >> > dependencies. It's a huge pain to track down the transitive
> > > dependencies
> > > >> > and keep them up to date manually. They aren't hurting you!
> > > >> >
> > > >> > Regarding John's struggles with dependencies of geode, what we
> > really
> > > >> need
> > > >> > to do is clean up *product* dependencies of geode core - we're
> > pulling
> > > >> in
> > > >> > all sorts of stuff for gfsh, pulse, the REST API, etc. GEODE-818
> is
> > > all
> > > >> > about cleaning that up. I was hoping to take up GEODE-1072 (remove
> > > HDFS
> > > >> > code) when I get a chance. If you want to clean up the
> dependencies
> > > >> please
> > > >> > chip in and take on some of those subtasks, the sooner the better!
> > > >> >
> > > >> > -Dan
> > > >> >
> > > >> > On Wed, Mar 23, 2016 at 11:34 AM, John Blum <jb...@pivotal.io>
> > wrote:
> > > >> >
> > > >> > > If you created the IntelliJ IDEA project from the Gradle build,
> > then
> > > >> it
> > > >> > is
> > > >> > > Geode's Gradle build scripts that are specifying the
> dependencies
> > > and
> > > >> > thus
> > > >> > > the Gradle build scripts are wrong.  In Maven, you can declare a
> > > >> > > dependencyManagement section (along with exclusions) to manage
> > > >> transitive
> > > >> > > dependencies.  I don't recall what the equivalent is in Gradle
> for
> > > >> > > dependencyManagement.
> > > >> > >
> > > >> > > On Wed, Mar 23, 2016 at 11:24 AM, Kirk Lund <kl...@pivotal.io>
> > > wrote:
> > > >> > >
> > > >> > > > I think that maybe we don't want to continue with transitive
> > > >> > dependencies
> > > >> > > > enabled for testing. If we turn that off then we go back to
> > having
> > > >> to
> > > >> > > > specify all versions even runtime test dependencies right? Are
> > > there
> > > >> > any
> > > >> > > > valid arguments for keeping transitive dependencies enabled
> for
> > > >> > testing?
> > > >> > > >
> > > >> > > > Also, why would my intellij dependencies be different from
> > gradle
> > > >> > > > command-line? The one was built from the *.gradle files in
> > geode.
> > > If
> > > >> > > > intellij's gradle picks up multiple versions of libraries,
> then
> > I
> > > >> think
> > > >> > > > that still means something isn't right in our *.gradle files.
> > > >> > > >
> > > >> > > > Not that I want to see test failures... BUT, I want to spend
> my
> > > time
> > > >> > > > diagnosing test failures instead of dealing with gradle and
> > > >> dependency
> > > >> > > > versioning and wondering why intellij is picking up 2 versions
> > of
> > > >> jna,
> > > >> > 3
> > > >> > > > versions of apache http, etc.
> > > >> > > >
> > > >> > > > -Kirk
> > > >> > > >
> > > >> > > >
> > > >> > > > On Wed, Mar 23, 2016 at 11:04 AM, John Blum <jblum@pivotal.io
> >
> > > >> wrote:
> > > >> > > >
> > > >> > > > > In a nutshell, you want the dependencies and all the
> > transitive
> > > >> > > > > dependencies versions to agree, otherwise conflicts like
> what
> > > Kirk
> > > >> > > > > experienced, as well as what I experienced while integrating
> > > >> Apache
> > > >> > > Geode
> > > >> > > > > support into Spring Session, will occur, and users will have
> > > >> problems
> > > >> > > > using
> > > >> > > > > Geode in different contexts (e.g. App Server containers for
> > > >> Session
> > > >> > > > > management)
> > > >> > > > >
> > > >> > > > > Letting transitive dependencies of Geode (i.e. sub-projects)
> > > >> dictate
> > > >> > > > > dependency versions is NOT right and recipe for disaster.
> > Also,
> > > >> you
> > > >> > > are
> > > >> > > > > not testing the dependencies, you are testing Geode with the
> > > >> > > > dependencies.
> > > >> > > > >
> > > >> > > > >
> > > >> > > > > On Wed, Mar 23, 2016 at 10:48 AM, Dan Smith <
> > dsmith@pivotal.io>
> > > >> > wrote:
> > > >> > > > >
> > > >> > > > > > As far as the multiple versions of httpclient, I only see
> > that
> > > >> > > > dependency
> > > >> > > > > > showing up in the test dependencies. Different sub
> projects
> > > have
> > > >> > > > > different
> > > >> > > > > > test dependencies, which are transitively pulling in
> > different
> > > >> > > versions
> > > >> > > > > of
> > > >> > > > > > this jar.
> > > >> > > > > >
> > > >> > > > > > We can certainly force a version across all of the
> different
> > > >> > projects
> > > >> > > > in
> > > >> > > > > > dependency-resolution.gradle. But I think given these are
> > > >> different
> > > >> > > > > > projects with different test dependencies we should just
> let
> > > >> them
> > > >> > > pull
> > > >> > > > in
> > > >> > > > > > whatever test dependencies they need.
> > > >> > > > > >
> > > >> > > > > >
> > > >> > > > > > > ./gradlew geode-core:dependencyInsight --dependency
> > > httpclient
> > > >> > > > > > --configuration testRuntime
> > > >> > > > > > Picked up JAVA_TOOL_OPTIONS:
> > > >> > > > > > :geode-core:dependencyInsight
> > > >> > > > > > org.apache.httpcomponents:httpclient:4.2.5
> > > >> > > > > > \--- org.apache.hadoop:hadoop-auth:2.4.1
> > > >> > > > > >      \--- testRuntime
> > > >> > > > > >
> > > >> > > > > >
> > > >> > > > > >
> > > >> > > > > > > ./gradlew geode-pulse:dependencyInsight --dependency
> > > >> httpclient
> > > >> > > > > > --configuration testRuntime
> > > >> > > > > > Picked up JAVA_TOOL_OPTIONS:
> > > >> > > > > > :geode-pulse:dependencyInsight
> > > >> > > > > > org.apache.httpcomponents:httpclient:4.5.1
> > > >> > > > > > +--- org.seleniumhq.selenium:selenium-api:2.52.0
> > > >> > > > > > |    +--- testRuntime
> > > >> > > > > > |    \---
> > > org.seleniumhq.selenium:selenium-remote-driver:2.52.0
> > > >> > > > > > |         +--- testRuntime
> > > >> > > > > > |         +---
> > > >> > org.seleniumhq.selenium:selenium-firefox-driver:2.52.0
> > > >> > > > > > |         |    \--- testRuntime
> > > >> > > > > > |         \---
> > org.seleniumhq.selenium:selenium-support:2.52.0
> > > >> > > > > > |              \--- testRuntime
> > > >> > > > > > \--- org.seleniumhq.selenium:selenium-remote-driver:2.52.0
> > (*)
> > > >> > > > > >
> > > >> > > > > >
> > > >> > > > > >
> > > >> > > > > > On Wed, Mar 23, 2016 at 10:27 AM, Dan Smith <
> > > dsmith@pivotal.io>
> > > >> > > wrote:
> > > >> > > > > >
> > > >> > > > > > > The tests in that geode-assembly project are supposed to
> > run
> > > >> on
> > > >> > the
> > > >> > > > > > binary
> > > >> > > > > > > assembly of the project, so I think the classpath when
> run
> > > >> from
> > > >> > the
> > > >> > > > > > command
> > > >> > > > > > > line might be a bit different than what you get in
> > > intellij. I
> > > >> > > think
> > > >> > > > > the
> > > >> > > > > > > command line classpath just points at
> > > geode-dependencies.jar.
> > > >> > > > > > >
> > > >> > > > > > > -Dan
> > > >> > > > > > >
> > > >> > > > > > >
> > > >> > > > > > > On Wed, Mar 23, 2016 at 10:01 AM, Kirk Lund <
> > > klund@pivotal.io
> > > >> >
> > > >> > > > wrote:
> > > >> > > > > > >
> > > >> > > > > > >> So as I look at dependencies, I see that our gradle
> build
> > > is
> > > >> > > > > ultimately
> > > >> > > > > > >> depending on multiple versions of the same libraries.
> > Can't
> > > >> we
> > > >> > > clean
> > > >> > > > > > this
> > > >> > > > > > >> up?
> > > >> > > > > > >>
> > > >> > > > > > >> org.apache.httpcomponents:httpclient:4.2.5
> > > >> > > > > > >> org.apache.httpcomponents:httpclient:4.3.3
> > > >> > > > > > >> org.apache.httpcomponents:httpclient:4.5.1
> > > >> > > > > > >>
> > > >> > > > > > >> I really don't want multiple versions of anything in
> this
> > > >> > project.
> > > >> > > > Are
> > > >> > > > > > we
> > > >> > > > > > >> not using gradle correctly?
> > > >> > > > > > >>
> > > >> > > > > > >> -Kirk
> > > >> > > > > > >>
> > > >> > > > > > >>
> > > >> > > > > > >> On Wed, Mar 23, 2016 at 9:23 AM, Kirk Lund <
> > > klund@pivotal.io
> > > >> >
> > > >> > > > wrote:
> > > >> > > > > > >>
> > > >> > > > > > >> > RestAPIsWithSSLDUnitTest failed in the nightly build.
> > > >> Failure
> > > >> > > > stack
> > > >> > > > > is
> > > >> > > > > > >> > below. I tried running this test by itself in
> intellij
> > > and
> > > >> it
> > > >> > > > fails
> > > >> > > > > > >> with "java.lang.NoSuchFieldError:
> > > >> > > > > > >> > INSTANCE" from "at
> > > >> > > > > > >> >
> > > >> > > > > > >>
> > > >> > > > > >
> > > >> > > > >
> > > >> > > >
> > > >> > >
> > > >> >
> > > >>
> > >
> >
> org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<init>(DefaultHttpRequestWriterFactory.java:52)".
> > > >> > > > > > >> > I posted that failure stack below as well.
> > > >> > > > > > >> >
> > > >> > > > > > >> > Any ideas what the NoSuckFieldError is about?
> > > >> > > > > > >> >
> > > >> > > > > > >> > :geode-assembly:distributedTest
> > > >> > > > > > >> >
> > > >> > > > > > >> >
> > > >> > > > > > >>
> > > >> > > > > >
> > > >> > > > >
> > > >> > > >
> > > >> > >
> > > >> >
> > > >>
> > >
> >
> com.gemstone.gemfire.rest.internal.web.controllers.RestAPIsWithSSLDUnitTest
> > > >> > > > > > >> > > testMutualAuthentication FAILED
> > > >> > > > > > >> >     java.lang.RuntimeException: unexpected exception
> > > >> > > > > > >> >         at
> > > >> com.gemstone.gemfire.rest.internal.web.controllers.
> > > >> > > > > > >> >
> > > >> > > > > > >>
> > > >> > > > > >
> > > >> > > > >
> > > >> > > >
> > > >> > >
> > > >> >
> > > >>
> > >
> >
> RestAPIsWithSSLDUnitTest.validateConnection(RestAPIsWithSSLDUnitTest.java:
> > > >> > > > > > >> > 495)
> > > >> > > > > > >> >         at
> > > >> com.gemstone.gemfire.rest.internal.web.controllers.
> > > >> > > > > > >> > RestAPIsWithSSLDUnitTest.testMutualAuthentication(
> > > >> > > > > > >> > RestAPIsWithSSLDUnitTest.java:648)
> > > >> > > > > > >> >
> > > >> > > > > > >> >         Caused by:
> > > >> > > > > > >> >         javax.net.ssl.SSLHandshakeException: Remote
> > host
> > > >> > closed
> > > >> > > > > > >> > connection during handshake
> > > >> > > > > > >> >             at
> > sun.security.ssl.SSLSocketImpl.readRecord(
> > > >> > > > > > >> > SSLSocketImpl.java:992)
> > > >> > > > > > >> >             at
> > > sun.security.ssl.SSLSocketImpl.waitForClose(
> > > >> > > > > > >> > SSLSocketImpl.java:1769)
> > > >> > > > > > >> >             at
> > sun.security.ssl.HandshakeOutStream.flush(
> > > >> > > > > > >> > HandshakeOutStream.java:124)
> > > >> > > > > > >> >             at
> > > >> > sun.security.ssl.Handshaker.sendChangeCipherSpec(
> > > >> > > > > > >> > Handshaker.java:1083)
> > > >> > > > > > >> >             at sun.security.ssl.ClientHandshaker.
> > > >> > > > > > >> > sendChangeCipherAndFinish(ClientHandshaker.java:1222)
> > > >> > > > > > >> >             at
> > > >> > > sun.security.ssl.ClientHandshaker.serverHelloDone(
> > > >> > > > > > >> > ClientHandshaker.java:1134)
> > > >> > > > > > >> >             at
> > > >> > sun.security.ssl.ClientHandshaker.processMessage(
> > > >> > > > > > >> > ClientHandshaker.java:348)
> > > >> > > > > > >> >             at
> > > >> > > > > > sun.security.ssl.Handshaker.processLoop(Handshaker.java:
> > > >> > > > > > >> > 979)
> > > >> > > > > > >> >             at
> > > >> > > > > sun.security.ssl.Handshaker.process_record(Handshaker.
> > > >> > > > > > >> > java:914)
> > > >> > > > > > >> >             at
> > sun.security.ssl.SSLSocketImpl.readRecord(
> > > >> > > > > > >> > SSLSocketImpl.java:1062)
> > > >> > > > > > >> >             at
> > > >> > > > > sun.security.ssl.SSLSocketImpl.performInitialHandshake(
> > > >> > > > > > >> > SSLSocketImpl.java:1375)
> > > >> > > > > > >> >             at
> > > >> sun.security.ssl.SSLSocketImpl.startHandshake(
> > > >> > > > > > >> > SSLSocketImpl.java:1403)
> > > >> > > > > > >> >             at
> > > >> sun.security.ssl.SSLSocketImpl.startHandshake(
> > > >> > > > > > >> > SSLSocketImpl.java:1387)
> > > >> > > > > > >> >             at
> > > >> > > > org.apache.http.conn.ssl.SSLConnectionSocketFactory.
> > > >> > > > > > >> >
> > createLayeredSocket(SSLConnectionSocketFactory.java:394)
> > > >> > > > > > >> >             at
> > > >> > > > org.apache.http.conn.ssl.SSLConnectionSocketFactory.
> > > >> > > > > > >> > connectSocket(SSLConnectionSocketFactory.java:353)
> > > >> > > > > > >> >             at
> > > >> > > > > > org.apache.http.impl.conn.DefaultHttpClientConnectionOpe
> > > >> > > > > > >> >
> > > rator.connect(DefaultHttpClientConnectionOperator.java:134)
> > > >> > > > > > >> >             at
> > > >> > > > > > org.apache.http.impl.conn.PoolingHttpClientConnectionMan
> > > >> > > > > > >> >
> > ager.connect(PoolingHttpClientConnectionManager.java:353)
> > > >> > > > > > >> >             at
> > > >> org.apache.http.impl.execchain.MainClientExec.
> > > >> > > > > > >> > establishRoute(MainClientExec.java:380)
> > > >> > > > > > >> >             at
> > > >> org.apache.http.impl.execchain.MainClientExec.
> > > >> > > > > > >> > execute(MainClientExec.java:236)
> > > >> > > > > > >> >             at
> > > org.apache.http.impl.execchain.ProtocolExec.
> > > >> > > > > > >> > execute(ProtocolExec.java:184)
> > > >> > > > > > >> >             at
> > > >> > org.apache.http.impl.execchain.RetryExec.execute(
> > > >> > > > > > >> > RetryExec.java:88)
> > > >> > > > > > >> >             at
> > > org.apache.http.impl.execchain.RedirectExec.
> > > >> > > > > > >> > execute(RedirectExec.java:110)
> > > >> > > > > > >> >             at
> > > >> > > > > > org.apache.http.impl.client.InternalHttpClient.doExecute(
> > > >> > > > > > >> > InternalHttpClient.java:184)
> > > >> > > > > > >> >             at
> > > >> > > > > > org.apache.http.impl.client.CloseableHttpClient.execute(
> > > >> > > > > > >> > CloseableHttpClient.java:82)
> > > >> > > > > > >> >             at
> > > >> > > > > > org.apache.http.impl.client.CloseableHttpClient.execute(
> > > >> > > > > > >> > CloseableHttpClient.java:107)
> > > >> > > > > > >> >             at
> > > >> > > com.gemstone.gemfire.rest.internal.web.controllers.
> > > >> > > > > > >> >
> > > >> > > > > > >>
> > > >> > > > > >
> > > >> > > > >
> > > >> > > >
> > > >> > >
> > > >> >
> > > >>
> > >
> >
> RestAPIsWithSSLDUnitTest.validateConnection(RestAPIsWithSSLDUnitTest.java:
> > > >> > > > > > >> > 474)
> > > >> > > > > > >> >             ... 1 more
> > > >> > > > > > >> >
> > > >> > > > > > >> >             Caused by:
> > > >> > > > > > >> >             java.io.EOFException: SSL peer shut down
> > > >> > incorrectly
> > > >> > > > > > >> >                 at
> > > >> > > > > > >> sun.security.ssl.InputRecord.read(InputRecord.java:505)
> > > >> > > > > > >> >                 at
> > > >> sun.security.ssl.SSLSocketImpl.readRecord(
> > > >> > > > > > >> > SSLSocketImpl.java:973)
> > > >> > > > > > >> >                 ... 26 more
> > > >> > > > > > >> >
> > > >> > > > > > >> > java.lang.NoSuchFieldError: INSTANCE
> > > >> > > > > > >> >
> > > >> > > > > > >> > at
> > > >> > > > > > >> >
> > > >> > > > > > >>
> > > >> > > > > >
> > > >> > > > >
> > > >> > > >
> > > >> > >
> > > >> >
> > > >>
> > >
> >
> org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<init>(DefaultHttpRequestWriterFactory.java:52)
> > > >> > > > > > >> > at
> > > >> > > > > > >> >
> > > >> > > > > > >>
> > > >> > > > > >
> > > >> > > > >
> > > >> > > >
> > > >> > >
> > > >> >
> > > >>
> > >
> >
> org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<init>(DefaultHttpRequestWriterFactory.java:56)
> > > >> > > > > > >> > at
> > > >> > > > > > >> >
> > > >> > > > > > >>
> > > >> > > > > >
> > > >> > > > >
> > > >> > > >
> > > >> > >
> > > >> >
> > > >>
> > >
> >
> org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<clinit>(DefaultHttpRequestWriterFactory.java:46)
> > > >> > > > > > >> > at
> > > >> > > > > > >> >
> > > >> > > > > > >>
> > > >> > > > > >
> > > >> > > > >
> > > >> > > >
> > > >> > >
> > > >> >
> > > >>
> > >
> >
> org.apache.http.impl.conn.ManagedHttpClientConnectionFactory.<init>(ManagedHttpClientConnectionFactory.java:72)
> > > >> > > > > > >> > at
> > > >> > > > > > >> >
> > > >> > > > > > >>
> > > >> > > > > >
> > > >> > > > >
> > > >> > > >
> > > >> > >
> > > >> >
> > > >>
> > >
> >
> org.apache.http.impl.conn.ManagedHttpClientConnectionFactory.<init>(ManagedHttpClientConnectionFactory.java:84)
> > > >> > > > > > >> > at
> > > >> > > > > > >> >
> > > >> > > > > > >>
> > > >> > > > > >
> > > >> > > > >
> > > >> > > >
> > > >> > >
> > > >> >
> > > >>
> > >
> >
> org.apache.http.impl.conn.ManagedHttpClientConnectionFactory.<clinit>(ManagedHttpClientConnectionFactory.java:59)
> > > >> > > > > > >> > at
> > > >> > > > > > >> >
> > > >> > > > > > >>
> > > >> > > > > >
> > > >> > > > >
> > > >> > > >
> > > >> > >
> > > >> >
> > > >>
> > >
> >
> org.apache.http.impl.conn.PoolingHttpClientConnectionManager$InternalConnectionFactory.<init>(PoolingHttpClientConnectionManager.java:487)
> > > >> > > > > > >> > at
> > > >> > > > > > >> >
> > > >> > > > > > >>
> > > >> > > > > >
> > > >> > > > >
> > > >> > > >
> > > >> > >
> > > >> >
> > > >>
> > >
> >
> org.apache.http.impl.conn.PoolingHttpClientConnectionManager.<init>(PoolingHttpClientConnectionManager.java:147)
> > > >> > > > > > >> > at
> > > >> > > > > > >> >
> > > >> > > > > > >>
> > > >> > > > > >
> > > >> > > > >
> > > >> > > >
> > > >> > >
> > > >> >
> > > >>
> > >
> >
> org.apache.http.impl.conn.PoolingHttpClientConnectionManager.<init>(PoolingHttpClientConnectionManager.java:136)
> > > >> > > > > > >> > at
> > > >> > > > > > >> >
> > > >> > > > > > >>
> > > >> > > > > >
> > > >> > > > >
> > > >> > > >
> > > >> > >
> > > >> >
> > > >>
> > >
> >
> org.apache.http.impl.conn.PoolingHttpClientConnectionManager.<init>(PoolingHttpClientConnectionManager.java:112)
> > > >> > > > > > >> > at
> > > >> > > > > > >> >
> > > >> > > > > > >>
> > > >> > > > > >
> > > >> > > > >
> > > >> > > >
> > > >> > >
> > > >> >
> > > >>
> > >
> >
> org.apache.http.impl.client.HttpClientBuilder.build(HttpClientBuilder.java:726)
> > > >> > > > > > >> > at
> > > >> > > > > > >> >
> > > >> > > > > > >>
> > > >> > > > > >
> > > >> > > > >
> > > >> > > >
> > > >> > >
> > > >> >
> > > >>
> > >
> >
> com.gemstone.gemfire.rest.internal.web.controllers.RestAPIsWithSSLDUnitTest.getSSLBasedHTTPClient(RestAPIsWithSSLDUnitTest.java:458)
> > > >> > > > > > >> > at
> > > >> > > > > > >> >
> > > >> > > > > > >>
> > > >> > > > > >
> > > >> > > > >
> > > >> > > >
> > > >> > >
> > > >> >
> > > >>
> > >
> >
> com.gemstone.gemfire.rest.internal.web.controllers.RestAPIsWithSSLDUnitTest.validateConnection(RestAPIsWithSSLDUnitTest.java:473)
> > > >> > > > > > >> > at
> > > >> > > > > > >> >
> > > >> > > > > > >>
> > > >> > > > > >
> > > >> > > > >
> > > >> > > >
> > > >> > >
> > > >> >
> > > >>
> > >
> >
> com.gemstone.gemfire.rest.internal.web.controllers.RestAPIsWithSSLDUnitTest.testSSLWithoutKeyStoreType(RestAPIsWithSSLDUnitTest.java:522)
> > > >> > > > > > >> > 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:497)
> > > >> > > > > > >> > at
> junit.framework.TestCase.runTest(TestCase.java:176)
> > > >> > > > > > >> > at
> junit.framework.TestCase.runBare(TestCase.java:141)
> > > >> > > > > > >> > at
> > > >> junit.framework.TestResult$1.protect(TestResult.java:122)
> > > >> > > > > > >> > at
> > > >> > junit.framework.TestResult.runProtected(TestResult.java:142)
> > > >> > > > > > >> > at
> junit.framework.TestResult.run(TestResult.java:125)
> > > >> > > > > > >> > at junit.framework.TestCase.run(TestCase.java:129)
> > > >> > > > > > >> > at
> > junit.framework.TestSuite.runTest(TestSuite.java:252)
> > > >> > > > > > >> > at junit.framework.TestSuite.run(TestSuite.java:247)
> > > >> > > > > > >> > at
> > > >> > > > > > >> >
> > > >> > > > > > >>
> > > >> > > > > >
> > > >> > > > >
> > > >> > > >
> > > >> > >
> > > >> >
> > > >>
> > >
> >
> org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:86)
> > > >> > > > > > >> > at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
> > > >> > > > > > >> > at
> > > >> > > > > > >> >
> > > >> > > > > > >>
> > > >> > > > > >
> > > >> > > > >
> > > >> > > >
> > > >> > >
> > > >> >
> > > >>
> > >
> >
> com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
> > > >> > > > > > >> > at
> > > >> > > > > > >> >
> > > >> > > > > > >>
> > > >> > > > > >
> > > >> > > > >
> > > >> > > >
> > > >> > >
> > > >> >
> > > >>
> > >
> >
> com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:234)
> > > >> > > > > > >> > at
> > > >> > > > > > >>
> > > >> > > > >
> > > >> >
> > > com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:74)
> > > >> > > > > > >> > 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:497)
> > > >> > > > > > >> > at
> > > >> > > > > >
> > > >> >
> com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
> > > >> > > > > > >> >
> > > >> > > > > > >> >
> > > >> > > > > > >>
> > > >> > > > > > >
> > > >> > > > > > >
> > > >> > > > > >
> > > >> > > > >
> > > >> > > > >
> > > >> > > > >
> > > >> > > > > --
> > > >> > > > > -John
> > > >> > > > > 503-504-8657
> > > >> > > > > john.blum10101 (skype)
> > > >> > > > >
> > > >> > > >
> > > >> > >
> > > >> > >
> > > >> > >
> > > >> > > --
> > > >> > > -John
> > > >> > > 503-504-8657
> > > >> > > john.blum10101 (skype)
> > > >> > >
> > > >> >
> > > >>
> > > >
> > > >
> > > >
> > > > --
> > > > -John
> > > > 503-504-8657
> > > > john.blum10101 (skype)
> > > >
> > >
> > >
> > >
> > > --
> > > -John
> > > 503-504-8657
> > > john.blum10101 (skype)
> > >
> >
>
>
>
> --
> -John
> 503-504-8657
> john.blum10101 (skype)
>

Re: RestAPIsWithSSLDUnitTest fails

Posted by John Blum <jb...@pivotal.io>.
The only way to properly (& reliably) control that then is with the
equivalent of a dependencyManagement declaration in Geode's Gradle build
script for the test dependencies.

https://docs.gradle.org/current/userguide/dependency_management.html,
section "*23.2.2. Managing transitive dependencies*" is a good place to
start. Also, "*23.2.3. Resolve version conflicts*" talks about resolution
strategies.


On Wed, Mar 23, 2016 at 2:25 PM, Kirk Lund <kl...@pivotal.io> wrote:

> Yep, that's the way I built one of the two projects I currently have and it
> does work better but it has duplicates of httpclient and httpcore.
>
>
> On Wed, Mar 23, 2016 at 1:45 PM, John Blum <jb...@pivotal.io> wrote:
>
> > I.e. ... "File" -> "New" -> "Project from Existing Sources..." -> <select
> > your Geode working directory> -> "Import project from external model" ->
> > "Gradle"
> >
> > I don't trust Gradle to do the right thing when setting up an IDE
> > (especially as the IDE versions change).
> >
> > Disclaimer: I have not tried this recently, but I usually have more
> success
> > going this route.
> >
> > -John
> >
> >
> > On Wed, Mar 23, 2016 at 1:40 PM, John Blum <jb...@pivotal.io> wrote:
> >
> > > Kirk- rather than have Gradle generate the .idea project files, have
> you
> > > tried importing the Geode project from existing sources using Gradle
> the
> > > template?
> > >
> > > On Wed, Mar 23, 2016 at 1:28 PM, Kirk Lund <kl...@pivotal.io> wrote:
> > >
> > >> RestAPIsWithSSLDUnitTest passes on the command-line.
> > >>
> > >> When I execute RestAPIsWithSSLDUnitTest in my IntelliJ project, the
> > >> classpath of the test prints out with two versions of httpclient and
> > >> httpcore:
> > >>
> > >> [vm_1]
> > >>
> > >>
> >
> /Users/klund/.gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpclient/4.2.5/666e26e76f2e87d84e4f16acb546481ae1b8e9a6/httpclient-4.2.5.jar
> > >> [vm_1]
> > >>
> > >>
> >
> /Users/klund/.gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpcore/4.2.4/3b7f38df6de5dd8b500e602ae8c2dd5ee446f883/httpcore-4.2.4.jar
> > >> [vm_1]
> > >>
> > >>
> >
> /Users/klund/.gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpclient/4.5.1/7e3cecc566df91338c6c67883b89ddd05a17db43/httpclient-4.5.1.jar
> > >> [vm_1]
> > >>
> > >>
> >
> /Users/klund/.gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpcore/4.4.3/e876a79d561e5c6207b78d347e198c8c4531a5e5/httpcore-4.4.3.jar
> > >>
> > >> If you use "./gradlew idea" the resulting module definitions are not
> > >> sufficient (to illustrate, try generating intellij projects for
> > >> closed+open
> > >> and then try editing and running DUnits in legacyDUnit and both
> assembly
> > >> projects) and require some manual adjusting which is obviously error
> > >> prone.
> > >> I'm not an IntelliJ or gradle expert so I doubt that I'll be the one
> to
> > >> fix
> > >> this.
> > >>
> > >> Ultimately I'd like to see all of this become easier and simpler. I
> > >> believe
> > >> too much complexity or difficulty will result in a smaller number of
> > >> contributors. It also results in contributors spending their time with
> > >> gradle or the IDE instead of on geode.
> > >>
> > >> -Kirk
> > >>
> > >>
> > >> On Wed, Mar 23, 2016 at 12:04 PM, Dan Smith <ds...@pivotal.io>
> wrote:
> > >>
> > >> > First off, your intellij classpath and gradle classpath are pretty
> > much
> > >> the
> > >> > same. The one exception, I think, is that the test target for
> > >> > geode-assembly sets up a different runtime classpath to point at the
> > >> > bundled product. I didn't set that up, but I think maybe the idea is
> > >> that
> > >> > we needed some tests of the actual bundled binary? Take a look at
> > >> > geode-assembly/build.gradle. If someone knows how to fix the setup
> > that
> > >> so
> > >> > we still have that test coverage of the bundled product and the
> tests
> > do
> > >> > work in intellij, please fix it! All of the rest of the tests should
> > be
> > >> > using exactly the same environment on the command line and in the
> IDE.
> > >> >
> > >> > I'm not sure if this is even your problem Kirk, did you try running
> > from
> > >> > the command line?
> > >> >
> > >> > Second, I don't see anything wrong with having transitive test
> > >> > dependencies. It's a huge pain to track down the transitive
> > dependencies
> > >> > and keep them up to date manually. They aren't hurting you!
> > >> >
> > >> > Regarding John's struggles with dependencies of geode, what we
> really
> > >> need
> > >> > to do is clean up *product* dependencies of geode core - we're
> pulling
> > >> in
> > >> > all sorts of stuff for gfsh, pulse, the REST API, etc. GEODE-818 is
> > all
> > >> > about cleaning that up. I was hoping to take up GEODE-1072 (remove
> > HDFS
> > >> > code) when I get a chance. If you want to clean up the dependencies
> > >> please
> > >> > chip in and take on some of those subtasks, the sooner the better!
> > >> >
> > >> > -Dan
> > >> >
> > >> > On Wed, Mar 23, 2016 at 11:34 AM, John Blum <jb...@pivotal.io>
> wrote:
> > >> >
> > >> > > If you created the IntelliJ IDEA project from the Gradle build,
> then
> > >> it
> > >> > is
> > >> > > Geode's Gradle build scripts that are specifying the dependencies
> > and
> > >> > thus
> > >> > > the Gradle build scripts are wrong.  In Maven, you can declare a
> > >> > > dependencyManagement section (along with exclusions) to manage
> > >> transitive
> > >> > > dependencies.  I don't recall what the equivalent is in Gradle for
> > >> > > dependencyManagement.
> > >> > >
> > >> > > On Wed, Mar 23, 2016 at 11:24 AM, Kirk Lund <kl...@pivotal.io>
> > wrote:
> > >> > >
> > >> > > > I think that maybe we don't want to continue with transitive
> > >> > dependencies
> > >> > > > enabled for testing. If we turn that off then we go back to
> having
> > >> to
> > >> > > > specify all versions even runtime test dependencies right? Are
> > there
> > >> > any
> > >> > > > valid arguments for keeping transitive dependencies enabled for
> > >> > testing?
> > >> > > >
> > >> > > > Also, why would my intellij dependencies be different from
> gradle
> > >> > > > command-line? The one was built from the *.gradle files in
> geode.
> > If
> > >> > > > intellij's gradle picks up multiple versions of libraries, then
> I
> > >> think
> > >> > > > that still means something isn't right in our *.gradle files.
> > >> > > >
> > >> > > > Not that I want to see test failures... BUT, I want to spend my
> > time
> > >> > > > diagnosing test failures instead of dealing with gradle and
> > >> dependency
> > >> > > > versioning and wondering why intellij is picking up 2 versions
> of
> > >> jna,
> > >> > 3
> > >> > > > versions of apache http, etc.
> > >> > > >
> > >> > > > -Kirk
> > >> > > >
> > >> > > >
> > >> > > > On Wed, Mar 23, 2016 at 11:04 AM, John Blum <jb...@pivotal.io>
> > >> wrote:
> > >> > > >
> > >> > > > > In a nutshell, you want the dependencies and all the
> transitive
> > >> > > > > dependencies versions to agree, otherwise conflicts like what
> > Kirk
> > >> > > > > experienced, as well as what I experienced while integrating
> > >> Apache
> > >> > > Geode
> > >> > > > > support into Spring Session, will occur, and users will have
> > >> problems
> > >> > > > using
> > >> > > > > Geode in different contexts (e.g. App Server containers for
> > >> Session
> > >> > > > > management)
> > >> > > > >
> > >> > > > > Letting transitive dependencies of Geode (i.e. sub-projects)
> > >> dictate
> > >> > > > > dependency versions is NOT right and recipe for disaster.
> Also,
> > >> you
> > >> > > are
> > >> > > > > not testing the dependencies, you are testing Geode with the
> > >> > > > dependencies.
> > >> > > > >
> > >> > > > >
> > >> > > > > On Wed, Mar 23, 2016 at 10:48 AM, Dan Smith <
> dsmith@pivotal.io>
> > >> > wrote:
> > >> > > > >
> > >> > > > > > As far as the multiple versions of httpclient, I only see
> that
> > >> > > > dependency
> > >> > > > > > showing up in the test dependencies. Different sub projects
> > have
> > >> > > > > different
> > >> > > > > > test dependencies, which are transitively pulling in
> different
> > >> > > versions
> > >> > > > > of
> > >> > > > > > this jar.
> > >> > > > > >
> > >> > > > > > We can certainly force a version across all of the different
> > >> > projects
> > >> > > > in
> > >> > > > > > dependency-resolution.gradle. But I think given these are
> > >> different
> > >> > > > > > projects with different test dependencies we should just let
> > >> them
> > >> > > pull
> > >> > > > in
> > >> > > > > > whatever test dependencies they need.
> > >> > > > > >
> > >> > > > > >
> > >> > > > > > > ./gradlew geode-core:dependencyInsight --dependency
> > httpclient
> > >> > > > > > --configuration testRuntime
> > >> > > > > > Picked up JAVA_TOOL_OPTIONS:
> > >> > > > > > :geode-core:dependencyInsight
> > >> > > > > > org.apache.httpcomponents:httpclient:4.2.5
> > >> > > > > > \--- org.apache.hadoop:hadoop-auth:2.4.1
> > >> > > > > >      \--- testRuntime
> > >> > > > > >
> > >> > > > > >
> > >> > > > > >
> > >> > > > > > > ./gradlew geode-pulse:dependencyInsight --dependency
> > >> httpclient
> > >> > > > > > --configuration testRuntime
> > >> > > > > > Picked up JAVA_TOOL_OPTIONS:
> > >> > > > > > :geode-pulse:dependencyInsight
> > >> > > > > > org.apache.httpcomponents:httpclient:4.5.1
> > >> > > > > > +--- org.seleniumhq.selenium:selenium-api:2.52.0
> > >> > > > > > |    +--- testRuntime
> > >> > > > > > |    \---
> > org.seleniumhq.selenium:selenium-remote-driver:2.52.0
> > >> > > > > > |         +--- testRuntime
> > >> > > > > > |         +---
> > >> > org.seleniumhq.selenium:selenium-firefox-driver:2.52.0
> > >> > > > > > |         |    \--- testRuntime
> > >> > > > > > |         \---
> org.seleniumhq.selenium:selenium-support:2.52.0
> > >> > > > > > |              \--- testRuntime
> > >> > > > > > \--- org.seleniumhq.selenium:selenium-remote-driver:2.52.0
> (*)
> > >> > > > > >
> > >> > > > > >
> > >> > > > > >
> > >> > > > > > On Wed, Mar 23, 2016 at 10:27 AM, Dan Smith <
> > dsmith@pivotal.io>
> > >> > > wrote:
> > >> > > > > >
> > >> > > > > > > The tests in that geode-assembly project are supposed to
> run
> > >> on
> > >> > the
> > >> > > > > > binary
> > >> > > > > > > assembly of the project, so I think the classpath when run
> > >> from
> > >> > the
> > >> > > > > > command
> > >> > > > > > > line might be a bit different than what you get in
> > intellij. I
> > >> > > think
> > >> > > > > the
> > >> > > > > > > command line classpath just points at
> > geode-dependencies.jar.
> > >> > > > > > >
> > >> > > > > > > -Dan
> > >> > > > > > >
> > >> > > > > > >
> > >> > > > > > > On Wed, Mar 23, 2016 at 10:01 AM, Kirk Lund <
> > klund@pivotal.io
> > >> >
> > >> > > > wrote:
> > >> > > > > > >
> > >> > > > > > >> So as I look at dependencies, I see that our gradle build
> > is
> > >> > > > > ultimately
> > >> > > > > > >> depending on multiple versions of the same libraries.
> Can't
> > >> we
> > >> > > clean
> > >> > > > > > this
> > >> > > > > > >> up?
> > >> > > > > > >>
> > >> > > > > > >> org.apache.httpcomponents:httpclient:4.2.5
> > >> > > > > > >> org.apache.httpcomponents:httpclient:4.3.3
> > >> > > > > > >> org.apache.httpcomponents:httpclient:4.5.1
> > >> > > > > > >>
> > >> > > > > > >> I really don't want multiple versions of anything in this
> > >> > project.
> > >> > > > Are
> > >> > > > > > we
> > >> > > > > > >> not using gradle correctly?
> > >> > > > > > >>
> > >> > > > > > >> -Kirk
> > >> > > > > > >>
> > >> > > > > > >>
> > >> > > > > > >> On Wed, Mar 23, 2016 at 9:23 AM, Kirk Lund <
> > klund@pivotal.io
> > >> >
> > >> > > > wrote:
> > >> > > > > > >>
> > >> > > > > > >> > RestAPIsWithSSLDUnitTest failed in the nightly build.
> > >> Failure
> > >> > > > stack
> > >> > > > > is
> > >> > > > > > >> > below. I tried running this test by itself in intellij
> > and
> > >> it
> > >> > > > fails
> > >> > > > > > >> with "java.lang.NoSuchFieldError:
> > >> > > > > > >> > INSTANCE" from "at
> > >> > > > > > >> >
> > >> > > > > > >>
> > >> > > > > >
> > >> > > > >
> > >> > > >
> > >> > >
> > >> >
> > >>
> >
> org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<init>(DefaultHttpRequestWriterFactory.java:52)".
> > >> > > > > > >> > I posted that failure stack below as well.
> > >> > > > > > >> >
> > >> > > > > > >> > Any ideas what the NoSuckFieldError is about?
> > >> > > > > > >> >
> > >> > > > > > >> > :geode-assembly:distributedTest
> > >> > > > > > >> >
> > >> > > > > > >> >
> > >> > > > > > >>
> > >> > > > > >
> > >> > > > >
> > >> > > >
> > >> > >
> > >> >
> > >>
> >
> com.gemstone.gemfire.rest.internal.web.controllers.RestAPIsWithSSLDUnitTest
> > >> > > > > > >> > > testMutualAuthentication FAILED
> > >> > > > > > >> >     java.lang.RuntimeException: unexpected exception
> > >> > > > > > >> >         at
> > >> com.gemstone.gemfire.rest.internal.web.controllers.
> > >> > > > > > >> >
> > >> > > > > > >>
> > >> > > > > >
> > >> > > > >
> > >> > > >
> > >> > >
> > >> >
> > >>
> >
> RestAPIsWithSSLDUnitTest.validateConnection(RestAPIsWithSSLDUnitTest.java:
> > >> > > > > > >> > 495)
> > >> > > > > > >> >         at
> > >> com.gemstone.gemfire.rest.internal.web.controllers.
> > >> > > > > > >> > RestAPIsWithSSLDUnitTest.testMutualAuthentication(
> > >> > > > > > >> > RestAPIsWithSSLDUnitTest.java:648)
> > >> > > > > > >> >
> > >> > > > > > >> >         Caused by:
> > >> > > > > > >> >         javax.net.ssl.SSLHandshakeException: Remote
> host
> > >> > closed
> > >> > > > > > >> > connection during handshake
> > >> > > > > > >> >             at
> sun.security.ssl.SSLSocketImpl.readRecord(
> > >> > > > > > >> > SSLSocketImpl.java:992)
> > >> > > > > > >> >             at
> > sun.security.ssl.SSLSocketImpl.waitForClose(
> > >> > > > > > >> > SSLSocketImpl.java:1769)
> > >> > > > > > >> >             at
> sun.security.ssl.HandshakeOutStream.flush(
> > >> > > > > > >> > HandshakeOutStream.java:124)
> > >> > > > > > >> >             at
> > >> > sun.security.ssl.Handshaker.sendChangeCipherSpec(
> > >> > > > > > >> > Handshaker.java:1083)
> > >> > > > > > >> >             at sun.security.ssl.ClientHandshaker.
> > >> > > > > > >> > sendChangeCipherAndFinish(ClientHandshaker.java:1222)
> > >> > > > > > >> >             at
> > >> > > sun.security.ssl.ClientHandshaker.serverHelloDone(
> > >> > > > > > >> > ClientHandshaker.java:1134)
> > >> > > > > > >> >             at
> > >> > sun.security.ssl.ClientHandshaker.processMessage(
> > >> > > > > > >> > ClientHandshaker.java:348)
> > >> > > > > > >> >             at
> > >> > > > > > sun.security.ssl.Handshaker.processLoop(Handshaker.java:
> > >> > > > > > >> > 979)
> > >> > > > > > >> >             at
> > >> > > > > sun.security.ssl.Handshaker.process_record(Handshaker.
> > >> > > > > > >> > java:914)
> > >> > > > > > >> >             at
> sun.security.ssl.SSLSocketImpl.readRecord(
> > >> > > > > > >> > SSLSocketImpl.java:1062)
> > >> > > > > > >> >             at
> > >> > > > > sun.security.ssl.SSLSocketImpl.performInitialHandshake(
> > >> > > > > > >> > SSLSocketImpl.java:1375)
> > >> > > > > > >> >             at
> > >> sun.security.ssl.SSLSocketImpl.startHandshake(
> > >> > > > > > >> > SSLSocketImpl.java:1403)
> > >> > > > > > >> >             at
> > >> sun.security.ssl.SSLSocketImpl.startHandshake(
> > >> > > > > > >> > SSLSocketImpl.java:1387)
> > >> > > > > > >> >             at
> > >> > > > org.apache.http.conn.ssl.SSLConnectionSocketFactory.
> > >> > > > > > >> >
> createLayeredSocket(SSLConnectionSocketFactory.java:394)
> > >> > > > > > >> >             at
> > >> > > > org.apache.http.conn.ssl.SSLConnectionSocketFactory.
> > >> > > > > > >> > connectSocket(SSLConnectionSocketFactory.java:353)
> > >> > > > > > >> >             at
> > >> > > > > > org.apache.http.impl.conn.DefaultHttpClientConnectionOpe
> > >> > > > > > >> >
> > rator.connect(DefaultHttpClientConnectionOperator.java:134)
> > >> > > > > > >> >             at
> > >> > > > > > org.apache.http.impl.conn.PoolingHttpClientConnectionMan
> > >> > > > > > >> >
> ager.connect(PoolingHttpClientConnectionManager.java:353)
> > >> > > > > > >> >             at
> > >> org.apache.http.impl.execchain.MainClientExec.
> > >> > > > > > >> > establishRoute(MainClientExec.java:380)
> > >> > > > > > >> >             at
> > >> org.apache.http.impl.execchain.MainClientExec.
> > >> > > > > > >> > execute(MainClientExec.java:236)
> > >> > > > > > >> >             at
> > org.apache.http.impl.execchain.ProtocolExec.
> > >> > > > > > >> > execute(ProtocolExec.java:184)
> > >> > > > > > >> >             at
> > >> > org.apache.http.impl.execchain.RetryExec.execute(
> > >> > > > > > >> > RetryExec.java:88)
> > >> > > > > > >> >             at
> > org.apache.http.impl.execchain.RedirectExec.
> > >> > > > > > >> > execute(RedirectExec.java:110)
> > >> > > > > > >> >             at
> > >> > > > > > org.apache.http.impl.client.InternalHttpClient.doExecute(
> > >> > > > > > >> > InternalHttpClient.java:184)
> > >> > > > > > >> >             at
> > >> > > > > > org.apache.http.impl.client.CloseableHttpClient.execute(
> > >> > > > > > >> > CloseableHttpClient.java:82)
> > >> > > > > > >> >             at
> > >> > > > > > org.apache.http.impl.client.CloseableHttpClient.execute(
> > >> > > > > > >> > CloseableHttpClient.java:107)
> > >> > > > > > >> >             at
> > >> > > com.gemstone.gemfire.rest.internal.web.controllers.
> > >> > > > > > >> >
> > >> > > > > > >>
> > >> > > > > >
> > >> > > > >
> > >> > > >
> > >> > >
> > >> >
> > >>
> >
> RestAPIsWithSSLDUnitTest.validateConnection(RestAPIsWithSSLDUnitTest.java:
> > >> > > > > > >> > 474)
> > >> > > > > > >> >             ... 1 more
> > >> > > > > > >> >
> > >> > > > > > >> >             Caused by:
> > >> > > > > > >> >             java.io.EOFException: SSL peer shut down
> > >> > incorrectly
> > >> > > > > > >> >                 at
> > >> > > > > > >> sun.security.ssl.InputRecord.read(InputRecord.java:505)
> > >> > > > > > >> >                 at
> > >> sun.security.ssl.SSLSocketImpl.readRecord(
> > >> > > > > > >> > SSLSocketImpl.java:973)
> > >> > > > > > >> >                 ... 26 more
> > >> > > > > > >> >
> > >> > > > > > >> > java.lang.NoSuchFieldError: INSTANCE
> > >> > > > > > >> >
> > >> > > > > > >> > at
> > >> > > > > > >> >
> > >> > > > > > >>
> > >> > > > > >
> > >> > > > >
> > >> > > >
> > >> > >
> > >> >
> > >>
> >
> org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<init>(DefaultHttpRequestWriterFactory.java:52)
> > >> > > > > > >> > at
> > >> > > > > > >> >
> > >> > > > > > >>
> > >> > > > > >
> > >> > > > >
> > >> > > >
> > >> > >
> > >> >
> > >>
> >
> org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<init>(DefaultHttpRequestWriterFactory.java:56)
> > >> > > > > > >> > at
> > >> > > > > > >> >
> > >> > > > > > >>
> > >> > > > > >
> > >> > > > >
> > >> > > >
> > >> > >
> > >> >
> > >>
> >
> org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<clinit>(DefaultHttpRequestWriterFactory.java:46)
> > >> > > > > > >> > at
> > >> > > > > > >> >
> > >> > > > > > >>
> > >> > > > > >
> > >> > > > >
> > >> > > >
> > >> > >
> > >> >
> > >>
> >
> org.apache.http.impl.conn.ManagedHttpClientConnectionFactory.<init>(ManagedHttpClientConnectionFactory.java:72)
> > >> > > > > > >> > at
> > >> > > > > > >> >
> > >> > > > > > >>
> > >> > > > > >
> > >> > > > >
> > >> > > >
> > >> > >
> > >> >
> > >>
> >
> org.apache.http.impl.conn.ManagedHttpClientConnectionFactory.<init>(ManagedHttpClientConnectionFactory.java:84)
> > >> > > > > > >> > at
> > >> > > > > > >> >
> > >> > > > > > >>
> > >> > > > > >
> > >> > > > >
> > >> > > >
> > >> > >
> > >> >
> > >>
> >
> org.apache.http.impl.conn.ManagedHttpClientConnectionFactory.<clinit>(ManagedHttpClientConnectionFactory.java:59)
> > >> > > > > > >> > at
> > >> > > > > > >> >
> > >> > > > > > >>
> > >> > > > > >
> > >> > > > >
> > >> > > >
> > >> > >
> > >> >
> > >>
> >
> org.apache.http.impl.conn.PoolingHttpClientConnectionManager$InternalConnectionFactory.<init>(PoolingHttpClientConnectionManager.java:487)
> > >> > > > > > >> > at
> > >> > > > > > >> >
> > >> > > > > > >>
> > >> > > > > >
> > >> > > > >
> > >> > > >
> > >> > >
> > >> >
> > >>
> >
> org.apache.http.impl.conn.PoolingHttpClientConnectionManager.<init>(PoolingHttpClientConnectionManager.java:147)
> > >> > > > > > >> > at
> > >> > > > > > >> >
> > >> > > > > > >>
> > >> > > > > >
> > >> > > > >
> > >> > > >
> > >> > >
> > >> >
> > >>
> >
> org.apache.http.impl.conn.PoolingHttpClientConnectionManager.<init>(PoolingHttpClientConnectionManager.java:136)
> > >> > > > > > >> > at
> > >> > > > > > >> >
> > >> > > > > > >>
> > >> > > > > >
> > >> > > > >
> > >> > > >
> > >> > >
> > >> >
> > >>
> >
> org.apache.http.impl.conn.PoolingHttpClientConnectionManager.<init>(PoolingHttpClientConnectionManager.java:112)
> > >> > > > > > >> > at
> > >> > > > > > >> >
> > >> > > > > > >>
> > >> > > > > >
> > >> > > > >
> > >> > > >
> > >> > >
> > >> >
> > >>
> >
> org.apache.http.impl.client.HttpClientBuilder.build(HttpClientBuilder.java:726)
> > >> > > > > > >> > at
> > >> > > > > > >> >
> > >> > > > > > >>
> > >> > > > > >
> > >> > > > >
> > >> > > >
> > >> > >
> > >> >
> > >>
> >
> com.gemstone.gemfire.rest.internal.web.controllers.RestAPIsWithSSLDUnitTest.getSSLBasedHTTPClient(RestAPIsWithSSLDUnitTest.java:458)
> > >> > > > > > >> > at
> > >> > > > > > >> >
> > >> > > > > > >>
> > >> > > > > >
> > >> > > > >
> > >> > > >
> > >> > >
> > >> >
> > >>
> >
> com.gemstone.gemfire.rest.internal.web.controllers.RestAPIsWithSSLDUnitTest.validateConnection(RestAPIsWithSSLDUnitTest.java:473)
> > >> > > > > > >> > at
> > >> > > > > > >> >
> > >> > > > > > >>
> > >> > > > > >
> > >> > > > >
> > >> > > >
> > >> > >
> > >> >
> > >>
> >
> com.gemstone.gemfire.rest.internal.web.controllers.RestAPIsWithSSLDUnitTest.testSSLWithoutKeyStoreType(RestAPIsWithSSLDUnitTest.java:522)
> > >> > > > > > >> > 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:497)
> > >> > > > > > >> > at junit.framework.TestCase.runTest(TestCase.java:176)
> > >> > > > > > >> > at junit.framework.TestCase.runBare(TestCase.java:141)
> > >> > > > > > >> > at
> > >> junit.framework.TestResult$1.protect(TestResult.java:122)
> > >> > > > > > >> > at
> > >> > junit.framework.TestResult.runProtected(TestResult.java:142)
> > >> > > > > > >> > at junit.framework.TestResult.run(TestResult.java:125)
> > >> > > > > > >> > at junit.framework.TestCase.run(TestCase.java:129)
> > >> > > > > > >> > at
> junit.framework.TestSuite.runTest(TestSuite.java:252)
> > >> > > > > > >> > at junit.framework.TestSuite.run(TestSuite.java:247)
> > >> > > > > > >> > at
> > >> > > > > > >> >
> > >> > > > > > >>
> > >> > > > > >
> > >> > > > >
> > >> > > >
> > >> > >
> > >> >
> > >>
> >
> org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:86)
> > >> > > > > > >> > at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
> > >> > > > > > >> > at
> > >> > > > > > >> >
> > >> > > > > > >>
> > >> > > > > >
> > >> > > > >
> > >> > > >
> > >> > >
> > >> >
> > >>
> >
> com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
> > >> > > > > > >> > at
> > >> > > > > > >> >
> > >> > > > > > >>
> > >> > > > > >
> > >> > > > >
> > >> > > >
> > >> > >
> > >> >
> > >>
> >
> com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:234)
> > >> > > > > > >> > at
> > >> > > > > > >>
> > >> > > > >
> > >> >
> > com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:74)
> > >> > > > > > >> > 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:497)
> > >> > > > > > >> > at
> > >> > > > > >
> > >> > com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
> > >> > > > > > >> >
> > >> > > > > > >> >
> > >> > > > > > >>
> > >> > > > > > >
> > >> > > > > > >
> > >> > > > > >
> > >> > > > >
> > >> > > > >
> > >> > > > >
> > >> > > > > --
> > >> > > > > -John
> > >> > > > > 503-504-8657
> > >> > > > > john.blum10101 (skype)
> > >> > > > >
> > >> > > >
> > >> > >
> > >> > >
> > >> > >
> > >> > > --
> > >> > > -John
> > >> > > 503-504-8657
> > >> > > john.blum10101 (skype)
> > >> > >
> > >> >
> > >>
> > >
> > >
> > >
> > > --
> > > -John
> > > 503-504-8657
> > > john.blum10101 (skype)
> > >
> >
> >
> >
> > --
> > -John
> > 503-504-8657
> > john.blum10101 (skype)
> >
>



-- 
-John
503-504-8657
john.blum10101 (skype)

Re: RestAPIsWithSSLDUnitTest fails

Posted by Kirk Lund <kl...@pivotal.io>.
Yep, that's the way I built one of the two projects I currently have and it
does work better but it has duplicates of httpclient and httpcore.


On Wed, Mar 23, 2016 at 1:45 PM, John Blum <jb...@pivotal.io> wrote:

> I.e. ... "File" -> "New" -> "Project from Existing Sources..." -> <select
> your Geode working directory> -> "Import project from external model" ->
> "Gradle"
>
> I don't trust Gradle to do the right thing when setting up an IDE
> (especially as the IDE versions change).
>
> Disclaimer: I have not tried this recently, but I usually have more success
> going this route.
>
> -John
>
>
> On Wed, Mar 23, 2016 at 1:40 PM, John Blum <jb...@pivotal.io> wrote:
>
> > Kirk- rather than have Gradle generate the .idea project files, have you
> > tried importing the Geode project from existing sources using Gradle the
> > template?
> >
> > On Wed, Mar 23, 2016 at 1:28 PM, Kirk Lund <kl...@pivotal.io> wrote:
> >
> >> RestAPIsWithSSLDUnitTest passes on the command-line.
> >>
> >> When I execute RestAPIsWithSSLDUnitTest in my IntelliJ project, the
> >> classpath of the test prints out with two versions of httpclient and
> >> httpcore:
> >>
> >> [vm_1]
> >>
> >>
> /Users/klund/.gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpclient/4.2.5/666e26e76f2e87d84e4f16acb546481ae1b8e9a6/httpclient-4.2.5.jar
> >> [vm_1]
> >>
> >>
> /Users/klund/.gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpcore/4.2.4/3b7f38df6de5dd8b500e602ae8c2dd5ee446f883/httpcore-4.2.4.jar
> >> [vm_1]
> >>
> >>
> /Users/klund/.gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpclient/4.5.1/7e3cecc566df91338c6c67883b89ddd05a17db43/httpclient-4.5.1.jar
> >> [vm_1]
> >>
> >>
> /Users/klund/.gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpcore/4.4.3/e876a79d561e5c6207b78d347e198c8c4531a5e5/httpcore-4.4.3.jar
> >>
> >> If you use "./gradlew idea" the resulting module definitions are not
> >> sufficient (to illustrate, try generating intellij projects for
> >> closed+open
> >> and then try editing and running DUnits in legacyDUnit and both assembly
> >> projects) and require some manual adjusting which is obviously error
> >> prone.
> >> I'm not an IntelliJ or gradle expert so I doubt that I'll be the one to
> >> fix
> >> this.
> >>
> >> Ultimately I'd like to see all of this become easier and simpler. I
> >> believe
> >> too much complexity or difficulty will result in a smaller number of
> >> contributors. It also results in contributors spending their time with
> >> gradle or the IDE instead of on geode.
> >>
> >> -Kirk
> >>
> >>
> >> On Wed, Mar 23, 2016 at 12:04 PM, Dan Smith <ds...@pivotal.io> wrote:
> >>
> >> > First off, your intellij classpath and gradle classpath are pretty
> much
> >> the
> >> > same. The one exception, I think, is that the test target for
> >> > geode-assembly sets up a different runtime classpath to point at the
> >> > bundled product. I didn't set that up, but I think maybe the idea is
> >> that
> >> > we needed some tests of the actual bundled binary? Take a look at
> >> > geode-assembly/build.gradle. If someone knows how to fix the setup
> that
> >> so
> >> > we still have that test coverage of the bundled product and the tests
> do
> >> > work in intellij, please fix it! All of the rest of the tests should
> be
> >> > using exactly the same environment on the command line and in the IDE.
> >> >
> >> > I'm not sure if this is even your problem Kirk, did you try running
> from
> >> > the command line?
> >> >
> >> > Second, I don't see anything wrong with having transitive test
> >> > dependencies. It's a huge pain to track down the transitive
> dependencies
> >> > and keep them up to date manually. They aren't hurting you!
> >> >
> >> > Regarding John's struggles with dependencies of geode, what we really
> >> need
> >> > to do is clean up *product* dependencies of geode core - we're pulling
> >> in
> >> > all sorts of stuff for gfsh, pulse, the REST API, etc. GEODE-818 is
> all
> >> > about cleaning that up. I was hoping to take up GEODE-1072 (remove
> HDFS
> >> > code) when I get a chance. If you want to clean up the dependencies
> >> please
> >> > chip in and take on some of those subtasks, the sooner the better!
> >> >
> >> > -Dan
> >> >
> >> > On Wed, Mar 23, 2016 at 11:34 AM, John Blum <jb...@pivotal.io> wrote:
> >> >
> >> > > If you created the IntelliJ IDEA project from the Gradle build, then
> >> it
> >> > is
> >> > > Geode's Gradle build scripts that are specifying the dependencies
> and
> >> > thus
> >> > > the Gradle build scripts are wrong.  In Maven, you can declare a
> >> > > dependencyManagement section (along with exclusions) to manage
> >> transitive
> >> > > dependencies.  I don't recall what the equivalent is in Gradle for
> >> > > dependencyManagement.
> >> > >
> >> > > On Wed, Mar 23, 2016 at 11:24 AM, Kirk Lund <kl...@pivotal.io>
> wrote:
> >> > >
> >> > > > I think that maybe we don't want to continue with transitive
> >> > dependencies
> >> > > > enabled for testing. If we turn that off then we go back to having
> >> to
> >> > > > specify all versions even runtime test dependencies right? Are
> there
> >> > any
> >> > > > valid arguments for keeping transitive dependencies enabled for
> >> > testing?
> >> > > >
> >> > > > Also, why would my intellij dependencies be different from gradle
> >> > > > command-line? The one was built from the *.gradle files in geode.
> If
> >> > > > intellij's gradle picks up multiple versions of libraries, then I
> >> think
> >> > > > that still means something isn't right in our *.gradle files.
> >> > > >
> >> > > > Not that I want to see test failures... BUT, I want to spend my
> time
> >> > > > diagnosing test failures instead of dealing with gradle and
> >> dependency
> >> > > > versioning and wondering why intellij is picking up 2 versions of
> >> jna,
> >> > 3
> >> > > > versions of apache http, etc.
> >> > > >
> >> > > > -Kirk
> >> > > >
> >> > > >
> >> > > > On Wed, Mar 23, 2016 at 11:04 AM, John Blum <jb...@pivotal.io>
> >> wrote:
> >> > > >
> >> > > > > In a nutshell, you want the dependencies and all the transitive
> >> > > > > dependencies versions to agree, otherwise conflicts like what
> Kirk
> >> > > > > experienced, as well as what I experienced while integrating
> >> Apache
> >> > > Geode
> >> > > > > support into Spring Session, will occur, and users will have
> >> problems
> >> > > > using
> >> > > > > Geode in different contexts (e.g. App Server containers for
> >> Session
> >> > > > > management)
> >> > > > >
> >> > > > > Letting transitive dependencies of Geode (i.e. sub-projects)
> >> dictate
> >> > > > > dependency versions is NOT right and recipe for disaster.  Also,
> >> you
> >> > > are
> >> > > > > not testing the dependencies, you are testing Geode with the
> >> > > > dependencies.
> >> > > > >
> >> > > > >
> >> > > > > On Wed, Mar 23, 2016 at 10:48 AM, Dan Smith <ds...@pivotal.io>
> >> > wrote:
> >> > > > >
> >> > > > > > As far as the multiple versions of httpclient, I only see that
> >> > > > dependency
> >> > > > > > showing up in the test dependencies. Different sub projects
> have
> >> > > > > different
> >> > > > > > test dependencies, which are transitively pulling in different
> >> > > versions
> >> > > > > of
> >> > > > > > this jar.
> >> > > > > >
> >> > > > > > We can certainly force a version across all of the different
> >> > projects
> >> > > > in
> >> > > > > > dependency-resolution.gradle. But I think given these are
> >> different
> >> > > > > > projects with different test dependencies we should just let
> >> them
> >> > > pull
> >> > > > in
> >> > > > > > whatever test dependencies they need.
> >> > > > > >
> >> > > > > >
> >> > > > > > > ./gradlew geode-core:dependencyInsight --dependency
> httpclient
> >> > > > > > --configuration testRuntime
> >> > > > > > Picked up JAVA_TOOL_OPTIONS:
> >> > > > > > :geode-core:dependencyInsight
> >> > > > > > org.apache.httpcomponents:httpclient:4.2.5
> >> > > > > > \--- org.apache.hadoop:hadoop-auth:2.4.1
> >> > > > > >      \--- testRuntime
> >> > > > > >
> >> > > > > >
> >> > > > > >
> >> > > > > > > ./gradlew geode-pulse:dependencyInsight --dependency
> >> httpclient
> >> > > > > > --configuration testRuntime
> >> > > > > > Picked up JAVA_TOOL_OPTIONS:
> >> > > > > > :geode-pulse:dependencyInsight
> >> > > > > > org.apache.httpcomponents:httpclient:4.5.1
> >> > > > > > +--- org.seleniumhq.selenium:selenium-api:2.52.0
> >> > > > > > |    +--- testRuntime
> >> > > > > > |    \---
> org.seleniumhq.selenium:selenium-remote-driver:2.52.0
> >> > > > > > |         +--- testRuntime
> >> > > > > > |         +---
> >> > org.seleniumhq.selenium:selenium-firefox-driver:2.52.0
> >> > > > > > |         |    \--- testRuntime
> >> > > > > > |         \--- org.seleniumhq.selenium:selenium-support:2.52.0
> >> > > > > > |              \--- testRuntime
> >> > > > > > \--- org.seleniumhq.selenium:selenium-remote-driver:2.52.0 (*)
> >> > > > > >
> >> > > > > >
> >> > > > > >
> >> > > > > > On Wed, Mar 23, 2016 at 10:27 AM, Dan Smith <
> dsmith@pivotal.io>
> >> > > wrote:
> >> > > > > >
> >> > > > > > > The tests in that geode-assembly project are supposed to run
> >> on
> >> > the
> >> > > > > > binary
> >> > > > > > > assembly of the project, so I think the classpath when run
> >> from
> >> > the
> >> > > > > > command
> >> > > > > > > line might be a bit different than what you get in
> intellij. I
> >> > > think
> >> > > > > the
> >> > > > > > > command line classpath just points at
> geode-dependencies.jar.
> >> > > > > > >
> >> > > > > > > -Dan
> >> > > > > > >
> >> > > > > > >
> >> > > > > > > On Wed, Mar 23, 2016 at 10:01 AM, Kirk Lund <
> klund@pivotal.io
> >> >
> >> > > > wrote:
> >> > > > > > >
> >> > > > > > >> So as I look at dependencies, I see that our gradle build
> is
> >> > > > > ultimately
> >> > > > > > >> depending on multiple versions of the same libraries. Can't
> >> we
> >> > > clean
> >> > > > > > this
> >> > > > > > >> up?
> >> > > > > > >>
> >> > > > > > >> org.apache.httpcomponents:httpclient:4.2.5
> >> > > > > > >> org.apache.httpcomponents:httpclient:4.3.3
> >> > > > > > >> org.apache.httpcomponents:httpclient:4.5.1
> >> > > > > > >>
> >> > > > > > >> I really don't want multiple versions of anything in this
> >> > project.
> >> > > > Are
> >> > > > > > we
> >> > > > > > >> not using gradle correctly?
> >> > > > > > >>
> >> > > > > > >> -Kirk
> >> > > > > > >>
> >> > > > > > >>
> >> > > > > > >> On Wed, Mar 23, 2016 at 9:23 AM, Kirk Lund <
> klund@pivotal.io
> >> >
> >> > > > wrote:
> >> > > > > > >>
> >> > > > > > >> > RestAPIsWithSSLDUnitTest failed in the nightly build.
> >> Failure
> >> > > > stack
> >> > > > > is
> >> > > > > > >> > below. I tried running this test by itself in intellij
> and
> >> it
> >> > > > fails
> >> > > > > > >> with "java.lang.NoSuchFieldError:
> >> > > > > > >> > INSTANCE" from "at
> >> > > > > > >> >
> >> > > > > > >>
> >> > > > > >
> >> > > > >
> >> > > >
> >> > >
> >> >
> >>
> org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<init>(DefaultHttpRequestWriterFactory.java:52)".
> >> > > > > > >> > I posted that failure stack below as well.
> >> > > > > > >> >
> >> > > > > > >> > Any ideas what the NoSuckFieldError is about?
> >> > > > > > >> >
> >> > > > > > >> > :geode-assembly:distributedTest
> >> > > > > > >> >
> >> > > > > > >> >
> >> > > > > > >>
> >> > > > > >
> >> > > > >
> >> > > >
> >> > >
> >> >
> >>
> com.gemstone.gemfire.rest.internal.web.controllers.RestAPIsWithSSLDUnitTest
> >> > > > > > >> > > testMutualAuthentication FAILED
> >> > > > > > >> >     java.lang.RuntimeException: unexpected exception
> >> > > > > > >> >         at
> >> com.gemstone.gemfire.rest.internal.web.controllers.
> >> > > > > > >> >
> >> > > > > > >>
> >> > > > > >
> >> > > > >
> >> > > >
> >> > >
> >> >
> >>
> RestAPIsWithSSLDUnitTest.validateConnection(RestAPIsWithSSLDUnitTest.java:
> >> > > > > > >> > 495)
> >> > > > > > >> >         at
> >> com.gemstone.gemfire.rest.internal.web.controllers.
> >> > > > > > >> > RestAPIsWithSSLDUnitTest.testMutualAuthentication(
> >> > > > > > >> > RestAPIsWithSSLDUnitTest.java:648)
> >> > > > > > >> >
> >> > > > > > >> >         Caused by:
> >> > > > > > >> >         javax.net.ssl.SSLHandshakeException: Remote host
> >> > closed
> >> > > > > > >> > connection during handshake
> >> > > > > > >> >             at sun.security.ssl.SSLSocketImpl.readRecord(
> >> > > > > > >> > SSLSocketImpl.java:992)
> >> > > > > > >> >             at
> sun.security.ssl.SSLSocketImpl.waitForClose(
> >> > > > > > >> > SSLSocketImpl.java:1769)
> >> > > > > > >> >             at sun.security.ssl.HandshakeOutStream.flush(
> >> > > > > > >> > HandshakeOutStream.java:124)
> >> > > > > > >> >             at
> >> > sun.security.ssl.Handshaker.sendChangeCipherSpec(
> >> > > > > > >> > Handshaker.java:1083)
> >> > > > > > >> >             at sun.security.ssl.ClientHandshaker.
> >> > > > > > >> > sendChangeCipherAndFinish(ClientHandshaker.java:1222)
> >> > > > > > >> >             at
> >> > > sun.security.ssl.ClientHandshaker.serverHelloDone(
> >> > > > > > >> > ClientHandshaker.java:1134)
> >> > > > > > >> >             at
> >> > sun.security.ssl.ClientHandshaker.processMessage(
> >> > > > > > >> > ClientHandshaker.java:348)
> >> > > > > > >> >             at
> >> > > > > > sun.security.ssl.Handshaker.processLoop(Handshaker.java:
> >> > > > > > >> > 979)
> >> > > > > > >> >             at
> >> > > > > sun.security.ssl.Handshaker.process_record(Handshaker.
> >> > > > > > >> > java:914)
> >> > > > > > >> >             at sun.security.ssl.SSLSocketImpl.readRecord(
> >> > > > > > >> > SSLSocketImpl.java:1062)
> >> > > > > > >> >             at
> >> > > > > sun.security.ssl.SSLSocketImpl.performInitialHandshake(
> >> > > > > > >> > SSLSocketImpl.java:1375)
> >> > > > > > >> >             at
> >> sun.security.ssl.SSLSocketImpl.startHandshake(
> >> > > > > > >> > SSLSocketImpl.java:1403)
> >> > > > > > >> >             at
> >> sun.security.ssl.SSLSocketImpl.startHandshake(
> >> > > > > > >> > SSLSocketImpl.java:1387)
> >> > > > > > >> >             at
> >> > > > org.apache.http.conn.ssl.SSLConnectionSocketFactory.
> >> > > > > > >> > createLayeredSocket(SSLConnectionSocketFactory.java:394)
> >> > > > > > >> >             at
> >> > > > org.apache.http.conn.ssl.SSLConnectionSocketFactory.
> >> > > > > > >> > connectSocket(SSLConnectionSocketFactory.java:353)
> >> > > > > > >> >             at
> >> > > > > > org.apache.http.impl.conn.DefaultHttpClientConnectionOpe
> >> > > > > > >> >
> rator.connect(DefaultHttpClientConnectionOperator.java:134)
> >> > > > > > >> >             at
> >> > > > > > org.apache.http.impl.conn.PoolingHttpClientConnectionMan
> >> > > > > > >> > ager.connect(PoolingHttpClientConnectionManager.java:353)
> >> > > > > > >> >             at
> >> org.apache.http.impl.execchain.MainClientExec.
> >> > > > > > >> > establishRoute(MainClientExec.java:380)
> >> > > > > > >> >             at
> >> org.apache.http.impl.execchain.MainClientExec.
> >> > > > > > >> > execute(MainClientExec.java:236)
> >> > > > > > >> >             at
> org.apache.http.impl.execchain.ProtocolExec.
> >> > > > > > >> > execute(ProtocolExec.java:184)
> >> > > > > > >> >             at
> >> > org.apache.http.impl.execchain.RetryExec.execute(
> >> > > > > > >> > RetryExec.java:88)
> >> > > > > > >> >             at
> org.apache.http.impl.execchain.RedirectExec.
> >> > > > > > >> > execute(RedirectExec.java:110)
> >> > > > > > >> >             at
> >> > > > > > org.apache.http.impl.client.InternalHttpClient.doExecute(
> >> > > > > > >> > InternalHttpClient.java:184)
> >> > > > > > >> >             at
> >> > > > > > org.apache.http.impl.client.CloseableHttpClient.execute(
> >> > > > > > >> > CloseableHttpClient.java:82)
> >> > > > > > >> >             at
> >> > > > > > org.apache.http.impl.client.CloseableHttpClient.execute(
> >> > > > > > >> > CloseableHttpClient.java:107)
> >> > > > > > >> >             at
> >> > > com.gemstone.gemfire.rest.internal.web.controllers.
> >> > > > > > >> >
> >> > > > > > >>
> >> > > > > >
> >> > > > >
> >> > > >
> >> > >
> >> >
> >>
> RestAPIsWithSSLDUnitTest.validateConnection(RestAPIsWithSSLDUnitTest.java:
> >> > > > > > >> > 474)
> >> > > > > > >> >             ... 1 more
> >> > > > > > >> >
> >> > > > > > >> >             Caused by:
> >> > > > > > >> >             java.io.EOFException: SSL peer shut down
> >> > incorrectly
> >> > > > > > >> >                 at
> >> > > > > > >> sun.security.ssl.InputRecord.read(InputRecord.java:505)
> >> > > > > > >> >                 at
> >> sun.security.ssl.SSLSocketImpl.readRecord(
> >> > > > > > >> > SSLSocketImpl.java:973)
> >> > > > > > >> >                 ... 26 more
> >> > > > > > >> >
> >> > > > > > >> > java.lang.NoSuchFieldError: INSTANCE
> >> > > > > > >> >
> >> > > > > > >> > at
> >> > > > > > >> >
> >> > > > > > >>
> >> > > > > >
> >> > > > >
> >> > > >
> >> > >
> >> >
> >>
> org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<init>(DefaultHttpRequestWriterFactory.java:52)
> >> > > > > > >> > at
> >> > > > > > >> >
> >> > > > > > >>
> >> > > > > >
> >> > > > >
> >> > > >
> >> > >
> >> >
> >>
> org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<init>(DefaultHttpRequestWriterFactory.java:56)
> >> > > > > > >> > at
> >> > > > > > >> >
> >> > > > > > >>
> >> > > > > >
> >> > > > >
> >> > > >
> >> > >
> >> >
> >>
> org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<clinit>(DefaultHttpRequestWriterFactory.java:46)
> >> > > > > > >> > at
> >> > > > > > >> >
> >> > > > > > >>
> >> > > > > >
> >> > > > >
> >> > > >
> >> > >
> >> >
> >>
> org.apache.http.impl.conn.ManagedHttpClientConnectionFactory.<init>(ManagedHttpClientConnectionFactory.java:72)
> >> > > > > > >> > at
> >> > > > > > >> >
> >> > > > > > >>
> >> > > > > >
> >> > > > >
> >> > > >
> >> > >
> >> >
> >>
> org.apache.http.impl.conn.ManagedHttpClientConnectionFactory.<init>(ManagedHttpClientConnectionFactory.java:84)
> >> > > > > > >> > at
> >> > > > > > >> >
> >> > > > > > >>
> >> > > > > >
> >> > > > >
> >> > > >
> >> > >
> >> >
> >>
> org.apache.http.impl.conn.ManagedHttpClientConnectionFactory.<clinit>(ManagedHttpClientConnectionFactory.java:59)
> >> > > > > > >> > at
> >> > > > > > >> >
> >> > > > > > >>
> >> > > > > >
> >> > > > >
> >> > > >
> >> > >
> >> >
> >>
> org.apache.http.impl.conn.PoolingHttpClientConnectionManager$InternalConnectionFactory.<init>(PoolingHttpClientConnectionManager.java:487)
> >> > > > > > >> > at
> >> > > > > > >> >
> >> > > > > > >>
> >> > > > > >
> >> > > > >
> >> > > >
> >> > >
> >> >
> >>
> org.apache.http.impl.conn.PoolingHttpClientConnectionManager.<init>(PoolingHttpClientConnectionManager.java:147)
> >> > > > > > >> > at
> >> > > > > > >> >
> >> > > > > > >>
> >> > > > > >
> >> > > > >
> >> > > >
> >> > >
> >> >
> >>
> org.apache.http.impl.conn.PoolingHttpClientConnectionManager.<init>(PoolingHttpClientConnectionManager.java:136)
> >> > > > > > >> > at
> >> > > > > > >> >
> >> > > > > > >>
> >> > > > > >
> >> > > > >
> >> > > >
> >> > >
> >> >
> >>
> org.apache.http.impl.conn.PoolingHttpClientConnectionManager.<init>(PoolingHttpClientConnectionManager.java:112)
> >> > > > > > >> > at
> >> > > > > > >> >
> >> > > > > > >>
> >> > > > > >
> >> > > > >
> >> > > >
> >> > >
> >> >
> >>
> org.apache.http.impl.client.HttpClientBuilder.build(HttpClientBuilder.java:726)
> >> > > > > > >> > at
> >> > > > > > >> >
> >> > > > > > >>
> >> > > > > >
> >> > > > >
> >> > > >
> >> > >
> >> >
> >>
> com.gemstone.gemfire.rest.internal.web.controllers.RestAPIsWithSSLDUnitTest.getSSLBasedHTTPClient(RestAPIsWithSSLDUnitTest.java:458)
> >> > > > > > >> > at
> >> > > > > > >> >
> >> > > > > > >>
> >> > > > > >
> >> > > > >
> >> > > >
> >> > >
> >> >
> >>
> com.gemstone.gemfire.rest.internal.web.controllers.RestAPIsWithSSLDUnitTest.validateConnection(RestAPIsWithSSLDUnitTest.java:473)
> >> > > > > > >> > at
> >> > > > > > >> >
> >> > > > > > >>
> >> > > > > >
> >> > > > >
> >> > > >
> >> > >
> >> >
> >>
> com.gemstone.gemfire.rest.internal.web.controllers.RestAPIsWithSSLDUnitTest.testSSLWithoutKeyStoreType(RestAPIsWithSSLDUnitTest.java:522)
> >> > > > > > >> > 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:497)
> >> > > > > > >> > at junit.framework.TestCase.runTest(TestCase.java:176)
> >> > > > > > >> > at junit.framework.TestCase.runBare(TestCase.java:141)
> >> > > > > > >> > at
> >> junit.framework.TestResult$1.protect(TestResult.java:122)
> >> > > > > > >> > at
> >> > junit.framework.TestResult.runProtected(TestResult.java:142)
> >> > > > > > >> > at junit.framework.TestResult.run(TestResult.java:125)
> >> > > > > > >> > at junit.framework.TestCase.run(TestCase.java:129)
> >> > > > > > >> > at junit.framework.TestSuite.runTest(TestSuite.java:252)
> >> > > > > > >> > at junit.framework.TestSuite.run(TestSuite.java:247)
> >> > > > > > >> > at
> >> > > > > > >> >
> >> > > > > > >>
> >> > > > > >
> >> > > > >
> >> > > >
> >> > >
> >> >
> >>
> org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:86)
> >> > > > > > >> > at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
> >> > > > > > >> > at
> >> > > > > > >> >
> >> > > > > > >>
> >> > > > > >
> >> > > > >
> >> > > >
> >> > >
> >> >
> >>
> com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
> >> > > > > > >> > at
> >> > > > > > >> >
> >> > > > > > >>
> >> > > > > >
> >> > > > >
> >> > > >
> >> > >
> >> >
> >>
> com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:234)
> >> > > > > > >> > at
> >> > > > > > >>
> >> > > > >
> >> >
> com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:74)
> >> > > > > > >> > 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:497)
> >> > > > > > >> > at
> >> > > > > >
> >> > com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
> >> > > > > > >> >
> >> > > > > > >> >
> >> > > > > > >>
> >> > > > > > >
> >> > > > > > >
> >> > > > > >
> >> > > > >
> >> > > > >
> >> > > > >
> >> > > > > --
> >> > > > > -John
> >> > > > > 503-504-8657
> >> > > > > john.blum10101 (skype)
> >> > > > >
> >> > > >
> >> > >
> >> > >
> >> > >
> >> > > --
> >> > > -John
> >> > > 503-504-8657
> >> > > john.blum10101 (skype)
> >> > >
> >> >
> >>
> >
> >
> >
> > --
> > -John
> > 503-504-8657
> > john.blum10101 (skype)
> >
>
>
>
> --
> -John
> 503-504-8657
> john.blum10101 (skype)
>

Re: RestAPIsWithSSLDUnitTest fails

Posted by John Blum <jb...@pivotal.io>.
I.e. ... "File" -> "New" -> "Project from Existing Sources..." -> <select
your Geode working directory> -> "Import project from external model" ->
"Gradle"

I don't trust Gradle to do the right thing when setting up an IDE
(especially as the IDE versions change).

Disclaimer: I have not tried this recently, but I usually have more success
going this route.

-John


On Wed, Mar 23, 2016 at 1:40 PM, John Blum <jb...@pivotal.io> wrote:

> Kirk- rather than have Gradle generate the .idea project files, have you
> tried importing the Geode project from existing sources using Gradle the
> template?
>
> On Wed, Mar 23, 2016 at 1:28 PM, Kirk Lund <kl...@pivotal.io> wrote:
>
>> RestAPIsWithSSLDUnitTest passes on the command-line.
>>
>> When I execute RestAPIsWithSSLDUnitTest in my IntelliJ project, the
>> classpath of the test prints out with two versions of httpclient and
>> httpcore:
>>
>> [vm_1]
>>
>>  /Users/klund/.gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpclient/4.2.5/666e26e76f2e87d84e4f16acb546481ae1b8e9a6/httpclient-4.2.5.jar
>> [vm_1]
>>
>>  /Users/klund/.gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpcore/4.2.4/3b7f38df6de5dd8b500e602ae8c2dd5ee446f883/httpcore-4.2.4.jar
>> [vm_1]
>>
>>  /Users/klund/.gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpclient/4.5.1/7e3cecc566df91338c6c67883b89ddd05a17db43/httpclient-4.5.1.jar
>> [vm_1]
>>
>>  /Users/klund/.gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpcore/4.4.3/e876a79d561e5c6207b78d347e198c8c4531a5e5/httpcore-4.4.3.jar
>>
>> If you use "./gradlew idea" the resulting module definitions are not
>> sufficient (to illustrate, try generating intellij projects for
>> closed+open
>> and then try editing and running DUnits in legacyDUnit and both assembly
>> projects) and require some manual adjusting which is obviously error
>> prone.
>> I'm not an IntelliJ or gradle expert so I doubt that I'll be the one to
>> fix
>> this.
>>
>> Ultimately I'd like to see all of this become easier and simpler. I
>> believe
>> too much complexity or difficulty will result in a smaller number of
>> contributors. It also results in contributors spending their time with
>> gradle or the IDE instead of on geode.
>>
>> -Kirk
>>
>>
>> On Wed, Mar 23, 2016 at 12:04 PM, Dan Smith <ds...@pivotal.io> wrote:
>>
>> > First off, your intellij classpath and gradle classpath are pretty much
>> the
>> > same. The one exception, I think, is that the test target for
>> > geode-assembly sets up a different runtime classpath to point at the
>> > bundled product. I didn't set that up, but I think maybe the idea is
>> that
>> > we needed some tests of the actual bundled binary? Take a look at
>> > geode-assembly/build.gradle. If someone knows how to fix the setup that
>> so
>> > we still have that test coverage of the bundled product and the tests do
>> > work in intellij, please fix it! All of the rest of the tests should be
>> > using exactly the same environment on the command line and in the IDE.
>> >
>> > I'm not sure if this is even your problem Kirk, did you try running from
>> > the command line?
>> >
>> > Second, I don't see anything wrong with having transitive test
>> > dependencies. It's a huge pain to track down the transitive dependencies
>> > and keep them up to date manually. They aren't hurting you!
>> >
>> > Regarding John's struggles with dependencies of geode, what we really
>> need
>> > to do is clean up *product* dependencies of geode core - we're pulling
>> in
>> > all sorts of stuff for gfsh, pulse, the REST API, etc. GEODE-818 is all
>> > about cleaning that up. I was hoping to take up GEODE-1072 (remove HDFS
>> > code) when I get a chance. If you want to clean up the dependencies
>> please
>> > chip in and take on some of those subtasks, the sooner the better!
>> >
>> > -Dan
>> >
>> > On Wed, Mar 23, 2016 at 11:34 AM, John Blum <jb...@pivotal.io> wrote:
>> >
>> > > If you created the IntelliJ IDEA project from the Gradle build, then
>> it
>> > is
>> > > Geode's Gradle build scripts that are specifying the dependencies and
>> > thus
>> > > the Gradle build scripts are wrong.  In Maven, you can declare a
>> > > dependencyManagement section (along with exclusions) to manage
>> transitive
>> > > dependencies.  I don't recall what the equivalent is in Gradle for
>> > > dependencyManagement.
>> > >
>> > > On Wed, Mar 23, 2016 at 11:24 AM, Kirk Lund <kl...@pivotal.io> wrote:
>> > >
>> > > > I think that maybe we don't want to continue with transitive
>> > dependencies
>> > > > enabled for testing. If we turn that off then we go back to having
>> to
>> > > > specify all versions even runtime test dependencies right? Are there
>> > any
>> > > > valid arguments for keeping transitive dependencies enabled for
>> > testing?
>> > > >
>> > > > Also, why would my intellij dependencies be different from gradle
>> > > > command-line? The one was built from the *.gradle files in geode. If
>> > > > intellij's gradle picks up multiple versions of libraries, then I
>> think
>> > > > that still means something isn't right in our *.gradle files.
>> > > >
>> > > > Not that I want to see test failures... BUT, I want to spend my time
>> > > > diagnosing test failures instead of dealing with gradle and
>> dependency
>> > > > versioning and wondering why intellij is picking up 2 versions of
>> jna,
>> > 3
>> > > > versions of apache http, etc.
>> > > >
>> > > > -Kirk
>> > > >
>> > > >
>> > > > On Wed, Mar 23, 2016 at 11:04 AM, John Blum <jb...@pivotal.io>
>> wrote:
>> > > >
>> > > > > In a nutshell, you want the dependencies and all the transitive
>> > > > > dependencies versions to agree, otherwise conflicts like what Kirk
>> > > > > experienced, as well as what I experienced while integrating
>> Apache
>> > > Geode
>> > > > > support into Spring Session, will occur, and users will have
>> problems
>> > > > using
>> > > > > Geode in different contexts (e.g. App Server containers for
>> Session
>> > > > > management)
>> > > > >
>> > > > > Letting transitive dependencies of Geode (i.e. sub-projects)
>> dictate
>> > > > > dependency versions is NOT right and recipe for disaster.  Also,
>> you
>> > > are
>> > > > > not testing the dependencies, you are testing Geode with the
>> > > > dependencies.
>> > > > >
>> > > > >
>> > > > > On Wed, Mar 23, 2016 at 10:48 AM, Dan Smith <ds...@pivotal.io>
>> > wrote:
>> > > > >
>> > > > > > As far as the multiple versions of httpclient, I only see that
>> > > > dependency
>> > > > > > showing up in the test dependencies. Different sub projects have
>> > > > > different
>> > > > > > test dependencies, which are transitively pulling in different
>> > > versions
>> > > > > of
>> > > > > > this jar.
>> > > > > >
>> > > > > > We can certainly force a version across all of the different
>> > projects
>> > > > in
>> > > > > > dependency-resolution.gradle. But I think given these are
>> different
>> > > > > > projects with different test dependencies we should just let
>> them
>> > > pull
>> > > > in
>> > > > > > whatever test dependencies they need.
>> > > > > >
>> > > > > >
>> > > > > > > ./gradlew geode-core:dependencyInsight --dependency httpclient
>> > > > > > --configuration testRuntime
>> > > > > > Picked up JAVA_TOOL_OPTIONS:
>> > > > > > :geode-core:dependencyInsight
>> > > > > > org.apache.httpcomponents:httpclient:4.2.5
>> > > > > > \--- org.apache.hadoop:hadoop-auth:2.4.1
>> > > > > >      \--- testRuntime
>> > > > > >
>> > > > > >
>> > > > > >
>> > > > > > > ./gradlew geode-pulse:dependencyInsight --dependency
>> httpclient
>> > > > > > --configuration testRuntime
>> > > > > > Picked up JAVA_TOOL_OPTIONS:
>> > > > > > :geode-pulse:dependencyInsight
>> > > > > > org.apache.httpcomponents:httpclient:4.5.1
>> > > > > > +--- org.seleniumhq.selenium:selenium-api:2.52.0
>> > > > > > |    +--- testRuntime
>> > > > > > |    \--- org.seleniumhq.selenium:selenium-remote-driver:2.52.0
>> > > > > > |         +--- testRuntime
>> > > > > > |         +---
>> > org.seleniumhq.selenium:selenium-firefox-driver:2.52.0
>> > > > > > |         |    \--- testRuntime
>> > > > > > |         \--- org.seleniumhq.selenium:selenium-support:2.52.0
>> > > > > > |              \--- testRuntime
>> > > > > > \--- org.seleniumhq.selenium:selenium-remote-driver:2.52.0 (*)
>> > > > > >
>> > > > > >
>> > > > > >
>> > > > > > On Wed, Mar 23, 2016 at 10:27 AM, Dan Smith <ds...@pivotal.io>
>> > > wrote:
>> > > > > >
>> > > > > > > The tests in that geode-assembly project are supposed to run
>> on
>> > the
>> > > > > > binary
>> > > > > > > assembly of the project, so I think the classpath when run
>> from
>> > the
>> > > > > > command
>> > > > > > > line might be a bit different than what you get in intellij. I
>> > > think
>> > > > > the
>> > > > > > > command line classpath just points at geode-dependencies.jar.
>> > > > > > >
>> > > > > > > -Dan
>> > > > > > >
>> > > > > > >
>> > > > > > > On Wed, Mar 23, 2016 at 10:01 AM, Kirk Lund <klund@pivotal.io
>> >
>> > > > wrote:
>> > > > > > >
>> > > > > > >> So as I look at dependencies, I see that our gradle build is
>> > > > > ultimately
>> > > > > > >> depending on multiple versions of the same libraries. Can't
>> we
>> > > clean
>> > > > > > this
>> > > > > > >> up?
>> > > > > > >>
>> > > > > > >> org.apache.httpcomponents:httpclient:4.2.5
>> > > > > > >> org.apache.httpcomponents:httpclient:4.3.3
>> > > > > > >> org.apache.httpcomponents:httpclient:4.5.1
>> > > > > > >>
>> > > > > > >> I really don't want multiple versions of anything in this
>> > project.
>> > > > Are
>> > > > > > we
>> > > > > > >> not using gradle correctly?
>> > > > > > >>
>> > > > > > >> -Kirk
>> > > > > > >>
>> > > > > > >>
>> > > > > > >> On Wed, Mar 23, 2016 at 9:23 AM, Kirk Lund <klund@pivotal.io
>> >
>> > > > wrote:
>> > > > > > >>
>> > > > > > >> > RestAPIsWithSSLDUnitTest failed in the nightly build.
>> Failure
>> > > > stack
>> > > > > is
>> > > > > > >> > below. I tried running this test by itself in intellij and
>> it
>> > > > fails
>> > > > > > >> with "java.lang.NoSuchFieldError:
>> > > > > > >> > INSTANCE" from "at
>> > > > > > >> >
>> > > > > > >>
>> > > > > >
>> > > > >
>> > > >
>> > >
>> >
>> org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<init>(DefaultHttpRequestWriterFactory.java:52)".
>> > > > > > >> > I posted that failure stack below as well.
>> > > > > > >> >
>> > > > > > >> > Any ideas what the NoSuckFieldError is about?
>> > > > > > >> >
>> > > > > > >> > :geode-assembly:distributedTest
>> > > > > > >> >
>> > > > > > >> >
>> > > > > > >>
>> > > > > >
>> > > > >
>> > > >
>> > >
>> >
>> com.gemstone.gemfire.rest.internal.web.controllers.RestAPIsWithSSLDUnitTest
>> > > > > > >> > > testMutualAuthentication FAILED
>> > > > > > >> >     java.lang.RuntimeException: unexpected exception
>> > > > > > >> >         at
>> com.gemstone.gemfire.rest.internal.web.controllers.
>> > > > > > >> >
>> > > > > > >>
>> > > > > >
>> > > > >
>> > > >
>> > >
>> >
>> RestAPIsWithSSLDUnitTest.validateConnection(RestAPIsWithSSLDUnitTest.java:
>> > > > > > >> > 495)
>> > > > > > >> >         at
>> com.gemstone.gemfire.rest.internal.web.controllers.
>> > > > > > >> > RestAPIsWithSSLDUnitTest.testMutualAuthentication(
>> > > > > > >> > RestAPIsWithSSLDUnitTest.java:648)
>> > > > > > >> >
>> > > > > > >> >         Caused by:
>> > > > > > >> >         javax.net.ssl.SSLHandshakeException: Remote host
>> > closed
>> > > > > > >> > connection during handshake
>> > > > > > >> >             at sun.security.ssl.SSLSocketImpl.readRecord(
>> > > > > > >> > SSLSocketImpl.java:992)
>> > > > > > >> >             at sun.security.ssl.SSLSocketImpl.waitForClose(
>> > > > > > >> > SSLSocketImpl.java:1769)
>> > > > > > >> >             at sun.security.ssl.HandshakeOutStream.flush(
>> > > > > > >> > HandshakeOutStream.java:124)
>> > > > > > >> >             at
>> > sun.security.ssl.Handshaker.sendChangeCipherSpec(
>> > > > > > >> > Handshaker.java:1083)
>> > > > > > >> >             at sun.security.ssl.ClientHandshaker.
>> > > > > > >> > sendChangeCipherAndFinish(ClientHandshaker.java:1222)
>> > > > > > >> >             at
>> > > sun.security.ssl.ClientHandshaker.serverHelloDone(
>> > > > > > >> > ClientHandshaker.java:1134)
>> > > > > > >> >             at
>> > sun.security.ssl.ClientHandshaker.processMessage(
>> > > > > > >> > ClientHandshaker.java:348)
>> > > > > > >> >             at
>> > > > > > sun.security.ssl.Handshaker.processLoop(Handshaker.java:
>> > > > > > >> > 979)
>> > > > > > >> >             at
>> > > > > sun.security.ssl.Handshaker.process_record(Handshaker.
>> > > > > > >> > java:914)
>> > > > > > >> >             at sun.security.ssl.SSLSocketImpl.readRecord(
>> > > > > > >> > SSLSocketImpl.java:1062)
>> > > > > > >> >             at
>> > > > > sun.security.ssl.SSLSocketImpl.performInitialHandshake(
>> > > > > > >> > SSLSocketImpl.java:1375)
>> > > > > > >> >             at
>> sun.security.ssl.SSLSocketImpl.startHandshake(
>> > > > > > >> > SSLSocketImpl.java:1403)
>> > > > > > >> >             at
>> sun.security.ssl.SSLSocketImpl.startHandshake(
>> > > > > > >> > SSLSocketImpl.java:1387)
>> > > > > > >> >             at
>> > > > org.apache.http.conn.ssl.SSLConnectionSocketFactory.
>> > > > > > >> > createLayeredSocket(SSLConnectionSocketFactory.java:394)
>> > > > > > >> >             at
>> > > > org.apache.http.conn.ssl.SSLConnectionSocketFactory.
>> > > > > > >> > connectSocket(SSLConnectionSocketFactory.java:353)
>> > > > > > >> >             at
>> > > > > > org.apache.http.impl.conn.DefaultHttpClientConnectionOpe
>> > > > > > >> > rator.connect(DefaultHttpClientConnectionOperator.java:134)
>> > > > > > >> >             at
>> > > > > > org.apache.http.impl.conn.PoolingHttpClientConnectionMan
>> > > > > > >> > ager.connect(PoolingHttpClientConnectionManager.java:353)
>> > > > > > >> >             at
>> org.apache.http.impl.execchain.MainClientExec.
>> > > > > > >> > establishRoute(MainClientExec.java:380)
>> > > > > > >> >             at
>> org.apache.http.impl.execchain.MainClientExec.
>> > > > > > >> > execute(MainClientExec.java:236)
>> > > > > > >> >             at org.apache.http.impl.execchain.ProtocolExec.
>> > > > > > >> > execute(ProtocolExec.java:184)
>> > > > > > >> >             at
>> > org.apache.http.impl.execchain.RetryExec.execute(
>> > > > > > >> > RetryExec.java:88)
>> > > > > > >> >             at org.apache.http.impl.execchain.RedirectExec.
>> > > > > > >> > execute(RedirectExec.java:110)
>> > > > > > >> >             at
>> > > > > > org.apache.http.impl.client.InternalHttpClient.doExecute(
>> > > > > > >> > InternalHttpClient.java:184)
>> > > > > > >> >             at
>> > > > > > org.apache.http.impl.client.CloseableHttpClient.execute(
>> > > > > > >> > CloseableHttpClient.java:82)
>> > > > > > >> >             at
>> > > > > > org.apache.http.impl.client.CloseableHttpClient.execute(
>> > > > > > >> > CloseableHttpClient.java:107)
>> > > > > > >> >             at
>> > > com.gemstone.gemfire.rest.internal.web.controllers.
>> > > > > > >> >
>> > > > > > >>
>> > > > > >
>> > > > >
>> > > >
>> > >
>> >
>> RestAPIsWithSSLDUnitTest.validateConnection(RestAPIsWithSSLDUnitTest.java:
>> > > > > > >> > 474)
>> > > > > > >> >             ... 1 more
>> > > > > > >> >
>> > > > > > >> >             Caused by:
>> > > > > > >> >             java.io.EOFException: SSL peer shut down
>> > incorrectly
>> > > > > > >> >                 at
>> > > > > > >> sun.security.ssl.InputRecord.read(InputRecord.java:505)
>> > > > > > >> >                 at
>> sun.security.ssl.SSLSocketImpl.readRecord(
>> > > > > > >> > SSLSocketImpl.java:973)
>> > > > > > >> >                 ... 26 more
>> > > > > > >> >
>> > > > > > >> > java.lang.NoSuchFieldError: INSTANCE
>> > > > > > >> >
>> > > > > > >> > at
>> > > > > > >> >
>> > > > > > >>
>> > > > > >
>> > > > >
>> > > >
>> > >
>> >
>> org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<init>(DefaultHttpRequestWriterFactory.java:52)
>> > > > > > >> > at
>> > > > > > >> >
>> > > > > > >>
>> > > > > >
>> > > > >
>> > > >
>> > >
>> >
>> org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<init>(DefaultHttpRequestWriterFactory.java:56)
>> > > > > > >> > at
>> > > > > > >> >
>> > > > > > >>
>> > > > > >
>> > > > >
>> > > >
>> > >
>> >
>> org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<clinit>(DefaultHttpRequestWriterFactory.java:46)
>> > > > > > >> > at
>> > > > > > >> >
>> > > > > > >>
>> > > > > >
>> > > > >
>> > > >
>> > >
>> >
>> org.apache.http.impl.conn.ManagedHttpClientConnectionFactory.<init>(ManagedHttpClientConnectionFactory.java:72)
>> > > > > > >> > at
>> > > > > > >> >
>> > > > > > >>
>> > > > > >
>> > > > >
>> > > >
>> > >
>> >
>> org.apache.http.impl.conn.ManagedHttpClientConnectionFactory.<init>(ManagedHttpClientConnectionFactory.java:84)
>> > > > > > >> > at
>> > > > > > >> >
>> > > > > > >>
>> > > > > >
>> > > > >
>> > > >
>> > >
>> >
>> org.apache.http.impl.conn.ManagedHttpClientConnectionFactory.<clinit>(ManagedHttpClientConnectionFactory.java:59)
>> > > > > > >> > at
>> > > > > > >> >
>> > > > > > >>
>> > > > > >
>> > > > >
>> > > >
>> > >
>> >
>> org.apache.http.impl.conn.PoolingHttpClientConnectionManager$InternalConnectionFactory.<init>(PoolingHttpClientConnectionManager.java:487)
>> > > > > > >> > at
>> > > > > > >> >
>> > > > > > >>
>> > > > > >
>> > > > >
>> > > >
>> > >
>> >
>> org.apache.http.impl.conn.PoolingHttpClientConnectionManager.<init>(PoolingHttpClientConnectionManager.java:147)
>> > > > > > >> > at
>> > > > > > >> >
>> > > > > > >>
>> > > > > >
>> > > > >
>> > > >
>> > >
>> >
>> org.apache.http.impl.conn.PoolingHttpClientConnectionManager.<init>(PoolingHttpClientConnectionManager.java:136)
>> > > > > > >> > at
>> > > > > > >> >
>> > > > > > >>
>> > > > > >
>> > > > >
>> > > >
>> > >
>> >
>> org.apache.http.impl.conn.PoolingHttpClientConnectionManager.<init>(PoolingHttpClientConnectionManager.java:112)
>> > > > > > >> > at
>> > > > > > >> >
>> > > > > > >>
>> > > > > >
>> > > > >
>> > > >
>> > >
>> >
>> org.apache.http.impl.client.HttpClientBuilder.build(HttpClientBuilder.java:726)
>> > > > > > >> > at
>> > > > > > >> >
>> > > > > > >>
>> > > > > >
>> > > > >
>> > > >
>> > >
>> >
>> com.gemstone.gemfire.rest.internal.web.controllers.RestAPIsWithSSLDUnitTest.getSSLBasedHTTPClient(RestAPIsWithSSLDUnitTest.java:458)
>> > > > > > >> > at
>> > > > > > >> >
>> > > > > > >>
>> > > > > >
>> > > > >
>> > > >
>> > >
>> >
>> com.gemstone.gemfire.rest.internal.web.controllers.RestAPIsWithSSLDUnitTest.validateConnection(RestAPIsWithSSLDUnitTest.java:473)
>> > > > > > >> > at
>> > > > > > >> >
>> > > > > > >>
>> > > > > >
>> > > > >
>> > > >
>> > >
>> >
>> com.gemstone.gemfire.rest.internal.web.controllers.RestAPIsWithSSLDUnitTest.testSSLWithoutKeyStoreType(RestAPIsWithSSLDUnitTest.java:522)
>> > > > > > >> > 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:497)
>> > > > > > >> > at junit.framework.TestCase.runTest(TestCase.java:176)
>> > > > > > >> > at junit.framework.TestCase.runBare(TestCase.java:141)
>> > > > > > >> > at
>> junit.framework.TestResult$1.protect(TestResult.java:122)
>> > > > > > >> > at
>> > junit.framework.TestResult.runProtected(TestResult.java:142)
>> > > > > > >> > at junit.framework.TestResult.run(TestResult.java:125)
>> > > > > > >> > at junit.framework.TestCase.run(TestCase.java:129)
>> > > > > > >> > at junit.framework.TestSuite.runTest(TestSuite.java:252)
>> > > > > > >> > at junit.framework.TestSuite.run(TestSuite.java:247)
>> > > > > > >> > at
>> > > > > > >> >
>> > > > > > >>
>> > > > > >
>> > > > >
>> > > >
>> > >
>> >
>> org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:86)
>> > > > > > >> > at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
>> > > > > > >> > at
>> > > > > > >> >
>> > > > > > >>
>> > > > > >
>> > > > >
>> > > >
>> > >
>> >
>> com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
>> > > > > > >> > at
>> > > > > > >> >
>> > > > > > >>
>> > > > > >
>> > > > >
>> > > >
>> > >
>> >
>> com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:234)
>> > > > > > >> > at
>> > > > > > >>
>> > > > >
>> > com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:74)
>> > > > > > >> > 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:497)
>> > > > > > >> > at
>> > > > > >
>> > com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
>> > > > > > >> >
>> > > > > > >> >
>> > > > > > >>
>> > > > > > >
>> > > > > > >
>> > > > > >
>> > > > >
>> > > > >
>> > > > >
>> > > > > --
>> > > > > -John
>> > > > > 503-504-8657
>> > > > > john.blum10101 (skype)
>> > > > >
>> > > >
>> > >
>> > >
>> > >
>> > > --
>> > > -John
>> > > 503-504-8657
>> > > john.blum10101 (skype)
>> > >
>> >
>>
>
>
>
> --
> -John
> 503-504-8657
> john.blum10101 (skype)
>



-- 
-John
503-504-8657
john.blum10101 (skype)

Re: RestAPIsWithSSLDUnitTest fails

Posted by John Blum <jb...@pivotal.io>.
Kirk- rather than have Gradle generate the .idea project files, have you
tried importing the Geode project from existing sources using Gradle the
template?

On Wed, Mar 23, 2016 at 1:28 PM, Kirk Lund <kl...@pivotal.io> wrote:

> RestAPIsWithSSLDUnitTest passes on the command-line.
>
> When I execute RestAPIsWithSSLDUnitTest in my IntelliJ project, the
> classpath of the test prints out with two versions of httpclient and
> httpcore:
>
> [vm_1]
>
>  /Users/klund/.gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpclient/4.2.5/666e26e76f2e87d84e4f16acb546481ae1b8e9a6/httpclient-4.2.5.jar
> [vm_1]
>
>  /Users/klund/.gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpcore/4.2.4/3b7f38df6de5dd8b500e602ae8c2dd5ee446f883/httpcore-4.2.4.jar
> [vm_1]
>
>  /Users/klund/.gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpclient/4.5.1/7e3cecc566df91338c6c67883b89ddd05a17db43/httpclient-4.5.1.jar
> [vm_1]
>
>  /Users/klund/.gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpcore/4.4.3/e876a79d561e5c6207b78d347e198c8c4531a5e5/httpcore-4.4.3.jar
>
> If you use "./gradlew idea" the resulting module definitions are not
> sufficient (to illustrate, try generating intellij projects for closed+open
> and then try editing and running DUnits in legacyDUnit and both assembly
> projects) and require some manual adjusting which is obviously error prone.
> I'm not an IntelliJ or gradle expert so I doubt that I'll be the one to fix
> this.
>
> Ultimately I'd like to see all of this become easier and simpler. I believe
> too much complexity or difficulty will result in a smaller number of
> contributors. It also results in contributors spending their time with
> gradle or the IDE instead of on geode.
>
> -Kirk
>
>
> On Wed, Mar 23, 2016 at 12:04 PM, Dan Smith <ds...@pivotal.io> wrote:
>
> > First off, your intellij classpath and gradle classpath are pretty much
> the
> > same. The one exception, I think, is that the test target for
> > geode-assembly sets up a different runtime classpath to point at the
> > bundled product. I didn't set that up, but I think maybe the idea is that
> > we needed some tests of the actual bundled binary? Take a look at
> > geode-assembly/build.gradle. If someone knows how to fix the setup that
> so
> > we still have that test coverage of the bundled product and the tests do
> > work in intellij, please fix it! All of the rest of the tests should be
> > using exactly the same environment on the command line and in the IDE.
> >
> > I'm not sure if this is even your problem Kirk, did you try running from
> > the command line?
> >
> > Second, I don't see anything wrong with having transitive test
> > dependencies. It's a huge pain to track down the transitive dependencies
> > and keep them up to date manually. They aren't hurting you!
> >
> > Regarding John's struggles with dependencies of geode, what we really
> need
> > to do is clean up *product* dependencies of geode core - we're pulling in
> > all sorts of stuff for gfsh, pulse, the REST API, etc. GEODE-818 is all
> > about cleaning that up. I was hoping to take up GEODE-1072 (remove HDFS
> > code) when I get a chance. If you want to clean up the dependencies
> please
> > chip in and take on some of those subtasks, the sooner the better!
> >
> > -Dan
> >
> > On Wed, Mar 23, 2016 at 11:34 AM, John Blum <jb...@pivotal.io> wrote:
> >
> > > If you created the IntelliJ IDEA project from the Gradle build, then it
> > is
> > > Geode's Gradle build scripts that are specifying the dependencies and
> > thus
> > > the Gradle build scripts are wrong.  In Maven, you can declare a
> > > dependencyManagement section (along with exclusions) to manage
> transitive
> > > dependencies.  I don't recall what the equivalent is in Gradle for
> > > dependencyManagement.
> > >
> > > On Wed, Mar 23, 2016 at 11:24 AM, Kirk Lund <kl...@pivotal.io> wrote:
> > >
> > > > I think that maybe we don't want to continue with transitive
> > dependencies
> > > > enabled for testing. If we turn that off then we go back to having to
> > > > specify all versions even runtime test dependencies right? Are there
> > any
> > > > valid arguments for keeping transitive dependencies enabled for
> > testing?
> > > >
> > > > Also, why would my intellij dependencies be different from gradle
> > > > command-line? The one was built from the *.gradle files in geode. If
> > > > intellij's gradle picks up multiple versions of libraries, then I
> think
> > > > that still means something isn't right in our *.gradle files.
> > > >
> > > > Not that I want to see test failures... BUT, I want to spend my time
> > > > diagnosing test failures instead of dealing with gradle and
> dependency
> > > > versioning and wondering why intellij is picking up 2 versions of
> jna,
> > 3
> > > > versions of apache http, etc.
> > > >
> > > > -Kirk
> > > >
> > > >
> > > > On Wed, Mar 23, 2016 at 11:04 AM, John Blum <jb...@pivotal.io>
> wrote:
> > > >
> > > > > In a nutshell, you want the dependencies and all the transitive
> > > > > dependencies versions to agree, otherwise conflicts like what Kirk
> > > > > experienced, as well as what I experienced while integrating Apache
> > > Geode
> > > > > support into Spring Session, will occur, and users will have
> problems
> > > > using
> > > > > Geode in different contexts (e.g. App Server containers for Session
> > > > > management)
> > > > >
> > > > > Letting transitive dependencies of Geode (i.e. sub-projects)
> dictate
> > > > > dependency versions is NOT right and recipe for disaster.  Also,
> you
> > > are
> > > > > not testing the dependencies, you are testing Geode with the
> > > > dependencies.
> > > > >
> > > > >
> > > > > On Wed, Mar 23, 2016 at 10:48 AM, Dan Smith <ds...@pivotal.io>
> > wrote:
> > > > >
> > > > > > As far as the multiple versions of httpclient, I only see that
> > > > dependency
> > > > > > showing up in the test dependencies. Different sub projects have
> > > > > different
> > > > > > test dependencies, which are transitively pulling in different
> > > versions
> > > > > of
> > > > > > this jar.
> > > > > >
> > > > > > We can certainly force a version across all of the different
> > projects
> > > > in
> > > > > > dependency-resolution.gradle. But I think given these are
> different
> > > > > > projects with different test dependencies we should just let them
> > > pull
> > > > in
> > > > > > whatever test dependencies they need.
> > > > > >
> > > > > >
> > > > > > > ./gradlew geode-core:dependencyInsight --dependency httpclient
> > > > > > --configuration testRuntime
> > > > > > Picked up JAVA_TOOL_OPTIONS:
> > > > > > :geode-core:dependencyInsight
> > > > > > org.apache.httpcomponents:httpclient:4.2.5
> > > > > > \--- org.apache.hadoop:hadoop-auth:2.4.1
> > > > > >      \--- testRuntime
> > > > > >
> > > > > >
> > > > > >
> > > > > > > ./gradlew geode-pulse:dependencyInsight --dependency httpclient
> > > > > > --configuration testRuntime
> > > > > > Picked up JAVA_TOOL_OPTIONS:
> > > > > > :geode-pulse:dependencyInsight
> > > > > > org.apache.httpcomponents:httpclient:4.5.1
> > > > > > +--- org.seleniumhq.selenium:selenium-api:2.52.0
> > > > > > |    +--- testRuntime
> > > > > > |    \--- org.seleniumhq.selenium:selenium-remote-driver:2.52.0
> > > > > > |         +--- testRuntime
> > > > > > |         +---
> > org.seleniumhq.selenium:selenium-firefox-driver:2.52.0
> > > > > > |         |    \--- testRuntime
> > > > > > |         \--- org.seleniumhq.selenium:selenium-support:2.52.0
> > > > > > |              \--- testRuntime
> > > > > > \--- org.seleniumhq.selenium:selenium-remote-driver:2.52.0 (*)
> > > > > >
> > > > > >
> > > > > >
> > > > > > On Wed, Mar 23, 2016 at 10:27 AM, Dan Smith <ds...@pivotal.io>
> > > wrote:
> > > > > >
> > > > > > > The tests in that geode-assembly project are supposed to run on
> > the
> > > > > > binary
> > > > > > > assembly of the project, so I think the classpath when run from
> > the
> > > > > > command
> > > > > > > line might be a bit different than what you get in intellij. I
> > > think
> > > > > the
> > > > > > > command line classpath just points at geode-dependencies.jar.
> > > > > > >
> > > > > > > -Dan
> > > > > > >
> > > > > > >
> > > > > > > On Wed, Mar 23, 2016 at 10:01 AM, Kirk Lund <kl...@pivotal.io>
> > > > wrote:
> > > > > > >
> > > > > > >> So as I look at dependencies, I see that our gradle build is
> > > > > ultimately
> > > > > > >> depending on multiple versions of the same libraries. Can't we
> > > clean
> > > > > > this
> > > > > > >> up?
> > > > > > >>
> > > > > > >> org.apache.httpcomponents:httpclient:4.2.5
> > > > > > >> org.apache.httpcomponents:httpclient:4.3.3
> > > > > > >> org.apache.httpcomponents:httpclient:4.5.1
> > > > > > >>
> > > > > > >> I really don't want multiple versions of anything in this
> > project.
> > > > Are
> > > > > > we
> > > > > > >> not using gradle correctly?
> > > > > > >>
> > > > > > >> -Kirk
> > > > > > >>
> > > > > > >>
> > > > > > >> On Wed, Mar 23, 2016 at 9:23 AM, Kirk Lund <kl...@pivotal.io>
> > > > wrote:
> > > > > > >>
> > > > > > >> > RestAPIsWithSSLDUnitTest failed in the nightly build.
> Failure
> > > > stack
> > > > > is
> > > > > > >> > below. I tried running this test by itself in intellij and
> it
> > > > fails
> > > > > > >> with "java.lang.NoSuchFieldError:
> > > > > > >> > INSTANCE" from "at
> > > > > > >> >
> > > > > > >>
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<init>(DefaultHttpRequestWriterFactory.java:52)".
> > > > > > >> > I posted that failure stack below as well.
> > > > > > >> >
> > > > > > >> > Any ideas what the NoSuckFieldError is about?
> > > > > > >> >
> > > > > > >> > :geode-assembly:distributedTest
> > > > > > >> >
> > > > > > >> >
> > > > > > >>
> > > > > >
> > > > >
> > > >
> > >
> >
> com.gemstone.gemfire.rest.internal.web.controllers.RestAPIsWithSSLDUnitTest
> > > > > > >> > > testMutualAuthentication FAILED
> > > > > > >> >     java.lang.RuntimeException: unexpected exception
> > > > > > >> >         at
> com.gemstone.gemfire.rest.internal.web.controllers.
> > > > > > >> >
> > > > > > >>
> > > > > >
> > > > >
> > > >
> > >
> >
> RestAPIsWithSSLDUnitTest.validateConnection(RestAPIsWithSSLDUnitTest.java:
> > > > > > >> > 495)
> > > > > > >> >         at
> com.gemstone.gemfire.rest.internal.web.controllers.
> > > > > > >> > RestAPIsWithSSLDUnitTest.testMutualAuthentication(
> > > > > > >> > RestAPIsWithSSLDUnitTest.java:648)
> > > > > > >> >
> > > > > > >> >         Caused by:
> > > > > > >> >         javax.net.ssl.SSLHandshakeException: Remote host
> > closed
> > > > > > >> > connection during handshake
> > > > > > >> >             at sun.security.ssl.SSLSocketImpl.readRecord(
> > > > > > >> > SSLSocketImpl.java:992)
> > > > > > >> >             at sun.security.ssl.SSLSocketImpl.waitForClose(
> > > > > > >> > SSLSocketImpl.java:1769)
> > > > > > >> >             at sun.security.ssl.HandshakeOutStream.flush(
> > > > > > >> > HandshakeOutStream.java:124)
> > > > > > >> >             at
> > sun.security.ssl.Handshaker.sendChangeCipherSpec(
> > > > > > >> > Handshaker.java:1083)
> > > > > > >> >             at sun.security.ssl.ClientHandshaker.
> > > > > > >> > sendChangeCipherAndFinish(ClientHandshaker.java:1222)
> > > > > > >> >             at
> > > sun.security.ssl.ClientHandshaker.serverHelloDone(
> > > > > > >> > ClientHandshaker.java:1134)
> > > > > > >> >             at
> > sun.security.ssl.ClientHandshaker.processMessage(
> > > > > > >> > ClientHandshaker.java:348)
> > > > > > >> >             at
> > > > > > sun.security.ssl.Handshaker.processLoop(Handshaker.java:
> > > > > > >> > 979)
> > > > > > >> >             at
> > > > > sun.security.ssl.Handshaker.process_record(Handshaker.
> > > > > > >> > java:914)
> > > > > > >> >             at sun.security.ssl.SSLSocketImpl.readRecord(
> > > > > > >> > SSLSocketImpl.java:1062)
> > > > > > >> >             at
> > > > > sun.security.ssl.SSLSocketImpl.performInitialHandshake(
> > > > > > >> > SSLSocketImpl.java:1375)
> > > > > > >> >             at
> sun.security.ssl.SSLSocketImpl.startHandshake(
> > > > > > >> > SSLSocketImpl.java:1403)
> > > > > > >> >             at
> sun.security.ssl.SSLSocketImpl.startHandshake(
> > > > > > >> > SSLSocketImpl.java:1387)
> > > > > > >> >             at
> > > > org.apache.http.conn.ssl.SSLConnectionSocketFactory.
> > > > > > >> > createLayeredSocket(SSLConnectionSocketFactory.java:394)
> > > > > > >> >             at
> > > > org.apache.http.conn.ssl.SSLConnectionSocketFactory.
> > > > > > >> > connectSocket(SSLConnectionSocketFactory.java:353)
> > > > > > >> >             at
> > > > > > org.apache.http.impl.conn.DefaultHttpClientConnectionOpe
> > > > > > >> > rator.connect(DefaultHttpClientConnectionOperator.java:134)
> > > > > > >> >             at
> > > > > > org.apache.http.impl.conn.PoolingHttpClientConnectionMan
> > > > > > >> > ager.connect(PoolingHttpClientConnectionManager.java:353)
> > > > > > >> >             at
> org.apache.http.impl.execchain.MainClientExec.
> > > > > > >> > establishRoute(MainClientExec.java:380)
> > > > > > >> >             at
> org.apache.http.impl.execchain.MainClientExec.
> > > > > > >> > execute(MainClientExec.java:236)
> > > > > > >> >             at org.apache.http.impl.execchain.ProtocolExec.
> > > > > > >> > execute(ProtocolExec.java:184)
> > > > > > >> >             at
> > org.apache.http.impl.execchain.RetryExec.execute(
> > > > > > >> > RetryExec.java:88)
> > > > > > >> >             at org.apache.http.impl.execchain.RedirectExec.
> > > > > > >> > execute(RedirectExec.java:110)
> > > > > > >> >             at
> > > > > > org.apache.http.impl.client.InternalHttpClient.doExecute(
> > > > > > >> > InternalHttpClient.java:184)
> > > > > > >> >             at
> > > > > > org.apache.http.impl.client.CloseableHttpClient.execute(
> > > > > > >> > CloseableHttpClient.java:82)
> > > > > > >> >             at
> > > > > > org.apache.http.impl.client.CloseableHttpClient.execute(
> > > > > > >> > CloseableHttpClient.java:107)
> > > > > > >> >             at
> > > com.gemstone.gemfire.rest.internal.web.controllers.
> > > > > > >> >
> > > > > > >>
> > > > > >
> > > > >
> > > >
> > >
> >
> RestAPIsWithSSLDUnitTest.validateConnection(RestAPIsWithSSLDUnitTest.java:
> > > > > > >> > 474)
> > > > > > >> >             ... 1 more
> > > > > > >> >
> > > > > > >> >             Caused by:
> > > > > > >> >             java.io.EOFException: SSL peer shut down
> > incorrectly
> > > > > > >> >                 at
> > > > > > >> sun.security.ssl.InputRecord.read(InputRecord.java:505)
> > > > > > >> >                 at
> sun.security.ssl.SSLSocketImpl.readRecord(
> > > > > > >> > SSLSocketImpl.java:973)
> > > > > > >> >                 ... 26 more
> > > > > > >> >
> > > > > > >> > java.lang.NoSuchFieldError: INSTANCE
> > > > > > >> >
> > > > > > >> > at
> > > > > > >> >
> > > > > > >>
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<init>(DefaultHttpRequestWriterFactory.java:52)
> > > > > > >> > at
> > > > > > >> >
> > > > > > >>
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<init>(DefaultHttpRequestWriterFactory.java:56)
> > > > > > >> > at
> > > > > > >> >
> > > > > > >>
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<clinit>(DefaultHttpRequestWriterFactory.java:46)
> > > > > > >> > at
> > > > > > >> >
> > > > > > >>
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.http.impl.conn.ManagedHttpClientConnectionFactory.<init>(ManagedHttpClientConnectionFactory.java:72)
> > > > > > >> > at
> > > > > > >> >
> > > > > > >>
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.http.impl.conn.ManagedHttpClientConnectionFactory.<init>(ManagedHttpClientConnectionFactory.java:84)
> > > > > > >> > at
> > > > > > >> >
> > > > > > >>
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.http.impl.conn.ManagedHttpClientConnectionFactory.<clinit>(ManagedHttpClientConnectionFactory.java:59)
> > > > > > >> > at
> > > > > > >> >
> > > > > > >>
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.http.impl.conn.PoolingHttpClientConnectionManager$InternalConnectionFactory.<init>(PoolingHttpClientConnectionManager.java:487)
> > > > > > >> > at
> > > > > > >> >
> > > > > > >>
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.http.impl.conn.PoolingHttpClientConnectionManager.<init>(PoolingHttpClientConnectionManager.java:147)
> > > > > > >> > at
> > > > > > >> >
> > > > > > >>
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.http.impl.conn.PoolingHttpClientConnectionManager.<init>(PoolingHttpClientConnectionManager.java:136)
> > > > > > >> > at
> > > > > > >> >
> > > > > > >>
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.http.impl.conn.PoolingHttpClientConnectionManager.<init>(PoolingHttpClientConnectionManager.java:112)
> > > > > > >> > at
> > > > > > >> >
> > > > > > >>
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.http.impl.client.HttpClientBuilder.build(HttpClientBuilder.java:726)
> > > > > > >> > at
> > > > > > >> >
> > > > > > >>
> > > > > >
> > > > >
> > > >
> > >
> >
> com.gemstone.gemfire.rest.internal.web.controllers.RestAPIsWithSSLDUnitTest.getSSLBasedHTTPClient(RestAPIsWithSSLDUnitTest.java:458)
> > > > > > >> > at
> > > > > > >> >
> > > > > > >>
> > > > > >
> > > > >
> > > >
> > >
> >
> com.gemstone.gemfire.rest.internal.web.controllers.RestAPIsWithSSLDUnitTest.validateConnection(RestAPIsWithSSLDUnitTest.java:473)
> > > > > > >> > at
> > > > > > >> >
> > > > > > >>
> > > > > >
> > > > >
> > > >
> > >
> >
> com.gemstone.gemfire.rest.internal.web.controllers.RestAPIsWithSSLDUnitTest.testSSLWithoutKeyStoreType(RestAPIsWithSSLDUnitTest.java:522)
> > > > > > >> > 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:497)
> > > > > > >> > at junit.framework.TestCase.runTest(TestCase.java:176)
> > > > > > >> > at junit.framework.TestCase.runBare(TestCase.java:141)
> > > > > > >> > at junit.framework.TestResult$1.protect(TestResult.java:122)
> > > > > > >> > at
> > junit.framework.TestResult.runProtected(TestResult.java:142)
> > > > > > >> > at junit.framework.TestResult.run(TestResult.java:125)
> > > > > > >> > at junit.framework.TestCase.run(TestCase.java:129)
> > > > > > >> > at junit.framework.TestSuite.runTest(TestSuite.java:252)
> > > > > > >> > at junit.framework.TestSuite.run(TestSuite.java:247)
> > > > > > >> > at
> > > > > > >> >
> > > > > > >>
> > > > > >
> > > > >
> > > >
> > >
> >
> org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:86)
> > > > > > >> > at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
> > > > > > >> > at
> > > > > > >> >
> > > > > > >>
> > > > > >
> > > > >
> > > >
> > >
> >
> com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
> > > > > > >> > at
> > > > > > >> >
> > > > > > >>
> > > > > >
> > > > >
> > > >
> > >
> >
> com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:234)
> > > > > > >> > at
> > > > > > >>
> > > > >
> > com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:74)
> > > > > > >> > 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:497)
> > > > > > >> > at
> > > > > >
> > com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
> > > > > > >> >
> > > > > > >> >
> > > > > > >>
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > -John
> > > > > 503-504-8657
> > > > > john.blum10101 (skype)
> > > > >
> > > >
> > >
> > >
> > >
> > > --
> > > -John
> > > 503-504-8657
> > > john.blum10101 (skype)
> > >
> >
>



-- 
-John
503-504-8657
john.blum10101 (skype)

Re: RestAPIsWithSSLDUnitTest fails

Posted by Kirk Lund <kl...@pivotal.io>.
RestAPIsWithSSLDUnitTest passes on the command-line.

When I execute RestAPIsWithSSLDUnitTest in my IntelliJ project, the
classpath of the test prints out with two versions of httpclient and
httpcore:

[vm_1]
 /Users/klund/.gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpclient/4.2.5/666e26e76f2e87d84e4f16acb546481ae1b8e9a6/httpclient-4.2.5.jar
[vm_1]
 /Users/klund/.gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpcore/4.2.4/3b7f38df6de5dd8b500e602ae8c2dd5ee446f883/httpcore-4.2.4.jar
[vm_1]
 /Users/klund/.gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpclient/4.5.1/7e3cecc566df91338c6c67883b89ddd05a17db43/httpclient-4.5.1.jar
[vm_1]
 /Users/klund/.gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpcore/4.4.3/e876a79d561e5c6207b78d347e198c8c4531a5e5/httpcore-4.4.3.jar

If you use "./gradlew idea" the resulting module definitions are not
sufficient (to illustrate, try generating intellij projects for closed+open
and then try editing and running DUnits in legacyDUnit and both assembly
projects) and require some manual adjusting which is obviously error prone.
I'm not an IntelliJ or gradle expert so I doubt that I'll be the one to fix
this.

Ultimately I'd like to see all of this become easier and simpler. I believe
too much complexity or difficulty will result in a smaller number of
contributors. It also results in contributors spending their time with
gradle or the IDE instead of on geode.

-Kirk


On Wed, Mar 23, 2016 at 12:04 PM, Dan Smith <ds...@pivotal.io> wrote:

> First off, your intellij classpath and gradle classpath are pretty much the
> same. The one exception, I think, is that the test target for
> geode-assembly sets up a different runtime classpath to point at the
> bundled product. I didn't set that up, but I think maybe the idea is that
> we needed some tests of the actual bundled binary? Take a look at
> geode-assembly/build.gradle. If someone knows how to fix the setup that so
> we still have that test coverage of the bundled product and the tests do
> work in intellij, please fix it! All of the rest of the tests should be
> using exactly the same environment on the command line and in the IDE.
>
> I'm not sure if this is even your problem Kirk, did you try running from
> the command line?
>
> Second, I don't see anything wrong with having transitive test
> dependencies. It's a huge pain to track down the transitive dependencies
> and keep them up to date manually. They aren't hurting you!
>
> Regarding John's struggles with dependencies of geode, what we really need
> to do is clean up *product* dependencies of geode core - we're pulling in
> all sorts of stuff for gfsh, pulse, the REST API, etc. GEODE-818 is all
> about cleaning that up. I was hoping to take up GEODE-1072 (remove HDFS
> code) when I get a chance. If you want to clean up the dependencies please
> chip in and take on some of those subtasks, the sooner the better!
>
> -Dan
>
> On Wed, Mar 23, 2016 at 11:34 AM, John Blum <jb...@pivotal.io> wrote:
>
> > If you created the IntelliJ IDEA project from the Gradle build, then it
> is
> > Geode's Gradle build scripts that are specifying the dependencies and
> thus
> > the Gradle build scripts are wrong.  In Maven, you can declare a
> > dependencyManagement section (along with exclusions) to manage transitive
> > dependencies.  I don't recall what the equivalent is in Gradle for
> > dependencyManagement.
> >
> > On Wed, Mar 23, 2016 at 11:24 AM, Kirk Lund <kl...@pivotal.io> wrote:
> >
> > > I think that maybe we don't want to continue with transitive
> dependencies
> > > enabled for testing. If we turn that off then we go back to having to
> > > specify all versions even runtime test dependencies right? Are there
> any
> > > valid arguments for keeping transitive dependencies enabled for
> testing?
> > >
> > > Also, why would my intellij dependencies be different from gradle
> > > command-line? The one was built from the *.gradle files in geode. If
> > > intellij's gradle picks up multiple versions of libraries, then I think
> > > that still means something isn't right in our *.gradle files.
> > >
> > > Not that I want to see test failures... BUT, I want to spend my time
> > > diagnosing test failures instead of dealing with gradle and dependency
> > > versioning and wondering why intellij is picking up 2 versions of jna,
> 3
> > > versions of apache http, etc.
> > >
> > > -Kirk
> > >
> > >
> > > On Wed, Mar 23, 2016 at 11:04 AM, John Blum <jb...@pivotal.io> wrote:
> > >
> > > > In a nutshell, you want the dependencies and all the transitive
> > > > dependencies versions to agree, otherwise conflicts like what Kirk
> > > > experienced, as well as what I experienced while integrating Apache
> > Geode
> > > > support into Spring Session, will occur, and users will have problems
> > > using
> > > > Geode in different contexts (e.g. App Server containers for Session
> > > > management)
> > > >
> > > > Letting transitive dependencies of Geode (i.e. sub-projects) dictate
> > > > dependency versions is NOT right and recipe for disaster.  Also, you
> > are
> > > > not testing the dependencies, you are testing Geode with the
> > > dependencies.
> > > >
> > > >
> > > > On Wed, Mar 23, 2016 at 10:48 AM, Dan Smith <ds...@pivotal.io>
> wrote:
> > > >
> > > > > As far as the multiple versions of httpclient, I only see that
> > > dependency
> > > > > showing up in the test dependencies. Different sub projects have
> > > > different
> > > > > test dependencies, which are transitively pulling in different
> > versions
> > > > of
> > > > > this jar.
> > > > >
> > > > > We can certainly force a version across all of the different
> projects
> > > in
> > > > > dependency-resolution.gradle. But I think given these are different
> > > > > projects with different test dependencies we should just let them
> > pull
> > > in
> > > > > whatever test dependencies they need.
> > > > >
> > > > >
> > > > > > ./gradlew geode-core:dependencyInsight --dependency httpclient
> > > > > --configuration testRuntime
> > > > > Picked up JAVA_TOOL_OPTIONS:
> > > > > :geode-core:dependencyInsight
> > > > > org.apache.httpcomponents:httpclient:4.2.5
> > > > > \--- org.apache.hadoop:hadoop-auth:2.4.1
> > > > >      \--- testRuntime
> > > > >
> > > > >
> > > > >
> > > > > > ./gradlew geode-pulse:dependencyInsight --dependency httpclient
> > > > > --configuration testRuntime
> > > > > Picked up JAVA_TOOL_OPTIONS:
> > > > > :geode-pulse:dependencyInsight
> > > > > org.apache.httpcomponents:httpclient:4.5.1
> > > > > +--- org.seleniumhq.selenium:selenium-api:2.52.0
> > > > > |    +--- testRuntime
> > > > > |    \--- org.seleniumhq.selenium:selenium-remote-driver:2.52.0
> > > > > |         +--- testRuntime
> > > > > |         +---
> org.seleniumhq.selenium:selenium-firefox-driver:2.52.0
> > > > > |         |    \--- testRuntime
> > > > > |         \--- org.seleniumhq.selenium:selenium-support:2.52.0
> > > > > |              \--- testRuntime
> > > > > \--- org.seleniumhq.selenium:selenium-remote-driver:2.52.0 (*)
> > > > >
> > > > >
> > > > >
> > > > > On Wed, Mar 23, 2016 at 10:27 AM, Dan Smith <ds...@pivotal.io>
> > wrote:
> > > > >
> > > > > > The tests in that geode-assembly project are supposed to run on
> the
> > > > > binary
> > > > > > assembly of the project, so I think the classpath when run from
> the
> > > > > command
> > > > > > line might be a bit different than what you get in intellij. I
> > think
> > > > the
> > > > > > command line classpath just points at geode-dependencies.jar.
> > > > > >
> > > > > > -Dan
> > > > > >
> > > > > >
> > > > > > On Wed, Mar 23, 2016 at 10:01 AM, Kirk Lund <kl...@pivotal.io>
> > > wrote:
> > > > > >
> > > > > >> So as I look at dependencies, I see that our gradle build is
> > > > ultimately
> > > > > >> depending on multiple versions of the same libraries. Can't we
> > clean
> > > > > this
> > > > > >> up?
> > > > > >>
> > > > > >> org.apache.httpcomponents:httpclient:4.2.5
> > > > > >> org.apache.httpcomponents:httpclient:4.3.3
> > > > > >> org.apache.httpcomponents:httpclient:4.5.1
> > > > > >>
> > > > > >> I really don't want multiple versions of anything in this
> project.
> > > Are
> > > > > we
> > > > > >> not using gradle correctly?
> > > > > >>
> > > > > >> -Kirk
> > > > > >>
> > > > > >>
> > > > > >> On Wed, Mar 23, 2016 at 9:23 AM, Kirk Lund <kl...@pivotal.io>
> > > wrote:
> > > > > >>
> > > > > >> > RestAPIsWithSSLDUnitTest failed in the nightly build. Failure
> > > stack
> > > > is
> > > > > >> > below. I tried running this test by itself in intellij and it
> > > fails
> > > > > >> with "java.lang.NoSuchFieldError:
> > > > > >> > INSTANCE" from "at
> > > > > >> >
> > > > > >>
> > > > >
> > > >
> > >
> >
> org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<init>(DefaultHttpRequestWriterFactory.java:52)".
> > > > > >> > I posted that failure stack below as well.
> > > > > >> >
> > > > > >> > Any ideas what the NoSuckFieldError is about?
> > > > > >> >
> > > > > >> > :geode-assembly:distributedTest
> > > > > >> >
> > > > > >> >
> > > > > >>
> > > > >
> > > >
> > >
> >
> com.gemstone.gemfire.rest.internal.web.controllers.RestAPIsWithSSLDUnitTest
> > > > > >> > > testMutualAuthentication FAILED
> > > > > >> >     java.lang.RuntimeException: unexpected exception
> > > > > >> >         at com.gemstone.gemfire.rest.internal.web.controllers.
> > > > > >> >
> > > > > >>
> > > > >
> > > >
> > >
> >
> RestAPIsWithSSLDUnitTest.validateConnection(RestAPIsWithSSLDUnitTest.java:
> > > > > >> > 495)
> > > > > >> >         at com.gemstone.gemfire.rest.internal.web.controllers.
> > > > > >> > RestAPIsWithSSLDUnitTest.testMutualAuthentication(
> > > > > >> > RestAPIsWithSSLDUnitTest.java:648)
> > > > > >> >
> > > > > >> >         Caused by:
> > > > > >> >         javax.net.ssl.SSLHandshakeException: Remote host
> closed
> > > > > >> > connection during handshake
> > > > > >> >             at sun.security.ssl.SSLSocketImpl.readRecord(
> > > > > >> > SSLSocketImpl.java:992)
> > > > > >> >             at sun.security.ssl.SSLSocketImpl.waitForClose(
> > > > > >> > SSLSocketImpl.java:1769)
> > > > > >> >             at sun.security.ssl.HandshakeOutStream.flush(
> > > > > >> > HandshakeOutStream.java:124)
> > > > > >> >             at
> sun.security.ssl.Handshaker.sendChangeCipherSpec(
> > > > > >> > Handshaker.java:1083)
> > > > > >> >             at sun.security.ssl.ClientHandshaker.
> > > > > >> > sendChangeCipherAndFinish(ClientHandshaker.java:1222)
> > > > > >> >             at
> > sun.security.ssl.ClientHandshaker.serverHelloDone(
> > > > > >> > ClientHandshaker.java:1134)
> > > > > >> >             at
> sun.security.ssl.ClientHandshaker.processMessage(
> > > > > >> > ClientHandshaker.java:348)
> > > > > >> >             at
> > > > > sun.security.ssl.Handshaker.processLoop(Handshaker.java:
> > > > > >> > 979)
> > > > > >> >             at
> > > > sun.security.ssl.Handshaker.process_record(Handshaker.
> > > > > >> > java:914)
> > > > > >> >             at sun.security.ssl.SSLSocketImpl.readRecord(
> > > > > >> > SSLSocketImpl.java:1062)
> > > > > >> >             at
> > > > sun.security.ssl.SSLSocketImpl.performInitialHandshake(
> > > > > >> > SSLSocketImpl.java:1375)
> > > > > >> >             at sun.security.ssl.SSLSocketImpl.startHandshake(
> > > > > >> > SSLSocketImpl.java:1403)
> > > > > >> >             at sun.security.ssl.SSLSocketImpl.startHandshake(
> > > > > >> > SSLSocketImpl.java:1387)
> > > > > >> >             at
> > > org.apache.http.conn.ssl.SSLConnectionSocketFactory.
> > > > > >> > createLayeredSocket(SSLConnectionSocketFactory.java:394)
> > > > > >> >             at
> > > org.apache.http.conn.ssl.SSLConnectionSocketFactory.
> > > > > >> > connectSocket(SSLConnectionSocketFactory.java:353)
> > > > > >> >             at
> > > > > org.apache.http.impl.conn.DefaultHttpClientConnectionOpe
> > > > > >> > rator.connect(DefaultHttpClientConnectionOperator.java:134)
> > > > > >> >             at
> > > > > org.apache.http.impl.conn.PoolingHttpClientConnectionMan
> > > > > >> > ager.connect(PoolingHttpClientConnectionManager.java:353)
> > > > > >> >             at org.apache.http.impl.execchain.MainClientExec.
> > > > > >> > establishRoute(MainClientExec.java:380)
> > > > > >> >             at org.apache.http.impl.execchain.MainClientExec.
> > > > > >> > execute(MainClientExec.java:236)
> > > > > >> >             at org.apache.http.impl.execchain.ProtocolExec.
> > > > > >> > execute(ProtocolExec.java:184)
> > > > > >> >             at
> org.apache.http.impl.execchain.RetryExec.execute(
> > > > > >> > RetryExec.java:88)
> > > > > >> >             at org.apache.http.impl.execchain.RedirectExec.
> > > > > >> > execute(RedirectExec.java:110)
> > > > > >> >             at
> > > > > org.apache.http.impl.client.InternalHttpClient.doExecute(
> > > > > >> > InternalHttpClient.java:184)
> > > > > >> >             at
> > > > > org.apache.http.impl.client.CloseableHttpClient.execute(
> > > > > >> > CloseableHttpClient.java:82)
> > > > > >> >             at
> > > > > org.apache.http.impl.client.CloseableHttpClient.execute(
> > > > > >> > CloseableHttpClient.java:107)
> > > > > >> >             at
> > com.gemstone.gemfire.rest.internal.web.controllers.
> > > > > >> >
> > > > > >>
> > > > >
> > > >
> > >
> >
> RestAPIsWithSSLDUnitTest.validateConnection(RestAPIsWithSSLDUnitTest.java:
> > > > > >> > 474)
> > > > > >> >             ... 1 more
> > > > > >> >
> > > > > >> >             Caused by:
> > > > > >> >             java.io.EOFException: SSL peer shut down
> incorrectly
> > > > > >> >                 at
> > > > > >> sun.security.ssl.InputRecord.read(InputRecord.java:505)
> > > > > >> >                 at sun.security.ssl.SSLSocketImpl.readRecord(
> > > > > >> > SSLSocketImpl.java:973)
> > > > > >> >                 ... 26 more
> > > > > >> >
> > > > > >> > java.lang.NoSuchFieldError: INSTANCE
> > > > > >> >
> > > > > >> > at
> > > > > >> >
> > > > > >>
> > > > >
> > > >
> > >
> >
> org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<init>(DefaultHttpRequestWriterFactory.java:52)
> > > > > >> > at
> > > > > >> >
> > > > > >>
> > > > >
> > > >
> > >
> >
> org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<init>(DefaultHttpRequestWriterFactory.java:56)
> > > > > >> > at
> > > > > >> >
> > > > > >>
> > > > >
> > > >
> > >
> >
> org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<clinit>(DefaultHttpRequestWriterFactory.java:46)
> > > > > >> > at
> > > > > >> >
> > > > > >>
> > > > >
> > > >
> > >
> >
> org.apache.http.impl.conn.ManagedHttpClientConnectionFactory.<init>(ManagedHttpClientConnectionFactory.java:72)
> > > > > >> > at
> > > > > >> >
> > > > > >>
> > > > >
> > > >
> > >
> >
> org.apache.http.impl.conn.ManagedHttpClientConnectionFactory.<init>(ManagedHttpClientConnectionFactory.java:84)
> > > > > >> > at
> > > > > >> >
> > > > > >>
> > > > >
> > > >
> > >
> >
> org.apache.http.impl.conn.ManagedHttpClientConnectionFactory.<clinit>(ManagedHttpClientConnectionFactory.java:59)
> > > > > >> > at
> > > > > >> >
> > > > > >>
> > > > >
> > > >
> > >
> >
> org.apache.http.impl.conn.PoolingHttpClientConnectionManager$InternalConnectionFactory.<init>(PoolingHttpClientConnectionManager.java:487)
> > > > > >> > at
> > > > > >> >
> > > > > >>
> > > > >
> > > >
> > >
> >
> org.apache.http.impl.conn.PoolingHttpClientConnectionManager.<init>(PoolingHttpClientConnectionManager.java:147)
> > > > > >> > at
> > > > > >> >
> > > > > >>
> > > > >
> > > >
> > >
> >
> org.apache.http.impl.conn.PoolingHttpClientConnectionManager.<init>(PoolingHttpClientConnectionManager.java:136)
> > > > > >> > at
> > > > > >> >
> > > > > >>
> > > > >
> > > >
> > >
> >
> org.apache.http.impl.conn.PoolingHttpClientConnectionManager.<init>(PoolingHttpClientConnectionManager.java:112)
> > > > > >> > at
> > > > > >> >
> > > > > >>
> > > > >
> > > >
> > >
> >
> org.apache.http.impl.client.HttpClientBuilder.build(HttpClientBuilder.java:726)
> > > > > >> > at
> > > > > >> >
> > > > > >>
> > > > >
> > > >
> > >
> >
> com.gemstone.gemfire.rest.internal.web.controllers.RestAPIsWithSSLDUnitTest.getSSLBasedHTTPClient(RestAPIsWithSSLDUnitTest.java:458)
> > > > > >> > at
> > > > > >> >
> > > > > >>
> > > > >
> > > >
> > >
> >
> com.gemstone.gemfire.rest.internal.web.controllers.RestAPIsWithSSLDUnitTest.validateConnection(RestAPIsWithSSLDUnitTest.java:473)
> > > > > >> > at
> > > > > >> >
> > > > > >>
> > > > >
> > > >
> > >
> >
> com.gemstone.gemfire.rest.internal.web.controllers.RestAPIsWithSSLDUnitTest.testSSLWithoutKeyStoreType(RestAPIsWithSSLDUnitTest.java:522)
> > > > > >> > 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:497)
> > > > > >> > at junit.framework.TestCase.runTest(TestCase.java:176)
> > > > > >> > at junit.framework.TestCase.runBare(TestCase.java:141)
> > > > > >> > at junit.framework.TestResult$1.protect(TestResult.java:122)
> > > > > >> > at
> junit.framework.TestResult.runProtected(TestResult.java:142)
> > > > > >> > at junit.framework.TestResult.run(TestResult.java:125)
> > > > > >> > at junit.framework.TestCase.run(TestCase.java:129)
> > > > > >> > at junit.framework.TestSuite.runTest(TestSuite.java:252)
> > > > > >> > at junit.framework.TestSuite.run(TestSuite.java:247)
> > > > > >> > at
> > > > > >> >
> > > > > >>
> > > > >
> > > >
> > >
> >
> org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:86)
> > > > > >> > at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
> > > > > >> > at
> > > > > >> >
> > > > > >>
> > > > >
> > > >
> > >
> >
> com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
> > > > > >> > at
> > > > > >> >
> > > > > >>
> > > > >
> > > >
> > >
> >
> com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:234)
> > > > > >> > at
> > > > > >>
> > > >
> com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:74)
> > > > > >> > 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:497)
> > > > > >> > at
> > > > >
> com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
> > > > > >> >
> > > > > >> >
> > > > > >>
> > > > > >
> > > > > >
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > -John
> > > > 503-504-8657
> > > > john.blum10101 (skype)
> > > >
> > >
> >
> >
> >
> > --
> > -John
> > 503-504-8657
> > john.blum10101 (skype)
> >
>

Re: RestAPIsWithSSLDUnitTest fails

Posted by Dan Smith <ds...@pivotal.io>.
First off, your intellij classpath and gradle classpath are pretty much the
same. The one exception, I think, is that the test target for
geode-assembly sets up a different runtime classpath to point at the
bundled product. I didn't set that up, but I think maybe the idea is that
we needed some tests of the actual bundled binary? Take a look at
geode-assembly/build.gradle. If someone knows how to fix the setup that so
we still have that test coverage of the bundled product and the tests do
work in intellij, please fix it! All of the rest of the tests should be
using exactly the same environment on the command line and in the IDE.

I'm not sure if this is even your problem Kirk, did you try running from
the command line?

Second, I don't see anything wrong with having transitive test
dependencies. It's a huge pain to track down the transitive dependencies
and keep them up to date manually. They aren't hurting you!

Regarding John's struggles with dependencies of geode, what we really need
to do is clean up *product* dependencies of geode core - we're pulling in
all sorts of stuff for gfsh, pulse, the REST API, etc. GEODE-818 is all
about cleaning that up. I was hoping to take up GEODE-1072 (remove HDFS
code) when I get a chance. If you want to clean up the dependencies please
chip in and take on some of those subtasks, the sooner the better!

-Dan

On Wed, Mar 23, 2016 at 11:34 AM, John Blum <jb...@pivotal.io> wrote:

> If you created the IntelliJ IDEA project from the Gradle build, then it is
> Geode's Gradle build scripts that are specifying the dependencies and thus
> the Gradle build scripts are wrong.  In Maven, you can declare a
> dependencyManagement section (along with exclusions) to manage transitive
> dependencies.  I don't recall what the equivalent is in Gradle for
> dependencyManagement.
>
> On Wed, Mar 23, 2016 at 11:24 AM, Kirk Lund <kl...@pivotal.io> wrote:
>
> > I think that maybe we don't want to continue with transitive dependencies
> > enabled for testing. If we turn that off then we go back to having to
> > specify all versions even runtime test dependencies right? Are there any
> > valid arguments for keeping transitive dependencies enabled for testing?
> >
> > Also, why would my intellij dependencies be different from gradle
> > command-line? The one was built from the *.gradle files in geode. If
> > intellij's gradle picks up multiple versions of libraries, then I think
> > that still means something isn't right in our *.gradle files.
> >
> > Not that I want to see test failures... BUT, I want to spend my time
> > diagnosing test failures instead of dealing with gradle and dependency
> > versioning and wondering why intellij is picking up 2 versions of jna, 3
> > versions of apache http, etc.
> >
> > -Kirk
> >
> >
> > On Wed, Mar 23, 2016 at 11:04 AM, John Blum <jb...@pivotal.io> wrote:
> >
> > > In a nutshell, you want the dependencies and all the transitive
> > > dependencies versions to agree, otherwise conflicts like what Kirk
> > > experienced, as well as what I experienced while integrating Apache
> Geode
> > > support into Spring Session, will occur, and users will have problems
> > using
> > > Geode in different contexts (e.g. App Server containers for Session
> > > management)
> > >
> > > Letting transitive dependencies of Geode (i.e. sub-projects) dictate
> > > dependency versions is NOT right and recipe for disaster.  Also, you
> are
> > > not testing the dependencies, you are testing Geode with the
> > dependencies.
> > >
> > >
> > > On Wed, Mar 23, 2016 at 10:48 AM, Dan Smith <ds...@pivotal.io> wrote:
> > >
> > > > As far as the multiple versions of httpclient, I only see that
> > dependency
> > > > showing up in the test dependencies. Different sub projects have
> > > different
> > > > test dependencies, which are transitively pulling in different
> versions
> > > of
> > > > this jar.
> > > >
> > > > We can certainly force a version across all of the different projects
> > in
> > > > dependency-resolution.gradle. But I think given these are different
> > > > projects with different test dependencies we should just let them
> pull
> > in
> > > > whatever test dependencies they need.
> > > >
> > > >
> > > > > ./gradlew geode-core:dependencyInsight --dependency httpclient
> > > > --configuration testRuntime
> > > > Picked up JAVA_TOOL_OPTIONS:
> > > > :geode-core:dependencyInsight
> > > > org.apache.httpcomponents:httpclient:4.2.5
> > > > \--- org.apache.hadoop:hadoop-auth:2.4.1
> > > >      \--- testRuntime
> > > >
> > > >
> > > >
> > > > > ./gradlew geode-pulse:dependencyInsight --dependency httpclient
> > > > --configuration testRuntime
> > > > Picked up JAVA_TOOL_OPTIONS:
> > > > :geode-pulse:dependencyInsight
> > > > org.apache.httpcomponents:httpclient:4.5.1
> > > > +--- org.seleniumhq.selenium:selenium-api:2.52.0
> > > > |    +--- testRuntime
> > > > |    \--- org.seleniumhq.selenium:selenium-remote-driver:2.52.0
> > > > |         +--- testRuntime
> > > > |         +--- org.seleniumhq.selenium:selenium-firefox-driver:2.52.0
> > > > |         |    \--- testRuntime
> > > > |         \--- org.seleniumhq.selenium:selenium-support:2.52.0
> > > > |              \--- testRuntime
> > > > \--- org.seleniumhq.selenium:selenium-remote-driver:2.52.0 (*)
> > > >
> > > >
> > > >
> > > > On Wed, Mar 23, 2016 at 10:27 AM, Dan Smith <ds...@pivotal.io>
> wrote:
> > > >
> > > > > The tests in that geode-assembly project are supposed to run on the
> > > > binary
> > > > > assembly of the project, so I think the classpath when run from the
> > > > command
> > > > > line might be a bit different than what you get in intellij. I
> think
> > > the
> > > > > command line classpath just points at geode-dependencies.jar.
> > > > >
> > > > > -Dan
> > > > >
> > > > >
> > > > > On Wed, Mar 23, 2016 at 10:01 AM, Kirk Lund <kl...@pivotal.io>
> > wrote:
> > > > >
> > > > >> So as I look at dependencies, I see that our gradle build is
> > > ultimately
> > > > >> depending on multiple versions of the same libraries. Can't we
> clean
> > > > this
> > > > >> up?
> > > > >>
> > > > >> org.apache.httpcomponents:httpclient:4.2.5
> > > > >> org.apache.httpcomponents:httpclient:4.3.3
> > > > >> org.apache.httpcomponents:httpclient:4.5.1
> > > > >>
> > > > >> I really don't want multiple versions of anything in this project.
> > Are
> > > > we
> > > > >> not using gradle correctly?
> > > > >>
> > > > >> -Kirk
> > > > >>
> > > > >>
> > > > >> On Wed, Mar 23, 2016 at 9:23 AM, Kirk Lund <kl...@pivotal.io>
> > wrote:
> > > > >>
> > > > >> > RestAPIsWithSSLDUnitTest failed in the nightly build. Failure
> > stack
> > > is
> > > > >> > below. I tried running this test by itself in intellij and it
> > fails
> > > > >> with "java.lang.NoSuchFieldError:
> > > > >> > INSTANCE" from "at
> > > > >> >
> > > > >>
> > > >
> > >
> >
> org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<init>(DefaultHttpRequestWriterFactory.java:52)".
> > > > >> > I posted that failure stack below as well.
> > > > >> >
> > > > >> > Any ideas what the NoSuckFieldError is about?
> > > > >> >
> > > > >> > :geode-assembly:distributedTest
> > > > >> >
> > > > >> >
> > > > >>
> > > >
> > >
> >
> com.gemstone.gemfire.rest.internal.web.controllers.RestAPIsWithSSLDUnitTest
> > > > >> > > testMutualAuthentication FAILED
> > > > >> >     java.lang.RuntimeException: unexpected exception
> > > > >> >         at com.gemstone.gemfire.rest.internal.web.controllers.
> > > > >> >
> > > > >>
> > > >
> > >
> >
> RestAPIsWithSSLDUnitTest.validateConnection(RestAPIsWithSSLDUnitTest.java:
> > > > >> > 495)
> > > > >> >         at com.gemstone.gemfire.rest.internal.web.controllers.
> > > > >> > RestAPIsWithSSLDUnitTest.testMutualAuthentication(
> > > > >> > RestAPIsWithSSLDUnitTest.java:648)
> > > > >> >
> > > > >> >         Caused by:
> > > > >> >         javax.net.ssl.SSLHandshakeException: Remote host closed
> > > > >> > connection during handshake
> > > > >> >             at sun.security.ssl.SSLSocketImpl.readRecord(
> > > > >> > SSLSocketImpl.java:992)
> > > > >> >             at sun.security.ssl.SSLSocketImpl.waitForClose(
> > > > >> > SSLSocketImpl.java:1769)
> > > > >> >             at sun.security.ssl.HandshakeOutStream.flush(
> > > > >> > HandshakeOutStream.java:124)
> > > > >> >             at sun.security.ssl.Handshaker.sendChangeCipherSpec(
> > > > >> > Handshaker.java:1083)
> > > > >> >             at sun.security.ssl.ClientHandshaker.
> > > > >> > sendChangeCipherAndFinish(ClientHandshaker.java:1222)
> > > > >> >             at
> sun.security.ssl.ClientHandshaker.serverHelloDone(
> > > > >> > ClientHandshaker.java:1134)
> > > > >> >             at sun.security.ssl.ClientHandshaker.processMessage(
> > > > >> > ClientHandshaker.java:348)
> > > > >> >             at
> > > > sun.security.ssl.Handshaker.processLoop(Handshaker.java:
> > > > >> > 979)
> > > > >> >             at
> > > sun.security.ssl.Handshaker.process_record(Handshaker.
> > > > >> > java:914)
> > > > >> >             at sun.security.ssl.SSLSocketImpl.readRecord(
> > > > >> > SSLSocketImpl.java:1062)
> > > > >> >             at
> > > sun.security.ssl.SSLSocketImpl.performInitialHandshake(
> > > > >> > SSLSocketImpl.java:1375)
> > > > >> >             at sun.security.ssl.SSLSocketImpl.startHandshake(
> > > > >> > SSLSocketImpl.java:1403)
> > > > >> >             at sun.security.ssl.SSLSocketImpl.startHandshake(
> > > > >> > SSLSocketImpl.java:1387)
> > > > >> >             at
> > org.apache.http.conn.ssl.SSLConnectionSocketFactory.
> > > > >> > createLayeredSocket(SSLConnectionSocketFactory.java:394)
> > > > >> >             at
> > org.apache.http.conn.ssl.SSLConnectionSocketFactory.
> > > > >> > connectSocket(SSLConnectionSocketFactory.java:353)
> > > > >> >             at
> > > > org.apache.http.impl.conn.DefaultHttpClientConnectionOpe
> > > > >> > rator.connect(DefaultHttpClientConnectionOperator.java:134)
> > > > >> >             at
> > > > org.apache.http.impl.conn.PoolingHttpClientConnectionMan
> > > > >> > ager.connect(PoolingHttpClientConnectionManager.java:353)
> > > > >> >             at org.apache.http.impl.execchain.MainClientExec.
> > > > >> > establishRoute(MainClientExec.java:380)
> > > > >> >             at org.apache.http.impl.execchain.MainClientExec.
> > > > >> > execute(MainClientExec.java:236)
> > > > >> >             at org.apache.http.impl.execchain.ProtocolExec.
> > > > >> > execute(ProtocolExec.java:184)
> > > > >> >             at org.apache.http.impl.execchain.RetryExec.execute(
> > > > >> > RetryExec.java:88)
> > > > >> >             at org.apache.http.impl.execchain.RedirectExec.
> > > > >> > execute(RedirectExec.java:110)
> > > > >> >             at
> > > > org.apache.http.impl.client.InternalHttpClient.doExecute(
> > > > >> > InternalHttpClient.java:184)
> > > > >> >             at
> > > > org.apache.http.impl.client.CloseableHttpClient.execute(
> > > > >> > CloseableHttpClient.java:82)
> > > > >> >             at
> > > > org.apache.http.impl.client.CloseableHttpClient.execute(
> > > > >> > CloseableHttpClient.java:107)
> > > > >> >             at
> com.gemstone.gemfire.rest.internal.web.controllers.
> > > > >> >
> > > > >>
> > > >
> > >
> >
> RestAPIsWithSSLDUnitTest.validateConnection(RestAPIsWithSSLDUnitTest.java:
> > > > >> > 474)
> > > > >> >             ... 1 more
> > > > >> >
> > > > >> >             Caused by:
> > > > >> >             java.io.EOFException: SSL peer shut down incorrectly
> > > > >> >                 at
> > > > >> sun.security.ssl.InputRecord.read(InputRecord.java:505)
> > > > >> >                 at sun.security.ssl.SSLSocketImpl.readRecord(
> > > > >> > SSLSocketImpl.java:973)
> > > > >> >                 ... 26 more
> > > > >> >
> > > > >> > java.lang.NoSuchFieldError: INSTANCE
> > > > >> >
> > > > >> > at
> > > > >> >
> > > > >>
> > > >
> > >
> >
> org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<init>(DefaultHttpRequestWriterFactory.java:52)
> > > > >> > at
> > > > >> >
> > > > >>
> > > >
> > >
> >
> org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<init>(DefaultHttpRequestWriterFactory.java:56)
> > > > >> > at
> > > > >> >
> > > > >>
> > > >
> > >
> >
> org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<clinit>(DefaultHttpRequestWriterFactory.java:46)
> > > > >> > at
> > > > >> >
> > > > >>
> > > >
> > >
> >
> org.apache.http.impl.conn.ManagedHttpClientConnectionFactory.<init>(ManagedHttpClientConnectionFactory.java:72)
> > > > >> > at
> > > > >> >
> > > > >>
> > > >
> > >
> >
> org.apache.http.impl.conn.ManagedHttpClientConnectionFactory.<init>(ManagedHttpClientConnectionFactory.java:84)
> > > > >> > at
> > > > >> >
> > > > >>
> > > >
> > >
> >
> org.apache.http.impl.conn.ManagedHttpClientConnectionFactory.<clinit>(ManagedHttpClientConnectionFactory.java:59)
> > > > >> > at
> > > > >> >
> > > > >>
> > > >
> > >
> >
> org.apache.http.impl.conn.PoolingHttpClientConnectionManager$InternalConnectionFactory.<init>(PoolingHttpClientConnectionManager.java:487)
> > > > >> > at
> > > > >> >
> > > > >>
> > > >
> > >
> >
> org.apache.http.impl.conn.PoolingHttpClientConnectionManager.<init>(PoolingHttpClientConnectionManager.java:147)
> > > > >> > at
> > > > >> >
> > > > >>
> > > >
> > >
> >
> org.apache.http.impl.conn.PoolingHttpClientConnectionManager.<init>(PoolingHttpClientConnectionManager.java:136)
> > > > >> > at
> > > > >> >
> > > > >>
> > > >
> > >
> >
> org.apache.http.impl.conn.PoolingHttpClientConnectionManager.<init>(PoolingHttpClientConnectionManager.java:112)
> > > > >> > at
> > > > >> >
> > > > >>
> > > >
> > >
> >
> org.apache.http.impl.client.HttpClientBuilder.build(HttpClientBuilder.java:726)
> > > > >> > at
> > > > >> >
> > > > >>
> > > >
> > >
> >
> com.gemstone.gemfire.rest.internal.web.controllers.RestAPIsWithSSLDUnitTest.getSSLBasedHTTPClient(RestAPIsWithSSLDUnitTest.java:458)
> > > > >> > at
> > > > >> >
> > > > >>
> > > >
> > >
> >
> com.gemstone.gemfire.rest.internal.web.controllers.RestAPIsWithSSLDUnitTest.validateConnection(RestAPIsWithSSLDUnitTest.java:473)
> > > > >> > at
> > > > >> >
> > > > >>
> > > >
> > >
> >
> com.gemstone.gemfire.rest.internal.web.controllers.RestAPIsWithSSLDUnitTest.testSSLWithoutKeyStoreType(RestAPIsWithSSLDUnitTest.java:522)
> > > > >> > 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:497)
> > > > >> > at junit.framework.TestCase.runTest(TestCase.java:176)
> > > > >> > at junit.framework.TestCase.runBare(TestCase.java:141)
> > > > >> > at junit.framework.TestResult$1.protect(TestResult.java:122)
> > > > >> > at junit.framework.TestResult.runProtected(TestResult.java:142)
> > > > >> > at junit.framework.TestResult.run(TestResult.java:125)
> > > > >> > at junit.framework.TestCase.run(TestCase.java:129)
> > > > >> > at junit.framework.TestSuite.runTest(TestSuite.java:252)
> > > > >> > at junit.framework.TestSuite.run(TestSuite.java:247)
> > > > >> > at
> > > > >> >
> > > > >>
> > > >
> > >
> >
> org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:86)
> > > > >> > at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
> > > > >> > at
> > > > >> >
> > > > >>
> > > >
> > >
> >
> com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
> > > > >> > at
> > > > >> >
> > > > >>
> > > >
> > >
> >
> com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:234)
> > > > >> > at
> > > > >>
> > > com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:74)
> > > > >> > 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:497)
> > > > >> > at
> > > > com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
> > > > >> >
> > > > >> >
> > > > >>
> > > > >
> > > > >
> > > >
> > >
> > >
> > >
> > > --
> > > -John
> > > 503-504-8657
> > > john.blum10101 (skype)
> > >
> >
>
>
>
> --
> -John
> 503-504-8657
> john.blum10101 (skype)
>

Re: RestAPIsWithSSLDUnitTest fails

Posted by John Blum <jb...@pivotal.io>.
If you created the IntelliJ IDEA project from the Gradle build, then it is
Geode's Gradle build scripts that are specifying the dependencies and thus
the Gradle build scripts are wrong.  In Maven, you can declare a
dependencyManagement section (along with exclusions) to manage transitive
dependencies.  I don't recall what the equivalent is in Gradle for
dependencyManagement.

On Wed, Mar 23, 2016 at 11:24 AM, Kirk Lund <kl...@pivotal.io> wrote:

> I think that maybe we don't want to continue with transitive dependencies
> enabled for testing. If we turn that off then we go back to having to
> specify all versions even runtime test dependencies right? Are there any
> valid arguments for keeping transitive dependencies enabled for testing?
>
> Also, why would my intellij dependencies be different from gradle
> command-line? The one was built from the *.gradle files in geode. If
> intellij's gradle picks up multiple versions of libraries, then I think
> that still means something isn't right in our *.gradle files.
>
> Not that I want to see test failures... BUT, I want to spend my time
> diagnosing test failures instead of dealing with gradle and dependency
> versioning and wondering why intellij is picking up 2 versions of jna, 3
> versions of apache http, etc.
>
> -Kirk
>
>
> On Wed, Mar 23, 2016 at 11:04 AM, John Blum <jb...@pivotal.io> wrote:
>
> > In a nutshell, you want the dependencies and all the transitive
> > dependencies versions to agree, otherwise conflicts like what Kirk
> > experienced, as well as what I experienced while integrating Apache Geode
> > support into Spring Session, will occur, and users will have problems
> using
> > Geode in different contexts (e.g. App Server containers for Session
> > management)
> >
> > Letting transitive dependencies of Geode (i.e. sub-projects) dictate
> > dependency versions is NOT right and recipe for disaster.  Also, you are
> > not testing the dependencies, you are testing Geode with the
> dependencies.
> >
> >
> > On Wed, Mar 23, 2016 at 10:48 AM, Dan Smith <ds...@pivotal.io> wrote:
> >
> > > As far as the multiple versions of httpclient, I only see that
> dependency
> > > showing up in the test dependencies. Different sub projects have
> > different
> > > test dependencies, which are transitively pulling in different versions
> > of
> > > this jar.
> > >
> > > We can certainly force a version across all of the different projects
> in
> > > dependency-resolution.gradle. But I think given these are different
> > > projects with different test dependencies we should just let them pull
> in
> > > whatever test dependencies they need.
> > >
> > >
> > > > ./gradlew geode-core:dependencyInsight --dependency httpclient
> > > --configuration testRuntime
> > > Picked up JAVA_TOOL_OPTIONS:
> > > :geode-core:dependencyInsight
> > > org.apache.httpcomponents:httpclient:4.2.5
> > > \--- org.apache.hadoop:hadoop-auth:2.4.1
> > >      \--- testRuntime
> > >
> > >
> > >
> > > > ./gradlew geode-pulse:dependencyInsight --dependency httpclient
> > > --configuration testRuntime
> > > Picked up JAVA_TOOL_OPTIONS:
> > > :geode-pulse:dependencyInsight
> > > org.apache.httpcomponents:httpclient:4.5.1
> > > +--- org.seleniumhq.selenium:selenium-api:2.52.0
> > > |    +--- testRuntime
> > > |    \--- org.seleniumhq.selenium:selenium-remote-driver:2.52.0
> > > |         +--- testRuntime
> > > |         +--- org.seleniumhq.selenium:selenium-firefox-driver:2.52.0
> > > |         |    \--- testRuntime
> > > |         \--- org.seleniumhq.selenium:selenium-support:2.52.0
> > > |              \--- testRuntime
> > > \--- org.seleniumhq.selenium:selenium-remote-driver:2.52.0 (*)
> > >
> > >
> > >
> > > On Wed, Mar 23, 2016 at 10:27 AM, Dan Smith <ds...@pivotal.io> wrote:
> > >
> > > > The tests in that geode-assembly project are supposed to run on the
> > > binary
> > > > assembly of the project, so I think the classpath when run from the
> > > command
> > > > line might be a bit different than what you get in intellij. I think
> > the
> > > > command line classpath just points at geode-dependencies.jar.
> > > >
> > > > -Dan
> > > >
> > > >
> > > > On Wed, Mar 23, 2016 at 10:01 AM, Kirk Lund <kl...@pivotal.io>
> wrote:
> > > >
> > > >> So as I look at dependencies, I see that our gradle build is
> > ultimately
> > > >> depending on multiple versions of the same libraries. Can't we clean
> > > this
> > > >> up?
> > > >>
> > > >> org.apache.httpcomponents:httpclient:4.2.5
> > > >> org.apache.httpcomponents:httpclient:4.3.3
> > > >> org.apache.httpcomponents:httpclient:4.5.1
> > > >>
> > > >> I really don't want multiple versions of anything in this project.
> Are
> > > we
> > > >> not using gradle correctly?
> > > >>
> > > >> -Kirk
> > > >>
> > > >>
> > > >> On Wed, Mar 23, 2016 at 9:23 AM, Kirk Lund <kl...@pivotal.io>
> wrote:
> > > >>
> > > >> > RestAPIsWithSSLDUnitTest failed in the nightly build. Failure
> stack
> > is
> > > >> > below. I tried running this test by itself in intellij and it
> fails
> > > >> with "java.lang.NoSuchFieldError:
> > > >> > INSTANCE" from "at
> > > >> >
> > > >>
> > >
> >
> org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<init>(DefaultHttpRequestWriterFactory.java:52)".
> > > >> > I posted that failure stack below as well.
> > > >> >
> > > >> > Any ideas what the NoSuckFieldError is about?
> > > >> >
> > > >> > :geode-assembly:distributedTest
> > > >> >
> > > >> >
> > > >>
> > >
> >
> com.gemstone.gemfire.rest.internal.web.controllers.RestAPIsWithSSLDUnitTest
> > > >> > > testMutualAuthentication FAILED
> > > >> >     java.lang.RuntimeException: unexpected exception
> > > >> >         at com.gemstone.gemfire.rest.internal.web.controllers.
> > > >> >
> > > >>
> > >
> >
> RestAPIsWithSSLDUnitTest.validateConnection(RestAPIsWithSSLDUnitTest.java:
> > > >> > 495)
> > > >> >         at com.gemstone.gemfire.rest.internal.web.controllers.
> > > >> > RestAPIsWithSSLDUnitTest.testMutualAuthentication(
> > > >> > RestAPIsWithSSLDUnitTest.java:648)
> > > >> >
> > > >> >         Caused by:
> > > >> >         javax.net.ssl.SSLHandshakeException: Remote host closed
> > > >> > connection during handshake
> > > >> >             at sun.security.ssl.SSLSocketImpl.readRecord(
> > > >> > SSLSocketImpl.java:992)
> > > >> >             at sun.security.ssl.SSLSocketImpl.waitForClose(
> > > >> > SSLSocketImpl.java:1769)
> > > >> >             at sun.security.ssl.HandshakeOutStream.flush(
> > > >> > HandshakeOutStream.java:124)
> > > >> >             at sun.security.ssl.Handshaker.sendChangeCipherSpec(
> > > >> > Handshaker.java:1083)
> > > >> >             at sun.security.ssl.ClientHandshaker.
> > > >> > sendChangeCipherAndFinish(ClientHandshaker.java:1222)
> > > >> >             at sun.security.ssl.ClientHandshaker.serverHelloDone(
> > > >> > ClientHandshaker.java:1134)
> > > >> >             at sun.security.ssl.ClientHandshaker.processMessage(
> > > >> > ClientHandshaker.java:348)
> > > >> >             at
> > > sun.security.ssl.Handshaker.processLoop(Handshaker.java:
> > > >> > 979)
> > > >> >             at
> > sun.security.ssl.Handshaker.process_record(Handshaker.
> > > >> > java:914)
> > > >> >             at sun.security.ssl.SSLSocketImpl.readRecord(
> > > >> > SSLSocketImpl.java:1062)
> > > >> >             at
> > sun.security.ssl.SSLSocketImpl.performInitialHandshake(
> > > >> > SSLSocketImpl.java:1375)
> > > >> >             at sun.security.ssl.SSLSocketImpl.startHandshake(
> > > >> > SSLSocketImpl.java:1403)
> > > >> >             at sun.security.ssl.SSLSocketImpl.startHandshake(
> > > >> > SSLSocketImpl.java:1387)
> > > >> >             at
> org.apache.http.conn.ssl.SSLConnectionSocketFactory.
> > > >> > createLayeredSocket(SSLConnectionSocketFactory.java:394)
> > > >> >             at
> org.apache.http.conn.ssl.SSLConnectionSocketFactory.
> > > >> > connectSocket(SSLConnectionSocketFactory.java:353)
> > > >> >             at
> > > org.apache.http.impl.conn.DefaultHttpClientConnectionOpe
> > > >> > rator.connect(DefaultHttpClientConnectionOperator.java:134)
> > > >> >             at
> > > org.apache.http.impl.conn.PoolingHttpClientConnectionMan
> > > >> > ager.connect(PoolingHttpClientConnectionManager.java:353)
> > > >> >             at org.apache.http.impl.execchain.MainClientExec.
> > > >> > establishRoute(MainClientExec.java:380)
> > > >> >             at org.apache.http.impl.execchain.MainClientExec.
> > > >> > execute(MainClientExec.java:236)
> > > >> >             at org.apache.http.impl.execchain.ProtocolExec.
> > > >> > execute(ProtocolExec.java:184)
> > > >> >             at org.apache.http.impl.execchain.RetryExec.execute(
> > > >> > RetryExec.java:88)
> > > >> >             at org.apache.http.impl.execchain.RedirectExec.
> > > >> > execute(RedirectExec.java:110)
> > > >> >             at
> > > org.apache.http.impl.client.InternalHttpClient.doExecute(
> > > >> > InternalHttpClient.java:184)
> > > >> >             at
> > > org.apache.http.impl.client.CloseableHttpClient.execute(
> > > >> > CloseableHttpClient.java:82)
> > > >> >             at
> > > org.apache.http.impl.client.CloseableHttpClient.execute(
> > > >> > CloseableHttpClient.java:107)
> > > >> >             at com.gemstone.gemfire.rest.internal.web.controllers.
> > > >> >
> > > >>
> > >
> >
> RestAPIsWithSSLDUnitTest.validateConnection(RestAPIsWithSSLDUnitTest.java:
> > > >> > 474)
> > > >> >             ... 1 more
> > > >> >
> > > >> >             Caused by:
> > > >> >             java.io.EOFException: SSL peer shut down incorrectly
> > > >> >                 at
> > > >> sun.security.ssl.InputRecord.read(InputRecord.java:505)
> > > >> >                 at sun.security.ssl.SSLSocketImpl.readRecord(
> > > >> > SSLSocketImpl.java:973)
> > > >> >                 ... 26 more
> > > >> >
> > > >> > java.lang.NoSuchFieldError: INSTANCE
> > > >> >
> > > >> > at
> > > >> >
> > > >>
> > >
> >
> org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<init>(DefaultHttpRequestWriterFactory.java:52)
> > > >> > at
> > > >> >
> > > >>
> > >
> >
> org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<init>(DefaultHttpRequestWriterFactory.java:56)
> > > >> > at
> > > >> >
> > > >>
> > >
> >
> org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<clinit>(DefaultHttpRequestWriterFactory.java:46)
> > > >> > at
> > > >> >
> > > >>
> > >
> >
> org.apache.http.impl.conn.ManagedHttpClientConnectionFactory.<init>(ManagedHttpClientConnectionFactory.java:72)
> > > >> > at
> > > >> >
> > > >>
> > >
> >
> org.apache.http.impl.conn.ManagedHttpClientConnectionFactory.<init>(ManagedHttpClientConnectionFactory.java:84)
> > > >> > at
> > > >> >
> > > >>
> > >
> >
> org.apache.http.impl.conn.ManagedHttpClientConnectionFactory.<clinit>(ManagedHttpClientConnectionFactory.java:59)
> > > >> > at
> > > >> >
> > > >>
> > >
> >
> org.apache.http.impl.conn.PoolingHttpClientConnectionManager$InternalConnectionFactory.<init>(PoolingHttpClientConnectionManager.java:487)
> > > >> > at
> > > >> >
> > > >>
> > >
> >
> org.apache.http.impl.conn.PoolingHttpClientConnectionManager.<init>(PoolingHttpClientConnectionManager.java:147)
> > > >> > at
> > > >> >
> > > >>
> > >
> >
> org.apache.http.impl.conn.PoolingHttpClientConnectionManager.<init>(PoolingHttpClientConnectionManager.java:136)
> > > >> > at
> > > >> >
> > > >>
> > >
> >
> org.apache.http.impl.conn.PoolingHttpClientConnectionManager.<init>(PoolingHttpClientConnectionManager.java:112)
> > > >> > at
> > > >> >
> > > >>
> > >
> >
> org.apache.http.impl.client.HttpClientBuilder.build(HttpClientBuilder.java:726)
> > > >> > at
> > > >> >
> > > >>
> > >
> >
> com.gemstone.gemfire.rest.internal.web.controllers.RestAPIsWithSSLDUnitTest.getSSLBasedHTTPClient(RestAPIsWithSSLDUnitTest.java:458)
> > > >> > at
> > > >> >
> > > >>
> > >
> >
> com.gemstone.gemfire.rest.internal.web.controllers.RestAPIsWithSSLDUnitTest.validateConnection(RestAPIsWithSSLDUnitTest.java:473)
> > > >> > at
> > > >> >
> > > >>
> > >
> >
> com.gemstone.gemfire.rest.internal.web.controllers.RestAPIsWithSSLDUnitTest.testSSLWithoutKeyStoreType(RestAPIsWithSSLDUnitTest.java:522)
> > > >> > 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:497)
> > > >> > at junit.framework.TestCase.runTest(TestCase.java:176)
> > > >> > at junit.framework.TestCase.runBare(TestCase.java:141)
> > > >> > at junit.framework.TestResult$1.protect(TestResult.java:122)
> > > >> > at junit.framework.TestResult.runProtected(TestResult.java:142)
> > > >> > at junit.framework.TestResult.run(TestResult.java:125)
> > > >> > at junit.framework.TestCase.run(TestCase.java:129)
> > > >> > at junit.framework.TestSuite.runTest(TestSuite.java:252)
> > > >> > at junit.framework.TestSuite.run(TestSuite.java:247)
> > > >> > at
> > > >> >
> > > >>
> > >
> >
> org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:86)
> > > >> > at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
> > > >> > at
> > > >> >
> > > >>
> > >
> >
> com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
> > > >> > at
> > > >> >
> > > >>
> > >
> >
> com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:234)
> > > >> > at
> > > >>
> > com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:74)
> > > >> > 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:497)
> > > >> > at
> > > com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
> > > >> >
> > > >> >
> > > >>
> > > >
> > > >
> > >
> >
> >
> >
> > --
> > -John
> > 503-504-8657
> > john.blum10101 (skype)
> >
>



-- 
-John
503-504-8657
john.blum10101 (skype)

Re: RestAPIsWithSSLDUnitTest fails

Posted by Kirk Lund <kl...@pivotal.io>.
I think that maybe we don't want to continue with transitive dependencies
enabled for testing. If we turn that off then we go back to having to
specify all versions even runtime test dependencies right? Are there any
valid arguments for keeping transitive dependencies enabled for testing?

Also, why would my intellij dependencies be different from gradle
command-line? The one was built from the *.gradle files in geode. If
intellij's gradle picks up multiple versions of libraries, then I think
that still means something isn't right in our *.gradle files.

Not that I want to see test failures... BUT, I want to spend my time
diagnosing test failures instead of dealing with gradle and dependency
versioning and wondering why intellij is picking up 2 versions of jna, 3
versions of apache http, etc.

-Kirk


On Wed, Mar 23, 2016 at 11:04 AM, John Blum <jb...@pivotal.io> wrote:

> In a nutshell, you want the dependencies and all the transitive
> dependencies versions to agree, otherwise conflicts like what Kirk
> experienced, as well as what I experienced while integrating Apache Geode
> support into Spring Session, will occur, and users will have problems using
> Geode in different contexts (e.g. App Server containers for Session
> management)
>
> Letting transitive dependencies of Geode (i.e. sub-projects) dictate
> dependency versions is NOT right and recipe for disaster.  Also, you are
> not testing the dependencies, you are testing Geode with the dependencies.
>
>
> On Wed, Mar 23, 2016 at 10:48 AM, Dan Smith <ds...@pivotal.io> wrote:
>
> > As far as the multiple versions of httpclient, I only see that dependency
> > showing up in the test dependencies. Different sub projects have
> different
> > test dependencies, which are transitively pulling in different versions
> of
> > this jar.
> >
> > We can certainly force a version across all of the different projects in
> > dependency-resolution.gradle. But I think given these are different
> > projects with different test dependencies we should just let them pull in
> > whatever test dependencies they need.
> >
> >
> > > ./gradlew geode-core:dependencyInsight --dependency httpclient
> > --configuration testRuntime
> > Picked up JAVA_TOOL_OPTIONS:
> > :geode-core:dependencyInsight
> > org.apache.httpcomponents:httpclient:4.2.5
> > \--- org.apache.hadoop:hadoop-auth:2.4.1
> >      \--- testRuntime
> >
> >
> >
> > > ./gradlew geode-pulse:dependencyInsight --dependency httpclient
> > --configuration testRuntime
> > Picked up JAVA_TOOL_OPTIONS:
> > :geode-pulse:dependencyInsight
> > org.apache.httpcomponents:httpclient:4.5.1
> > +--- org.seleniumhq.selenium:selenium-api:2.52.0
> > |    +--- testRuntime
> > |    \--- org.seleniumhq.selenium:selenium-remote-driver:2.52.0
> > |         +--- testRuntime
> > |         +--- org.seleniumhq.selenium:selenium-firefox-driver:2.52.0
> > |         |    \--- testRuntime
> > |         \--- org.seleniumhq.selenium:selenium-support:2.52.0
> > |              \--- testRuntime
> > \--- org.seleniumhq.selenium:selenium-remote-driver:2.52.0 (*)
> >
> >
> >
> > On Wed, Mar 23, 2016 at 10:27 AM, Dan Smith <ds...@pivotal.io> wrote:
> >
> > > The tests in that geode-assembly project are supposed to run on the
> > binary
> > > assembly of the project, so I think the classpath when run from the
> > command
> > > line might be a bit different than what you get in intellij. I think
> the
> > > command line classpath just points at geode-dependencies.jar.
> > >
> > > -Dan
> > >
> > >
> > > On Wed, Mar 23, 2016 at 10:01 AM, Kirk Lund <kl...@pivotal.io> wrote:
> > >
> > >> So as I look at dependencies, I see that our gradle build is
> ultimately
> > >> depending on multiple versions of the same libraries. Can't we clean
> > this
> > >> up?
> > >>
> > >> org.apache.httpcomponents:httpclient:4.2.5
> > >> org.apache.httpcomponents:httpclient:4.3.3
> > >> org.apache.httpcomponents:httpclient:4.5.1
> > >>
> > >> I really don't want multiple versions of anything in this project. Are
> > we
> > >> not using gradle correctly?
> > >>
> > >> -Kirk
> > >>
> > >>
> > >> On Wed, Mar 23, 2016 at 9:23 AM, Kirk Lund <kl...@pivotal.io> wrote:
> > >>
> > >> > RestAPIsWithSSLDUnitTest failed in the nightly build. Failure stack
> is
> > >> > below. I tried running this test by itself in intellij and it fails
> > >> with "java.lang.NoSuchFieldError:
> > >> > INSTANCE" from "at
> > >> >
> > >>
> >
> org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<init>(DefaultHttpRequestWriterFactory.java:52)".
> > >> > I posted that failure stack below as well.
> > >> >
> > >> > Any ideas what the NoSuckFieldError is about?
> > >> >
> > >> > :geode-assembly:distributedTest
> > >> >
> > >> >
> > >>
> >
> com.gemstone.gemfire.rest.internal.web.controllers.RestAPIsWithSSLDUnitTest
> > >> > > testMutualAuthentication FAILED
> > >> >     java.lang.RuntimeException: unexpected exception
> > >> >         at com.gemstone.gemfire.rest.internal.web.controllers.
> > >> >
> > >>
> >
> RestAPIsWithSSLDUnitTest.validateConnection(RestAPIsWithSSLDUnitTest.java:
> > >> > 495)
> > >> >         at com.gemstone.gemfire.rest.internal.web.controllers.
> > >> > RestAPIsWithSSLDUnitTest.testMutualAuthentication(
> > >> > RestAPIsWithSSLDUnitTest.java:648)
> > >> >
> > >> >         Caused by:
> > >> >         javax.net.ssl.SSLHandshakeException: Remote host closed
> > >> > connection during handshake
> > >> >             at sun.security.ssl.SSLSocketImpl.readRecord(
> > >> > SSLSocketImpl.java:992)
> > >> >             at sun.security.ssl.SSLSocketImpl.waitForClose(
> > >> > SSLSocketImpl.java:1769)
> > >> >             at sun.security.ssl.HandshakeOutStream.flush(
> > >> > HandshakeOutStream.java:124)
> > >> >             at sun.security.ssl.Handshaker.sendChangeCipherSpec(
> > >> > Handshaker.java:1083)
> > >> >             at sun.security.ssl.ClientHandshaker.
> > >> > sendChangeCipherAndFinish(ClientHandshaker.java:1222)
> > >> >             at sun.security.ssl.ClientHandshaker.serverHelloDone(
> > >> > ClientHandshaker.java:1134)
> > >> >             at sun.security.ssl.ClientHandshaker.processMessage(
> > >> > ClientHandshaker.java:348)
> > >> >             at
> > sun.security.ssl.Handshaker.processLoop(Handshaker.java:
> > >> > 979)
> > >> >             at
> sun.security.ssl.Handshaker.process_record(Handshaker.
> > >> > java:914)
> > >> >             at sun.security.ssl.SSLSocketImpl.readRecord(
> > >> > SSLSocketImpl.java:1062)
> > >> >             at
> sun.security.ssl.SSLSocketImpl.performInitialHandshake(
> > >> > SSLSocketImpl.java:1375)
> > >> >             at sun.security.ssl.SSLSocketImpl.startHandshake(
> > >> > SSLSocketImpl.java:1403)
> > >> >             at sun.security.ssl.SSLSocketImpl.startHandshake(
> > >> > SSLSocketImpl.java:1387)
> > >> >             at org.apache.http.conn.ssl.SSLConnectionSocketFactory.
> > >> > createLayeredSocket(SSLConnectionSocketFactory.java:394)
> > >> >             at org.apache.http.conn.ssl.SSLConnectionSocketFactory.
> > >> > connectSocket(SSLConnectionSocketFactory.java:353)
> > >> >             at
> > org.apache.http.impl.conn.DefaultHttpClientConnectionOpe
> > >> > rator.connect(DefaultHttpClientConnectionOperator.java:134)
> > >> >             at
> > org.apache.http.impl.conn.PoolingHttpClientConnectionMan
> > >> > ager.connect(PoolingHttpClientConnectionManager.java:353)
> > >> >             at org.apache.http.impl.execchain.MainClientExec.
> > >> > establishRoute(MainClientExec.java:380)
> > >> >             at org.apache.http.impl.execchain.MainClientExec.
> > >> > execute(MainClientExec.java:236)
> > >> >             at org.apache.http.impl.execchain.ProtocolExec.
> > >> > execute(ProtocolExec.java:184)
> > >> >             at org.apache.http.impl.execchain.RetryExec.execute(
> > >> > RetryExec.java:88)
> > >> >             at org.apache.http.impl.execchain.RedirectExec.
> > >> > execute(RedirectExec.java:110)
> > >> >             at
> > org.apache.http.impl.client.InternalHttpClient.doExecute(
> > >> > InternalHttpClient.java:184)
> > >> >             at
> > org.apache.http.impl.client.CloseableHttpClient.execute(
> > >> > CloseableHttpClient.java:82)
> > >> >             at
> > org.apache.http.impl.client.CloseableHttpClient.execute(
> > >> > CloseableHttpClient.java:107)
> > >> >             at com.gemstone.gemfire.rest.internal.web.controllers.
> > >> >
> > >>
> >
> RestAPIsWithSSLDUnitTest.validateConnection(RestAPIsWithSSLDUnitTest.java:
> > >> > 474)
> > >> >             ... 1 more
> > >> >
> > >> >             Caused by:
> > >> >             java.io.EOFException: SSL peer shut down incorrectly
> > >> >                 at
> > >> sun.security.ssl.InputRecord.read(InputRecord.java:505)
> > >> >                 at sun.security.ssl.SSLSocketImpl.readRecord(
> > >> > SSLSocketImpl.java:973)
> > >> >                 ... 26 more
> > >> >
> > >> > java.lang.NoSuchFieldError: INSTANCE
> > >> >
> > >> > at
> > >> >
> > >>
> >
> org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<init>(DefaultHttpRequestWriterFactory.java:52)
> > >> > at
> > >> >
> > >>
> >
> org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<init>(DefaultHttpRequestWriterFactory.java:56)
> > >> > at
> > >> >
> > >>
> >
> org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<clinit>(DefaultHttpRequestWriterFactory.java:46)
> > >> > at
> > >> >
> > >>
> >
> org.apache.http.impl.conn.ManagedHttpClientConnectionFactory.<init>(ManagedHttpClientConnectionFactory.java:72)
> > >> > at
> > >> >
> > >>
> >
> org.apache.http.impl.conn.ManagedHttpClientConnectionFactory.<init>(ManagedHttpClientConnectionFactory.java:84)
> > >> > at
> > >> >
> > >>
> >
> org.apache.http.impl.conn.ManagedHttpClientConnectionFactory.<clinit>(ManagedHttpClientConnectionFactory.java:59)
> > >> > at
> > >> >
> > >>
> >
> org.apache.http.impl.conn.PoolingHttpClientConnectionManager$InternalConnectionFactory.<init>(PoolingHttpClientConnectionManager.java:487)
> > >> > at
> > >> >
> > >>
> >
> org.apache.http.impl.conn.PoolingHttpClientConnectionManager.<init>(PoolingHttpClientConnectionManager.java:147)
> > >> > at
> > >> >
> > >>
> >
> org.apache.http.impl.conn.PoolingHttpClientConnectionManager.<init>(PoolingHttpClientConnectionManager.java:136)
> > >> > at
> > >> >
> > >>
> >
> org.apache.http.impl.conn.PoolingHttpClientConnectionManager.<init>(PoolingHttpClientConnectionManager.java:112)
> > >> > at
> > >> >
> > >>
> >
> org.apache.http.impl.client.HttpClientBuilder.build(HttpClientBuilder.java:726)
> > >> > at
> > >> >
> > >>
> >
> com.gemstone.gemfire.rest.internal.web.controllers.RestAPIsWithSSLDUnitTest.getSSLBasedHTTPClient(RestAPIsWithSSLDUnitTest.java:458)
> > >> > at
> > >> >
> > >>
> >
> com.gemstone.gemfire.rest.internal.web.controllers.RestAPIsWithSSLDUnitTest.validateConnection(RestAPIsWithSSLDUnitTest.java:473)
> > >> > at
> > >> >
> > >>
> >
> com.gemstone.gemfire.rest.internal.web.controllers.RestAPIsWithSSLDUnitTest.testSSLWithoutKeyStoreType(RestAPIsWithSSLDUnitTest.java:522)
> > >> > 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:497)
> > >> > at junit.framework.TestCase.runTest(TestCase.java:176)
> > >> > at junit.framework.TestCase.runBare(TestCase.java:141)
> > >> > at junit.framework.TestResult$1.protect(TestResult.java:122)
> > >> > at junit.framework.TestResult.runProtected(TestResult.java:142)
> > >> > at junit.framework.TestResult.run(TestResult.java:125)
> > >> > at junit.framework.TestCase.run(TestCase.java:129)
> > >> > at junit.framework.TestSuite.runTest(TestSuite.java:252)
> > >> > at junit.framework.TestSuite.run(TestSuite.java:247)
> > >> > at
> > >> >
> > >>
> >
> org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:86)
> > >> > at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
> > >> > at
> > >> >
> > >>
> >
> com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
> > >> > at
> > >> >
> > >>
> >
> com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:234)
> > >> > at
> > >>
> com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:74)
> > >> > 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:497)
> > >> > at
> > com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
> > >> >
> > >> >
> > >>
> > >
> > >
> >
>
>
>
> --
> -John
> 503-504-8657
> john.blum10101 (skype)
>

Re: RestAPIsWithSSLDUnitTest fails

Posted by John Blum <jb...@pivotal.io>.
In a nutshell, you want the dependencies and all the transitive
dependencies versions to agree, otherwise conflicts like what Kirk
experienced, as well as what I experienced while integrating Apache Geode
support into Spring Session, will occur, and users will have problems using
Geode in different contexts (e.g. App Server containers for Session
management)

Letting transitive dependencies of Geode (i.e. sub-projects) dictate
dependency versions is NOT right and recipe for disaster.  Also, you are
not testing the dependencies, you are testing Geode with the dependencies.


On Wed, Mar 23, 2016 at 10:48 AM, Dan Smith <ds...@pivotal.io> wrote:

> As far as the multiple versions of httpclient, I only see that dependency
> showing up in the test dependencies. Different sub projects have different
> test dependencies, which are transitively pulling in different versions of
> this jar.
>
> We can certainly force a version across all of the different projects in
> dependency-resolution.gradle. But I think given these are different
> projects with different test dependencies we should just let them pull in
> whatever test dependencies they need.
>
>
> > ./gradlew geode-core:dependencyInsight --dependency httpclient
> --configuration testRuntime
> Picked up JAVA_TOOL_OPTIONS:
> :geode-core:dependencyInsight
> org.apache.httpcomponents:httpclient:4.2.5
> \--- org.apache.hadoop:hadoop-auth:2.4.1
>      \--- testRuntime
>
>
>
> > ./gradlew geode-pulse:dependencyInsight --dependency httpclient
> --configuration testRuntime
> Picked up JAVA_TOOL_OPTIONS:
> :geode-pulse:dependencyInsight
> org.apache.httpcomponents:httpclient:4.5.1
> +--- org.seleniumhq.selenium:selenium-api:2.52.0
> |    +--- testRuntime
> |    \--- org.seleniumhq.selenium:selenium-remote-driver:2.52.0
> |         +--- testRuntime
> |         +--- org.seleniumhq.selenium:selenium-firefox-driver:2.52.0
> |         |    \--- testRuntime
> |         \--- org.seleniumhq.selenium:selenium-support:2.52.0
> |              \--- testRuntime
> \--- org.seleniumhq.selenium:selenium-remote-driver:2.52.0 (*)
>
>
>
> On Wed, Mar 23, 2016 at 10:27 AM, Dan Smith <ds...@pivotal.io> wrote:
>
> > The tests in that geode-assembly project are supposed to run on the
> binary
> > assembly of the project, so I think the classpath when run from the
> command
> > line might be a bit different than what you get in intellij. I think the
> > command line classpath just points at geode-dependencies.jar.
> >
> > -Dan
> >
> >
> > On Wed, Mar 23, 2016 at 10:01 AM, Kirk Lund <kl...@pivotal.io> wrote:
> >
> >> So as I look at dependencies, I see that our gradle build is ultimately
> >> depending on multiple versions of the same libraries. Can't we clean
> this
> >> up?
> >>
> >> org.apache.httpcomponents:httpclient:4.2.5
> >> org.apache.httpcomponents:httpclient:4.3.3
> >> org.apache.httpcomponents:httpclient:4.5.1
> >>
> >> I really don't want multiple versions of anything in this project. Are
> we
> >> not using gradle correctly?
> >>
> >> -Kirk
> >>
> >>
> >> On Wed, Mar 23, 2016 at 9:23 AM, Kirk Lund <kl...@pivotal.io> wrote:
> >>
> >> > RestAPIsWithSSLDUnitTest failed in the nightly build. Failure stack is
> >> > below. I tried running this test by itself in intellij and it fails
> >> with "java.lang.NoSuchFieldError:
> >> > INSTANCE" from "at
> >> >
> >>
> org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<init>(DefaultHttpRequestWriterFactory.java:52)".
> >> > I posted that failure stack below as well.
> >> >
> >> > Any ideas what the NoSuckFieldError is about?
> >> >
> >> > :geode-assembly:distributedTest
> >> >
> >> >
> >>
> com.gemstone.gemfire.rest.internal.web.controllers.RestAPIsWithSSLDUnitTest
> >> > > testMutualAuthentication FAILED
> >> >     java.lang.RuntimeException: unexpected exception
> >> >         at com.gemstone.gemfire.rest.internal.web.controllers.
> >> >
> >>
> RestAPIsWithSSLDUnitTest.validateConnection(RestAPIsWithSSLDUnitTest.java:
> >> > 495)
> >> >         at com.gemstone.gemfire.rest.internal.web.controllers.
> >> > RestAPIsWithSSLDUnitTest.testMutualAuthentication(
> >> > RestAPIsWithSSLDUnitTest.java:648)
> >> >
> >> >         Caused by:
> >> >         javax.net.ssl.SSLHandshakeException: Remote host closed
> >> > connection during handshake
> >> >             at sun.security.ssl.SSLSocketImpl.readRecord(
> >> > SSLSocketImpl.java:992)
> >> >             at sun.security.ssl.SSLSocketImpl.waitForClose(
> >> > SSLSocketImpl.java:1769)
> >> >             at sun.security.ssl.HandshakeOutStream.flush(
> >> > HandshakeOutStream.java:124)
> >> >             at sun.security.ssl.Handshaker.sendChangeCipherSpec(
> >> > Handshaker.java:1083)
> >> >             at sun.security.ssl.ClientHandshaker.
> >> > sendChangeCipherAndFinish(ClientHandshaker.java:1222)
> >> >             at sun.security.ssl.ClientHandshaker.serverHelloDone(
> >> > ClientHandshaker.java:1134)
> >> >             at sun.security.ssl.ClientHandshaker.processMessage(
> >> > ClientHandshaker.java:348)
> >> >             at
> sun.security.ssl.Handshaker.processLoop(Handshaker.java:
> >> > 979)
> >> >             at sun.security.ssl.Handshaker.process_record(Handshaker.
> >> > java:914)
> >> >             at sun.security.ssl.SSLSocketImpl.readRecord(
> >> > SSLSocketImpl.java:1062)
> >> >             at sun.security.ssl.SSLSocketImpl.performInitialHandshake(
> >> > SSLSocketImpl.java:1375)
> >> >             at sun.security.ssl.SSLSocketImpl.startHandshake(
> >> > SSLSocketImpl.java:1403)
> >> >             at sun.security.ssl.SSLSocketImpl.startHandshake(
> >> > SSLSocketImpl.java:1387)
> >> >             at org.apache.http.conn.ssl.SSLConnectionSocketFactory.
> >> > createLayeredSocket(SSLConnectionSocketFactory.java:394)
> >> >             at org.apache.http.conn.ssl.SSLConnectionSocketFactory.
> >> > connectSocket(SSLConnectionSocketFactory.java:353)
> >> >             at
> org.apache.http.impl.conn.DefaultHttpClientConnectionOpe
> >> > rator.connect(DefaultHttpClientConnectionOperator.java:134)
> >> >             at
> org.apache.http.impl.conn.PoolingHttpClientConnectionMan
> >> > ager.connect(PoolingHttpClientConnectionManager.java:353)
> >> >             at org.apache.http.impl.execchain.MainClientExec.
> >> > establishRoute(MainClientExec.java:380)
> >> >             at org.apache.http.impl.execchain.MainClientExec.
> >> > execute(MainClientExec.java:236)
> >> >             at org.apache.http.impl.execchain.ProtocolExec.
> >> > execute(ProtocolExec.java:184)
> >> >             at org.apache.http.impl.execchain.RetryExec.execute(
> >> > RetryExec.java:88)
> >> >             at org.apache.http.impl.execchain.RedirectExec.
> >> > execute(RedirectExec.java:110)
> >> >             at
> org.apache.http.impl.client.InternalHttpClient.doExecute(
> >> > InternalHttpClient.java:184)
> >> >             at
> org.apache.http.impl.client.CloseableHttpClient.execute(
> >> > CloseableHttpClient.java:82)
> >> >             at
> org.apache.http.impl.client.CloseableHttpClient.execute(
> >> > CloseableHttpClient.java:107)
> >> >             at com.gemstone.gemfire.rest.internal.web.controllers.
> >> >
> >>
> RestAPIsWithSSLDUnitTest.validateConnection(RestAPIsWithSSLDUnitTest.java:
> >> > 474)
> >> >             ... 1 more
> >> >
> >> >             Caused by:
> >> >             java.io.EOFException: SSL peer shut down incorrectly
> >> >                 at
> >> sun.security.ssl.InputRecord.read(InputRecord.java:505)
> >> >                 at sun.security.ssl.SSLSocketImpl.readRecord(
> >> > SSLSocketImpl.java:973)
> >> >                 ... 26 more
> >> >
> >> > java.lang.NoSuchFieldError: INSTANCE
> >> >
> >> > at
> >> >
> >>
> org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<init>(DefaultHttpRequestWriterFactory.java:52)
> >> > at
> >> >
> >>
> org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<init>(DefaultHttpRequestWriterFactory.java:56)
> >> > at
> >> >
> >>
> org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<clinit>(DefaultHttpRequestWriterFactory.java:46)
> >> > at
> >> >
> >>
> org.apache.http.impl.conn.ManagedHttpClientConnectionFactory.<init>(ManagedHttpClientConnectionFactory.java:72)
> >> > at
> >> >
> >>
> org.apache.http.impl.conn.ManagedHttpClientConnectionFactory.<init>(ManagedHttpClientConnectionFactory.java:84)
> >> > at
> >> >
> >>
> org.apache.http.impl.conn.ManagedHttpClientConnectionFactory.<clinit>(ManagedHttpClientConnectionFactory.java:59)
> >> > at
> >> >
> >>
> org.apache.http.impl.conn.PoolingHttpClientConnectionManager$InternalConnectionFactory.<init>(PoolingHttpClientConnectionManager.java:487)
> >> > at
> >> >
> >>
> org.apache.http.impl.conn.PoolingHttpClientConnectionManager.<init>(PoolingHttpClientConnectionManager.java:147)
> >> > at
> >> >
> >>
> org.apache.http.impl.conn.PoolingHttpClientConnectionManager.<init>(PoolingHttpClientConnectionManager.java:136)
> >> > at
> >> >
> >>
> org.apache.http.impl.conn.PoolingHttpClientConnectionManager.<init>(PoolingHttpClientConnectionManager.java:112)
> >> > at
> >> >
> >>
> org.apache.http.impl.client.HttpClientBuilder.build(HttpClientBuilder.java:726)
> >> > at
> >> >
> >>
> com.gemstone.gemfire.rest.internal.web.controllers.RestAPIsWithSSLDUnitTest.getSSLBasedHTTPClient(RestAPIsWithSSLDUnitTest.java:458)
> >> > at
> >> >
> >>
> com.gemstone.gemfire.rest.internal.web.controllers.RestAPIsWithSSLDUnitTest.validateConnection(RestAPIsWithSSLDUnitTest.java:473)
> >> > at
> >> >
> >>
> com.gemstone.gemfire.rest.internal.web.controllers.RestAPIsWithSSLDUnitTest.testSSLWithoutKeyStoreType(RestAPIsWithSSLDUnitTest.java:522)
> >> > 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:497)
> >> > at junit.framework.TestCase.runTest(TestCase.java:176)
> >> > at junit.framework.TestCase.runBare(TestCase.java:141)
> >> > at junit.framework.TestResult$1.protect(TestResult.java:122)
> >> > at junit.framework.TestResult.runProtected(TestResult.java:142)
> >> > at junit.framework.TestResult.run(TestResult.java:125)
> >> > at junit.framework.TestCase.run(TestCase.java:129)
> >> > at junit.framework.TestSuite.runTest(TestSuite.java:252)
> >> > at junit.framework.TestSuite.run(TestSuite.java:247)
> >> > at
> >> >
> >>
> org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:86)
> >> > at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
> >> > at
> >> >
> >>
> com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
> >> > at
> >> >
> >>
> com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:234)
> >> > at
> >> com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:74)
> >> > 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:497)
> >> > at
> com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
> >> >
> >> >
> >>
> >
> >
>



-- 
-John
503-504-8657
john.blum10101 (skype)

Re: RestAPIsWithSSLDUnitTest fails

Posted by Dan Smith <ds...@pivotal.io>.
As far as the multiple versions of httpclient, I only see that dependency
showing up in the test dependencies. Different sub projects have different
test dependencies, which are transitively pulling in different versions of
this jar.

We can certainly force a version across all of the different projects in
dependency-resolution.gradle. But I think given these are different
projects with different test dependencies we should just let them pull in
whatever test dependencies they need.


> ./gradlew geode-core:dependencyInsight --dependency httpclient
--configuration testRuntime
Picked up JAVA_TOOL_OPTIONS:
:geode-core:dependencyInsight
org.apache.httpcomponents:httpclient:4.2.5
\--- org.apache.hadoop:hadoop-auth:2.4.1
     \--- testRuntime



> ./gradlew geode-pulse:dependencyInsight --dependency httpclient
--configuration testRuntime
Picked up JAVA_TOOL_OPTIONS:
:geode-pulse:dependencyInsight
org.apache.httpcomponents:httpclient:4.5.1
+--- org.seleniumhq.selenium:selenium-api:2.52.0
|    +--- testRuntime
|    \--- org.seleniumhq.selenium:selenium-remote-driver:2.52.0
|         +--- testRuntime
|         +--- org.seleniumhq.selenium:selenium-firefox-driver:2.52.0
|         |    \--- testRuntime
|         \--- org.seleniumhq.selenium:selenium-support:2.52.0
|              \--- testRuntime
\--- org.seleniumhq.selenium:selenium-remote-driver:2.52.0 (*)



On Wed, Mar 23, 2016 at 10:27 AM, Dan Smith <ds...@pivotal.io> wrote:

> The tests in that geode-assembly project are supposed to run on the binary
> assembly of the project, so I think the classpath when run from the command
> line might be a bit different than what you get in intellij. I think the
> command line classpath just points at geode-dependencies.jar.
>
> -Dan
>
>
> On Wed, Mar 23, 2016 at 10:01 AM, Kirk Lund <kl...@pivotal.io> wrote:
>
>> So as I look at dependencies, I see that our gradle build is ultimately
>> depending on multiple versions of the same libraries. Can't we clean this
>> up?
>>
>> org.apache.httpcomponents:httpclient:4.2.5
>> org.apache.httpcomponents:httpclient:4.3.3
>> org.apache.httpcomponents:httpclient:4.5.1
>>
>> I really don't want multiple versions of anything in this project. Are we
>> not using gradle correctly?
>>
>> -Kirk
>>
>>
>> On Wed, Mar 23, 2016 at 9:23 AM, Kirk Lund <kl...@pivotal.io> wrote:
>>
>> > RestAPIsWithSSLDUnitTest failed in the nightly build. Failure stack is
>> > below. I tried running this test by itself in intellij and it fails
>> with "java.lang.NoSuchFieldError:
>> > INSTANCE" from "at
>> >
>> org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<init>(DefaultHttpRequestWriterFactory.java:52)".
>> > I posted that failure stack below as well.
>> >
>> > Any ideas what the NoSuckFieldError is about?
>> >
>> > :geode-assembly:distributedTest
>> >
>> >
>> com.gemstone.gemfire.rest.internal.web.controllers.RestAPIsWithSSLDUnitTest
>> > > testMutualAuthentication FAILED
>> >     java.lang.RuntimeException: unexpected exception
>> >         at com.gemstone.gemfire.rest.internal.web.controllers.
>> >
>> RestAPIsWithSSLDUnitTest.validateConnection(RestAPIsWithSSLDUnitTest.java:
>> > 495)
>> >         at com.gemstone.gemfire.rest.internal.web.controllers.
>> > RestAPIsWithSSLDUnitTest.testMutualAuthentication(
>> > RestAPIsWithSSLDUnitTest.java:648)
>> >
>> >         Caused by:
>> >         javax.net.ssl.SSLHandshakeException: Remote host closed
>> > connection during handshake
>> >             at sun.security.ssl.SSLSocketImpl.readRecord(
>> > SSLSocketImpl.java:992)
>> >             at sun.security.ssl.SSLSocketImpl.waitForClose(
>> > SSLSocketImpl.java:1769)
>> >             at sun.security.ssl.HandshakeOutStream.flush(
>> > HandshakeOutStream.java:124)
>> >             at sun.security.ssl.Handshaker.sendChangeCipherSpec(
>> > Handshaker.java:1083)
>> >             at sun.security.ssl.ClientHandshaker.
>> > sendChangeCipherAndFinish(ClientHandshaker.java:1222)
>> >             at sun.security.ssl.ClientHandshaker.serverHelloDone(
>> > ClientHandshaker.java:1134)
>> >             at sun.security.ssl.ClientHandshaker.processMessage(
>> > ClientHandshaker.java:348)
>> >             at sun.security.ssl.Handshaker.processLoop(Handshaker.java:
>> > 979)
>> >             at sun.security.ssl.Handshaker.process_record(Handshaker.
>> > java:914)
>> >             at sun.security.ssl.SSLSocketImpl.readRecord(
>> > SSLSocketImpl.java:1062)
>> >             at sun.security.ssl.SSLSocketImpl.performInitialHandshake(
>> > SSLSocketImpl.java:1375)
>> >             at sun.security.ssl.SSLSocketImpl.startHandshake(
>> > SSLSocketImpl.java:1403)
>> >             at sun.security.ssl.SSLSocketImpl.startHandshake(
>> > SSLSocketImpl.java:1387)
>> >             at org.apache.http.conn.ssl.SSLConnectionSocketFactory.
>> > createLayeredSocket(SSLConnectionSocketFactory.java:394)
>> >             at org.apache.http.conn.ssl.SSLConnectionSocketFactory.
>> > connectSocket(SSLConnectionSocketFactory.java:353)
>> >             at org.apache.http.impl.conn.DefaultHttpClientConnectionOpe
>> > rator.connect(DefaultHttpClientConnectionOperator.java:134)
>> >             at org.apache.http.impl.conn.PoolingHttpClientConnectionMan
>> > ager.connect(PoolingHttpClientConnectionManager.java:353)
>> >             at org.apache.http.impl.execchain.MainClientExec.
>> > establishRoute(MainClientExec.java:380)
>> >             at org.apache.http.impl.execchain.MainClientExec.
>> > execute(MainClientExec.java:236)
>> >             at org.apache.http.impl.execchain.ProtocolExec.
>> > execute(ProtocolExec.java:184)
>> >             at org.apache.http.impl.execchain.RetryExec.execute(
>> > RetryExec.java:88)
>> >             at org.apache.http.impl.execchain.RedirectExec.
>> > execute(RedirectExec.java:110)
>> >             at org.apache.http.impl.client.InternalHttpClient.doExecute(
>> > InternalHttpClient.java:184)
>> >             at org.apache.http.impl.client.CloseableHttpClient.execute(
>> > CloseableHttpClient.java:82)
>> >             at org.apache.http.impl.client.CloseableHttpClient.execute(
>> > CloseableHttpClient.java:107)
>> >             at com.gemstone.gemfire.rest.internal.web.controllers.
>> >
>> RestAPIsWithSSLDUnitTest.validateConnection(RestAPIsWithSSLDUnitTest.java:
>> > 474)
>> >             ... 1 more
>> >
>> >             Caused by:
>> >             java.io.EOFException: SSL peer shut down incorrectly
>> >                 at
>> sun.security.ssl.InputRecord.read(InputRecord.java:505)
>> >                 at sun.security.ssl.SSLSocketImpl.readRecord(
>> > SSLSocketImpl.java:973)
>> >                 ... 26 more
>> >
>> > java.lang.NoSuchFieldError: INSTANCE
>> >
>> > at
>> >
>> org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<init>(DefaultHttpRequestWriterFactory.java:52)
>> > at
>> >
>> org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<init>(DefaultHttpRequestWriterFactory.java:56)
>> > at
>> >
>> org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<clinit>(DefaultHttpRequestWriterFactory.java:46)
>> > at
>> >
>> org.apache.http.impl.conn.ManagedHttpClientConnectionFactory.<init>(ManagedHttpClientConnectionFactory.java:72)
>> > at
>> >
>> org.apache.http.impl.conn.ManagedHttpClientConnectionFactory.<init>(ManagedHttpClientConnectionFactory.java:84)
>> > at
>> >
>> org.apache.http.impl.conn.ManagedHttpClientConnectionFactory.<clinit>(ManagedHttpClientConnectionFactory.java:59)
>> > at
>> >
>> org.apache.http.impl.conn.PoolingHttpClientConnectionManager$InternalConnectionFactory.<init>(PoolingHttpClientConnectionManager.java:487)
>> > at
>> >
>> org.apache.http.impl.conn.PoolingHttpClientConnectionManager.<init>(PoolingHttpClientConnectionManager.java:147)
>> > at
>> >
>> org.apache.http.impl.conn.PoolingHttpClientConnectionManager.<init>(PoolingHttpClientConnectionManager.java:136)
>> > at
>> >
>> org.apache.http.impl.conn.PoolingHttpClientConnectionManager.<init>(PoolingHttpClientConnectionManager.java:112)
>> > at
>> >
>> org.apache.http.impl.client.HttpClientBuilder.build(HttpClientBuilder.java:726)
>> > at
>> >
>> com.gemstone.gemfire.rest.internal.web.controllers.RestAPIsWithSSLDUnitTest.getSSLBasedHTTPClient(RestAPIsWithSSLDUnitTest.java:458)
>> > at
>> >
>> com.gemstone.gemfire.rest.internal.web.controllers.RestAPIsWithSSLDUnitTest.validateConnection(RestAPIsWithSSLDUnitTest.java:473)
>> > at
>> >
>> com.gemstone.gemfire.rest.internal.web.controllers.RestAPIsWithSSLDUnitTest.testSSLWithoutKeyStoreType(RestAPIsWithSSLDUnitTest.java:522)
>> > 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:497)
>> > at junit.framework.TestCase.runTest(TestCase.java:176)
>> > at junit.framework.TestCase.runBare(TestCase.java:141)
>> > at junit.framework.TestResult$1.protect(TestResult.java:122)
>> > at junit.framework.TestResult.runProtected(TestResult.java:142)
>> > at junit.framework.TestResult.run(TestResult.java:125)
>> > at junit.framework.TestCase.run(TestCase.java:129)
>> > at junit.framework.TestSuite.runTest(TestSuite.java:252)
>> > at junit.framework.TestSuite.run(TestSuite.java:247)
>> > at
>> >
>> org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:86)
>> > at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
>> > at
>> >
>> com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
>> > at
>> >
>> com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:234)
>> > at
>> com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:74)
>> > 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:497)
>> > at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
>> >
>> >
>>
>
>

Re: RestAPIsWithSSLDUnitTest fails

Posted by Dan Smith <ds...@pivotal.io>.
The tests in that geode-assembly project are supposed to run on the binary
assembly of the project, so I think the classpath when run from the command
line might be a bit different than what you get in intellij. I think the
command line classpath just points at geode-dependencies.jar.

-Dan

On Wed, Mar 23, 2016 at 10:01 AM, Kirk Lund <kl...@pivotal.io> wrote:

> So as I look at dependencies, I see that our gradle build is ultimately
> depending on multiple versions of the same libraries. Can't we clean this
> up?
>
> org.apache.httpcomponents:httpclient:4.2.5
> org.apache.httpcomponents:httpclient:4.3.3
> org.apache.httpcomponents:httpclient:4.5.1
>
> I really don't want multiple versions of anything in this project. Are we
> not using gradle correctly?
>
> -Kirk
>
>
> On Wed, Mar 23, 2016 at 9:23 AM, Kirk Lund <kl...@pivotal.io> wrote:
>
> > RestAPIsWithSSLDUnitTest failed in the nightly build. Failure stack is
> > below. I tried running this test by itself in intellij and it fails with
> "java.lang.NoSuchFieldError:
> > INSTANCE" from "at
> >
> org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<init>(DefaultHttpRequestWriterFactory.java:52)".
> > I posted that failure stack below as well.
> >
> > Any ideas what the NoSuckFieldError is about?
> >
> > :geode-assembly:distributedTest
> >
> >
> com.gemstone.gemfire.rest.internal.web.controllers.RestAPIsWithSSLDUnitTest
> > > testMutualAuthentication FAILED
> >     java.lang.RuntimeException: unexpected exception
> >         at com.gemstone.gemfire.rest.internal.web.controllers.
> >
> RestAPIsWithSSLDUnitTest.validateConnection(RestAPIsWithSSLDUnitTest.java:
> > 495)
> >         at com.gemstone.gemfire.rest.internal.web.controllers.
> > RestAPIsWithSSLDUnitTest.testMutualAuthentication(
> > RestAPIsWithSSLDUnitTest.java:648)
> >
> >         Caused by:
> >         javax.net.ssl.SSLHandshakeException: Remote host closed
> > connection during handshake
> >             at sun.security.ssl.SSLSocketImpl.readRecord(
> > SSLSocketImpl.java:992)
> >             at sun.security.ssl.SSLSocketImpl.waitForClose(
> > SSLSocketImpl.java:1769)
> >             at sun.security.ssl.HandshakeOutStream.flush(
> > HandshakeOutStream.java:124)
> >             at sun.security.ssl.Handshaker.sendChangeCipherSpec(
> > Handshaker.java:1083)
> >             at sun.security.ssl.ClientHandshaker.
> > sendChangeCipherAndFinish(ClientHandshaker.java:1222)
> >             at sun.security.ssl.ClientHandshaker.serverHelloDone(
> > ClientHandshaker.java:1134)
> >             at sun.security.ssl.ClientHandshaker.processMessage(
> > ClientHandshaker.java:348)
> >             at sun.security.ssl.Handshaker.processLoop(Handshaker.java:
> > 979)
> >             at sun.security.ssl.Handshaker.process_record(Handshaker.
> > java:914)
> >             at sun.security.ssl.SSLSocketImpl.readRecord(
> > SSLSocketImpl.java:1062)
> >             at sun.security.ssl.SSLSocketImpl.performInitialHandshake(
> > SSLSocketImpl.java:1375)
> >             at sun.security.ssl.SSLSocketImpl.startHandshake(
> > SSLSocketImpl.java:1403)
> >             at sun.security.ssl.SSLSocketImpl.startHandshake(
> > SSLSocketImpl.java:1387)
> >             at org.apache.http.conn.ssl.SSLConnectionSocketFactory.
> > createLayeredSocket(SSLConnectionSocketFactory.java:394)
> >             at org.apache.http.conn.ssl.SSLConnectionSocketFactory.
> > connectSocket(SSLConnectionSocketFactory.java:353)
> >             at org.apache.http.impl.conn.DefaultHttpClientConnectionOpe
> > rator.connect(DefaultHttpClientConnectionOperator.java:134)
> >             at org.apache.http.impl.conn.PoolingHttpClientConnectionMan
> > ager.connect(PoolingHttpClientConnectionManager.java:353)
> >             at org.apache.http.impl.execchain.MainClientExec.
> > establishRoute(MainClientExec.java:380)
> >             at org.apache.http.impl.execchain.MainClientExec.
> > execute(MainClientExec.java:236)
> >             at org.apache.http.impl.execchain.ProtocolExec.
> > execute(ProtocolExec.java:184)
> >             at org.apache.http.impl.execchain.RetryExec.execute(
> > RetryExec.java:88)
> >             at org.apache.http.impl.execchain.RedirectExec.
> > execute(RedirectExec.java:110)
> >             at org.apache.http.impl.client.InternalHttpClient.doExecute(
> > InternalHttpClient.java:184)
> >             at org.apache.http.impl.client.CloseableHttpClient.execute(
> > CloseableHttpClient.java:82)
> >             at org.apache.http.impl.client.CloseableHttpClient.execute(
> > CloseableHttpClient.java:107)
> >             at com.gemstone.gemfire.rest.internal.web.controllers.
> >
> RestAPIsWithSSLDUnitTest.validateConnection(RestAPIsWithSSLDUnitTest.java:
> > 474)
> >             ... 1 more
> >
> >             Caused by:
> >             java.io.EOFException: SSL peer shut down incorrectly
> >                 at
> sun.security.ssl.InputRecord.read(InputRecord.java:505)
> >                 at sun.security.ssl.SSLSocketImpl.readRecord(
> > SSLSocketImpl.java:973)
> >                 ... 26 more
> >
> > java.lang.NoSuchFieldError: INSTANCE
> >
> > at
> >
> org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<init>(DefaultHttpRequestWriterFactory.java:52)
> > at
> >
> org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<init>(DefaultHttpRequestWriterFactory.java:56)
> > at
> >
> org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<clinit>(DefaultHttpRequestWriterFactory.java:46)
> > at
> >
> org.apache.http.impl.conn.ManagedHttpClientConnectionFactory.<init>(ManagedHttpClientConnectionFactory.java:72)
> > at
> >
> org.apache.http.impl.conn.ManagedHttpClientConnectionFactory.<init>(ManagedHttpClientConnectionFactory.java:84)
> > at
> >
> org.apache.http.impl.conn.ManagedHttpClientConnectionFactory.<clinit>(ManagedHttpClientConnectionFactory.java:59)
> > at
> >
> org.apache.http.impl.conn.PoolingHttpClientConnectionManager$InternalConnectionFactory.<init>(PoolingHttpClientConnectionManager.java:487)
> > at
> >
> org.apache.http.impl.conn.PoolingHttpClientConnectionManager.<init>(PoolingHttpClientConnectionManager.java:147)
> > at
> >
> org.apache.http.impl.conn.PoolingHttpClientConnectionManager.<init>(PoolingHttpClientConnectionManager.java:136)
> > at
> >
> org.apache.http.impl.conn.PoolingHttpClientConnectionManager.<init>(PoolingHttpClientConnectionManager.java:112)
> > at
> >
> org.apache.http.impl.client.HttpClientBuilder.build(HttpClientBuilder.java:726)
> > at
> >
> com.gemstone.gemfire.rest.internal.web.controllers.RestAPIsWithSSLDUnitTest.getSSLBasedHTTPClient(RestAPIsWithSSLDUnitTest.java:458)
> > at
> >
> com.gemstone.gemfire.rest.internal.web.controllers.RestAPIsWithSSLDUnitTest.validateConnection(RestAPIsWithSSLDUnitTest.java:473)
> > at
> >
> com.gemstone.gemfire.rest.internal.web.controllers.RestAPIsWithSSLDUnitTest.testSSLWithoutKeyStoreType(RestAPIsWithSSLDUnitTest.java:522)
> > 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:497)
> > at junit.framework.TestCase.runTest(TestCase.java:176)
> > at junit.framework.TestCase.runBare(TestCase.java:141)
> > at junit.framework.TestResult$1.protect(TestResult.java:122)
> > at junit.framework.TestResult.runProtected(TestResult.java:142)
> > at junit.framework.TestResult.run(TestResult.java:125)
> > at junit.framework.TestCase.run(TestCase.java:129)
> > at junit.framework.TestSuite.runTest(TestSuite.java:252)
> > at junit.framework.TestSuite.run(TestSuite.java:247)
> > at
> >
> org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:86)
> > at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
> > at
> >
> com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
> > at
> >
> com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:234)
> > at
> com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:74)
> > 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:497)
> > at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
> >
> >
>

Re: RestAPIsWithSSLDUnitTest fails

Posted by Udo Kohlmeyer <uk...@pivotal.io>.
That is very interesting that there are three versions again.

I had updated the depedency-versions.properties to

httpclient.version= 4.5.1 httpcore.version = 4.4.3

in Rev. f2175524491fcab3206b718d6de0164d4fed8906 and 
4d0dfc569bf8dcdf1c3d98de0a7c8beceb2187f0.

Which removed the

org.apache.httpcomponents:httpclient:4.2.5

dependency and left

org.apache.httpcomponents:httpclient:4.3.3

which is an hadoop dependency.

--Udo
On 24/03/2016 4:01 am, Kirk Lund wrote:
> So as I look at dependencies, I see that our gradle build is ultimately
> depending on multiple versions of the same libraries. Can't we clean this
> up?
>
> org.apache.httpcomponents:httpclient:4.2.5
> org.apache.httpcomponents:httpclient:4.3.3
> org.apache.httpcomponents:httpclient:4.5.1
>
> I really don't want multiple versions of anything in this project. Are we
> not using gradle correctly?
>
> -Kirk
>
>
> On Wed, Mar 23, 2016 at 9:23 AM, Kirk Lund <kl...@pivotal.io> wrote:
>
>> RestAPIsWithSSLDUnitTest failed in the nightly build. Failure stack is
>> below. I tried running this test by itself in intellij and it fails with "java.lang.NoSuchFieldError:
>> INSTANCE" from "at
>> org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<init>(DefaultHttpRequestWriterFactory.java:52)".
>> I posted that failure stack below as well.
>>
>> Any ideas what the NoSuckFieldError is about?
>>
>> :geode-assembly:distributedTest
>>
>> com.gemstone.gemfire.rest.internal.web.controllers.RestAPIsWithSSLDUnitTest
>>> testMutualAuthentication FAILED
>>      java.lang.RuntimeException: unexpected exception
>>          at com.gemstone.gemfire.rest.internal.web.controllers.
>> RestAPIsWithSSLDUnitTest.validateConnection(RestAPIsWithSSLDUnitTest.java:
>> 495)
>>          at com.gemstone.gemfire.rest.internal.web.controllers.
>> RestAPIsWithSSLDUnitTest.testMutualAuthentication(
>> RestAPIsWithSSLDUnitTest.java:648)
>>
>>          Caused by:
>>          javax.net.ssl.SSLHandshakeException: Remote host closed
>> connection during handshake
>>              at sun.security.ssl.SSLSocketImpl.readRecord(
>> SSLSocketImpl.java:992)
>>              at sun.security.ssl.SSLSocketImpl.waitForClose(
>> SSLSocketImpl.java:1769)
>>              at sun.security.ssl.HandshakeOutStream.flush(
>> HandshakeOutStream.java:124)
>>              at sun.security.ssl.Handshaker.sendChangeCipherSpec(
>> Handshaker.java:1083)
>>              at sun.security.ssl.ClientHandshaker.
>> sendChangeCipherAndFinish(ClientHandshaker.java:1222)
>>              at sun.security.ssl.ClientHandshaker.serverHelloDone(
>> ClientHandshaker.java:1134)
>>              at sun.security.ssl.ClientHandshaker.processMessage(
>> ClientHandshaker.java:348)
>>              at sun.security.ssl.Handshaker.processLoop(Handshaker.java:
>> 979)
>>              at sun.security.ssl.Handshaker.process_record(Handshaker.
>> java:914)
>>              at sun.security.ssl.SSLSocketImpl.readRecord(
>> SSLSocketImpl.java:1062)
>>              at sun.security.ssl.SSLSocketImpl.performInitialHandshake(
>> SSLSocketImpl.java:1375)
>>              at sun.security.ssl.SSLSocketImpl.startHandshake(
>> SSLSocketImpl.java:1403)
>>              at sun.security.ssl.SSLSocketImpl.startHandshake(
>> SSLSocketImpl.java:1387)
>>              at org.apache.http.conn.ssl.SSLConnectionSocketFactory.
>> createLayeredSocket(SSLConnectionSocketFactory.java:394)
>>              at org.apache.http.conn.ssl.SSLConnectionSocketFactory.
>> connectSocket(SSLConnectionSocketFactory.java:353)
>>              at org.apache.http.impl.conn.DefaultHttpClientConnectionOpe
>> rator.connect(DefaultHttpClientConnectionOperator.java:134)
>>              at org.apache.http.impl.conn.PoolingHttpClientConnectionMan
>> ager.connect(PoolingHttpClientConnectionManager.java:353)
>>              at org.apache.http.impl.execchain.MainClientExec.
>> establishRoute(MainClientExec.java:380)
>>              at org.apache.http.impl.execchain.MainClientExec.
>> execute(MainClientExec.java:236)
>>              at org.apache.http.impl.execchain.ProtocolExec.
>> execute(ProtocolExec.java:184)
>>              at org.apache.http.impl.execchain.RetryExec.execute(
>> RetryExec.java:88)
>>              at org.apache.http.impl.execchain.RedirectExec.
>> execute(RedirectExec.java:110)
>>              at org.apache.http.impl.client.InternalHttpClient.doExecute(
>> InternalHttpClient.java:184)
>>              at org.apache.http.impl.client.CloseableHttpClient.execute(
>> CloseableHttpClient.java:82)
>>              at org.apache.http.impl.client.CloseableHttpClient.execute(
>> CloseableHttpClient.java:107)
>>              at com.gemstone.gemfire.rest.internal.web.controllers.
>> RestAPIsWithSSLDUnitTest.validateConnection(RestAPIsWithSSLDUnitTest.java:
>> 474)
>>              ... 1 more
>>
>>              Caused by:
>>              java.io.EOFException: SSL peer shut down incorrectly
>>                  at sun.security.ssl.InputRecord.read(InputRecord.java:505)
>>                  at sun.security.ssl.SSLSocketImpl.readRecord(
>> SSLSocketImpl.java:973)
>>                  ... 26 more
>>
>> java.lang.NoSuchFieldError: INSTANCE
>>
>> at
>> org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<init>(DefaultHttpRequestWriterFactory.java:52)
>> at
>> org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<init>(DefaultHttpRequestWriterFactory.java:56)
>> at
>> org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<clinit>(DefaultHttpRequestWriterFactory.java:46)
>> at
>> org.apache.http.impl.conn.ManagedHttpClientConnectionFactory.<init>(ManagedHttpClientConnectionFactory.java:72)
>> at
>> org.apache.http.impl.conn.ManagedHttpClientConnectionFactory.<init>(ManagedHttpClientConnectionFactory.java:84)
>> at
>> org.apache.http.impl.conn.ManagedHttpClientConnectionFactory.<clinit>(ManagedHttpClientConnectionFactory.java:59)
>> at
>> org.apache.http.impl.conn.PoolingHttpClientConnectionManager$InternalConnectionFactory.<init>(PoolingHttpClientConnectionManager.java:487)
>> at
>> org.apache.http.impl.conn.PoolingHttpClientConnectionManager.<init>(PoolingHttpClientConnectionManager.java:147)
>> at
>> org.apache.http.impl.conn.PoolingHttpClientConnectionManager.<init>(PoolingHttpClientConnectionManager.java:136)
>> at
>> org.apache.http.impl.conn.PoolingHttpClientConnectionManager.<init>(PoolingHttpClientConnectionManager.java:112)
>> at
>> org.apache.http.impl.client.HttpClientBuilder.build(HttpClientBuilder.java:726)
>> at
>> com.gemstone.gemfire.rest.internal.web.controllers.RestAPIsWithSSLDUnitTest.getSSLBasedHTTPClient(RestAPIsWithSSLDUnitTest.java:458)
>> at
>> com.gemstone.gemfire.rest.internal.web.controllers.RestAPIsWithSSLDUnitTest.validateConnection(RestAPIsWithSSLDUnitTest.java:473)
>> at
>> com.gemstone.gemfire.rest.internal.web.controllers.RestAPIsWithSSLDUnitTest.testSSLWithoutKeyStoreType(RestAPIsWithSSLDUnitTest.java:522)
>> 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:497)
>> at junit.framework.TestCase.runTest(TestCase.java:176)
>> at junit.framework.TestCase.runBare(TestCase.java:141)
>> at junit.framework.TestResult$1.protect(TestResult.java:122)
>> at junit.framework.TestResult.runProtected(TestResult.java:142)
>> at junit.framework.TestResult.run(TestResult.java:125)
>> at junit.framework.TestCase.run(TestCase.java:129)
>> at junit.framework.TestSuite.runTest(TestSuite.java:252)
>> at junit.framework.TestSuite.run(TestSuite.java:247)
>> at
>> org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:86)
>> at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
>> at
>> com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
>> at
>> com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:234)
>> at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:74)
>> 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:497)
>> at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
>>
>>


Re: RestAPIsWithSSLDUnitTest fails

Posted by Kirk Lund <kl...@pivotal.io>.
So as I look at dependencies, I see that our gradle build is ultimately
depending on multiple versions of the same libraries. Can't we clean this
up?

org.apache.httpcomponents:httpclient:4.2.5
org.apache.httpcomponents:httpclient:4.3.3
org.apache.httpcomponents:httpclient:4.5.1

I really don't want multiple versions of anything in this project. Are we
not using gradle correctly?

-Kirk


On Wed, Mar 23, 2016 at 9:23 AM, Kirk Lund <kl...@pivotal.io> wrote:

> RestAPIsWithSSLDUnitTest failed in the nightly build. Failure stack is
> below. I tried running this test by itself in intellij and it fails with "java.lang.NoSuchFieldError:
> INSTANCE" from "at
> org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<init>(DefaultHttpRequestWriterFactory.java:52)".
> I posted that failure stack below as well.
>
> Any ideas what the NoSuckFieldError is about?
>
> :geode-assembly:distributedTest
>
> com.gemstone.gemfire.rest.internal.web.controllers.RestAPIsWithSSLDUnitTest
> > testMutualAuthentication FAILED
>     java.lang.RuntimeException: unexpected exception
>         at com.gemstone.gemfire.rest.internal.web.controllers.
> RestAPIsWithSSLDUnitTest.validateConnection(RestAPIsWithSSLDUnitTest.java:
> 495)
>         at com.gemstone.gemfire.rest.internal.web.controllers.
> RestAPIsWithSSLDUnitTest.testMutualAuthentication(
> RestAPIsWithSSLDUnitTest.java:648)
>
>         Caused by:
>         javax.net.ssl.SSLHandshakeException: Remote host closed
> connection during handshake
>             at sun.security.ssl.SSLSocketImpl.readRecord(
> SSLSocketImpl.java:992)
>             at sun.security.ssl.SSLSocketImpl.waitForClose(
> SSLSocketImpl.java:1769)
>             at sun.security.ssl.HandshakeOutStream.flush(
> HandshakeOutStream.java:124)
>             at sun.security.ssl.Handshaker.sendChangeCipherSpec(
> Handshaker.java:1083)
>             at sun.security.ssl.ClientHandshaker.
> sendChangeCipherAndFinish(ClientHandshaker.java:1222)
>             at sun.security.ssl.ClientHandshaker.serverHelloDone(
> ClientHandshaker.java:1134)
>             at sun.security.ssl.ClientHandshaker.processMessage(
> ClientHandshaker.java:348)
>             at sun.security.ssl.Handshaker.processLoop(Handshaker.java:
> 979)
>             at sun.security.ssl.Handshaker.process_record(Handshaker.
> java:914)
>             at sun.security.ssl.SSLSocketImpl.readRecord(
> SSLSocketImpl.java:1062)
>             at sun.security.ssl.SSLSocketImpl.performInitialHandshake(
> SSLSocketImpl.java:1375)
>             at sun.security.ssl.SSLSocketImpl.startHandshake(
> SSLSocketImpl.java:1403)
>             at sun.security.ssl.SSLSocketImpl.startHandshake(
> SSLSocketImpl.java:1387)
>             at org.apache.http.conn.ssl.SSLConnectionSocketFactory.
> createLayeredSocket(SSLConnectionSocketFactory.java:394)
>             at org.apache.http.conn.ssl.SSLConnectionSocketFactory.
> connectSocket(SSLConnectionSocketFactory.java:353)
>             at org.apache.http.impl.conn.DefaultHttpClientConnectionOpe
> rator.connect(DefaultHttpClientConnectionOperator.java:134)
>             at org.apache.http.impl.conn.PoolingHttpClientConnectionMan
> ager.connect(PoolingHttpClientConnectionManager.java:353)
>             at org.apache.http.impl.execchain.MainClientExec.
> establishRoute(MainClientExec.java:380)
>             at org.apache.http.impl.execchain.MainClientExec.
> execute(MainClientExec.java:236)
>             at org.apache.http.impl.execchain.ProtocolExec.
> execute(ProtocolExec.java:184)
>             at org.apache.http.impl.execchain.RetryExec.execute(
> RetryExec.java:88)
>             at org.apache.http.impl.execchain.RedirectExec.
> execute(RedirectExec.java:110)
>             at org.apache.http.impl.client.InternalHttpClient.doExecute(
> InternalHttpClient.java:184)
>             at org.apache.http.impl.client.CloseableHttpClient.execute(
> CloseableHttpClient.java:82)
>             at org.apache.http.impl.client.CloseableHttpClient.execute(
> CloseableHttpClient.java:107)
>             at com.gemstone.gemfire.rest.internal.web.controllers.
> RestAPIsWithSSLDUnitTest.validateConnection(RestAPIsWithSSLDUnitTest.java:
> 474)
>             ... 1 more
>
>             Caused by:
>             java.io.EOFException: SSL peer shut down incorrectly
>                 at sun.security.ssl.InputRecord.read(InputRecord.java:505)
>                 at sun.security.ssl.SSLSocketImpl.readRecord(
> SSLSocketImpl.java:973)
>                 ... 26 more
>
> java.lang.NoSuchFieldError: INSTANCE
>
> at
> org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<init>(DefaultHttpRequestWriterFactory.java:52)
> at
> org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<init>(DefaultHttpRequestWriterFactory.java:56)
> at
> org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<clinit>(DefaultHttpRequestWriterFactory.java:46)
> at
> org.apache.http.impl.conn.ManagedHttpClientConnectionFactory.<init>(ManagedHttpClientConnectionFactory.java:72)
> at
> org.apache.http.impl.conn.ManagedHttpClientConnectionFactory.<init>(ManagedHttpClientConnectionFactory.java:84)
> at
> org.apache.http.impl.conn.ManagedHttpClientConnectionFactory.<clinit>(ManagedHttpClientConnectionFactory.java:59)
> at
> org.apache.http.impl.conn.PoolingHttpClientConnectionManager$InternalConnectionFactory.<init>(PoolingHttpClientConnectionManager.java:487)
> at
> org.apache.http.impl.conn.PoolingHttpClientConnectionManager.<init>(PoolingHttpClientConnectionManager.java:147)
> at
> org.apache.http.impl.conn.PoolingHttpClientConnectionManager.<init>(PoolingHttpClientConnectionManager.java:136)
> at
> org.apache.http.impl.conn.PoolingHttpClientConnectionManager.<init>(PoolingHttpClientConnectionManager.java:112)
> at
> org.apache.http.impl.client.HttpClientBuilder.build(HttpClientBuilder.java:726)
> at
> com.gemstone.gemfire.rest.internal.web.controllers.RestAPIsWithSSLDUnitTest.getSSLBasedHTTPClient(RestAPIsWithSSLDUnitTest.java:458)
> at
> com.gemstone.gemfire.rest.internal.web.controllers.RestAPIsWithSSLDUnitTest.validateConnection(RestAPIsWithSSLDUnitTest.java:473)
> at
> com.gemstone.gemfire.rest.internal.web.controllers.RestAPIsWithSSLDUnitTest.testSSLWithoutKeyStoreType(RestAPIsWithSSLDUnitTest.java:522)
> 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:497)
> at junit.framework.TestCase.runTest(TestCase.java:176)
> at junit.framework.TestCase.runBare(TestCase.java:141)
> at junit.framework.TestResult$1.protect(TestResult.java:122)
> at junit.framework.TestResult.runProtected(TestResult.java:142)
> at junit.framework.TestResult.run(TestResult.java:125)
> at junit.framework.TestCase.run(TestCase.java:129)
> at junit.framework.TestSuite.runTest(TestSuite.java:252)
> at junit.framework.TestSuite.run(TestSuite.java:247)
> at
> org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:86)
> at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
> at
> com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
> at
> com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:234)
> at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:74)
> 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:497)
> at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
>
>