You should remember that jenkins has no classloader isolation and your project must use httpclient library version the first loaded into jenkins (could be from core or plugin). Check :dependency-tree
On Sunday, July 17, 2016 at 7:50:22 AM UTC+3, Gavin Mogan wrote: > > Oh the reason I'm saying its httpclient, which may not be super clear from > this error, is that its also erroring when I call jenkinsRule.getWebClient() > > ex: > > doJobReportTest(hudson.plugins.sauce_ondemand.SauceOnDemandBuildActionTest) > Time elapsed: 10.082 sec <<< ERROR! > java.lang.NoClassDefFoundError: > org/apache/http/conn/HttpClientConnectionManager > at > hudson.plugins.sauce_ondemand.SauceOnDemandBuildActionTest.doJobReportTest(SauceOnDemandBuildActionTest.java:59) > Caused by: java.lang.ClassNotFoundException: > org.apache.http.conn.HttpClientConnectionManager > at > hudson.plugins.sauce_ondemand.SauceOnDemandBuildActionTest.doJobReportTest(SauceOnDemandBuildActionTest.java:59) > > On Sat, Jul 16, 2016 at 9:42 PM, Gavin Mogan <[email protected] > <javascript:>> wrote: > >> I'm working on upgrading my pom file to work with the new 2.0 style >> parent plugin and harness but hitting road blocks again. I wasn't getting >> this error when I was running things on my macbook, but am getting it on my >> linux desktop. >> >> Tests run: 6, Failures: 0, Errors: 5, Skipped: 0, Time elapsed: 49.411 >> sec <<< FAILURE! - in InjectedTest >> org.jvnet.hudson.test.JellyTestSuiteBuilder$JellyTestSuite(org.jvnet.hudson.test.junit.FailedTest) >> >> Time elapsed: 0.002 sec <<< ERROR! >> java.lang.NoClassDefFoundError: org/apache/http/config/Lookup >> Caused by: java.lang.ClassNotFoundException: org.apache.http.config.Lookup >> >> https://gist.github.com/4cb0f65d1abb1c717961386b90209bf3 is current pom >> file in question. >> >> I've been trying to dig into this, but I can't figure out why this is >> failing, httpclient seems to be required by various plugins. I'm not >> directly requiring it, but I've tried and it still gives the error. >> >> Any suggestions on what to do next would be greatly appreciated. >> >> Debugging Information: >> >> $ mvn -v >> Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; >> 2015-11-10T08:41:47-08:00) >> Maven home: /opt/apache-maven-3.3.9 >> Java version: 1.8.0_31, vendor: Oracle Corporation >> Java home: /opt/jdk1.8.0_31/jre >> Default locale: en_US, platform encoding: UTF-8 >> OS name: "linux", version: "3.10.0-327.22.2.el7.x86_64", arch: "amd64", >> family: "unix" >> >> $ mvn org.apache.maven.plugins:maven-dependency-plugin:2.10:list | grep >> httpclient >> [INFO] commons-httpclient:commons-httpclient:jar:3.1:compile >> [INFO] org.apache.httpcomponents:httpclient:jar:4.2.5:compile >> >> >> -- >> You received this message because you are subscribed to a topic in the >> Google Groups "Jenkins Developers" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/jenkinsci-dev/dcpB0dEzbVM/unsubscribe. >> To unsubscribe from this group and all its topics, send an email to >> [email protected] <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/jenkinsci-dev/1d3d1e0a-cae5-4535-b3fe-4803f52b5514%40googlegroups.com >> >> <https://groups.google.com/d/msgid/jenkinsci-dev/1d3d1e0a-cae5-4535-b3fe-4803f52b5514%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > > -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/5bcf9521-6805-4dc0-b0a3-e09deb074d17%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
