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 <[email protected]> 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 <[email protected]> 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 <[email protected]> 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 <[email protected]> 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)

Reply via email to