InjectedTest failures due to class not found.

311 views
Skip to first unread message

Michael Neale

unread,
Dec 21, 2015, 9:50:17 PM12/21/15
to Jenkins Developers
I was building a plugin with a very recent parent pom of 1.639 and running the InjectedTest fails: 

Tests in error: 

  FailedTest.org.jvnet.hudson.test.JellyTestSuiteBuilder$JellyTestSuite » NoClassDefFound


org.jvnet.hudson.test.JellyTestSuiteBuilder$JellyTestSuite(org.jvnet.hudson.test.junit.FailedTest)  Time elapsed: 0.023 sec  <<< ERROR!

java.lang.NoClassDefFoundError: org/apache/http/cookie/CookieSpecProvider


It seems that there has been some change in some dependency of the jelly test suite. Has anyone else seen this? 

This is post the latest LTS so I expect few are odd enough to build against a newer parent pom, so perhaps no one has seen this yet (google search hints at that). 


The only workaround is to bypass the InjectedTest.java in the pom.xml 



Stephen Connolly

unread,
Dec 22, 2015, 3:07:30 AM12/22/15
to jenkin...@googlegroups.com
You have ensured you have at least one .jelly file? (Typically a root index.jelly with the plugin description)
--
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 jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/336c3eb9-6d24-4dee-ad41-b27666a24026%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Sent from my phone

Michael Neale

unread,
Dec 22, 2015, 4:10:53 AM12/22/15
to Jenkins Developers
Yes sir, there is jelly. https://github.com/jenkinsci/pipeline-editor-plugin/blob/master/src/main/resources/index.jelly

(this was working fine until recently, I noted). 

If you remove the build section of the pom.xml it should also barf for you (unless it is something local to my m2 cache...)


On Tuesday, December 22, 2015 at 7:07:30 PM UTC+11, Stephen Connolly wrote:
You have ensured you have at least one .jelly file? (Typically a root index.jelly with the plugin description)

On Tuesday 22 December 2015, Michael Neale <michae...@gmail.com> wrote:
I was building a plugin with a very recent parent pom of 1.639 and running the InjectedTest fails: 

Tests in error: 

  FailedTest.org.jvnet.hudson.test.JellyTestSuiteBuilder$JellyTestSuite » NoClassDefFound


org.jvnet.hudson.test.JellyTestSuiteBuilder$JellyTestSuite(org.jvnet.hudson.test.junit.FailedTest)  Time elapsed: 0.023 sec  <<< ERROR!

java.lang.NoClassDefFoundError: org/apache/http/cookie/CookieSpecProvider


It seems that there has been some change in some dependency of the jelly test suite. Has anyone else seen this? 

This is post the latest LTS so I expect few are odd enough to build against a newer parent pom, so perhaps no one has seen this yet (google search hints at that). 


The only workaround is to bypass the InjectedTest.java in the pom.xml 



--
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 jenkinsci-dev+unsubscribe@googlegroups.com.

Matthew DeTullio

unread,
Apr 16, 2016, 4:21:52 PM4/16/16
to Jenkins Developers
Ran into this today.  It's caused by a dependency conflict with org.apache.httpcomponents:httpclient.

For me, org.jenkins-ci.main:jenkins-test-harness:jar:2.1:test defined version 4.5 and a compile dependency was defining 4.2.x.  Because compile dependencies get resolved first, 4.2.x was on the classpath and jenkins-test-harness could not find the class needed from 4.5.  Solved it by excluding httpclient (and other artifacts in the org.apache.httpcomponents groupId) from the compile dependency.

Try running "mvn dependency:tree" to identify the problem location. 
Reply all
Reply to author
Forward
0 new messages