Test failures on new plugin

20 views
Skip to first unread message

Simon M

unread,
Jun 5, 2017, 8:45:51 PM6/5/17
to Jenkins Users
I am in the process of writing a custom parser to work with the Warnings plugin.

For now, I have taken the second route described in the documentation: "Writing a new standalone parser that will be deployed in a new plug-in". I have written the appropriate code to extend RegexpLineParser. I may come back to that later, but for now, I am working with extending RegexpLineParser.

This now compiles, but fails during test. I have not defined any tests: I assume it's a default test that is run. Note that this is a different approach to what I was trying to do last week.

I would appreciate advice on what I need to do to resolve this.


The message is:
Running InjectedTest
Tests run: 4, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 11.704 sec <<< FAILURE! - in InjectedTest
org.jvnet.hudson.test.JellyTestSuiteBuilder$JellyTestSuite(org.jvnet.hudson.test.junit.FailedTest)  Time elapsed: 0.016 sec  <<< ERROR!
java.lang.NoClassDefFoundError: org/apache/http/config/Lookup
    at com.gargoylesoftware.htmlunit.WebClient.createWebConnection(WebClient.java:1956)
    at com.gargoylesoftware.htmlunit.WebClient.init(WebClient.java:236)
    at com.gargoylesoftware.htmlunit.WebClient.<init>(WebClient.java:211)
    at org.jvnet.hudson.test.HudsonTestCase$WebClient.<init>(HudsonTestCase.java:1486)
    at org.jvnet.hudson.test.HudsonTestCase.createWebClient(HudsonTestCase.java:1473)
    at org.jvnet.hudson.test.HudsonTestCase.executeOnServer(HudsonTestCase.java:1458)
    at org.jvnet.hudson.test.JellyTestSuiteBuilder$JellyTestSuite.runGroupedTests(JellyTestSuiteBuilder.java:157)
    at org.jvnet.hudson.test.junit.GroupedTest.run(GroupedTest.java:51)
    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.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:283)
    at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:173)
    at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
    at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:128)
    at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203)
    at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155)
    at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
Caused by: java.lang.ClassNotFoundException: org.apache.http.config.Lookup
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    at com.gargoylesoftware.htmlunit.WebClient.createWebConnection(WebClient.java:1956)
    at com.gargoylesoftware.htmlunit.WebClient.init(WebClient.java:236)
    at com.gargoylesoftware.htmlunit.WebClient.<init>(WebClient.java:211)
    at org.jvnet.hudson.test.HudsonTestCase$WebClient.<init>(HudsonTestCase.java:1486)
    at org.jvnet.hudson.test.HudsonTestCase.createWebClient(HudsonTestCase.java:1473)
    at org.jvnet.hudson.test.HudsonTestCase.executeOnServer(HudsonTestCase.java:1458)
    at org.jvnet.hudson.test.JellyTestSuiteBuilder$JellyTestSuite.runGroupedTests(JellyTestSuiteBuilder.java:157)
    at org.jvnet.hudson.test.junit.GroupedTest.run(GroupedTest.java:51)
    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.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:283)
    at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:173)
    at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
    at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:128)
    at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203)
    at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155)
    at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)


Results :

Tests in error:
  FailedTest.org.jvnet.hudson.test.JellyTestSuiteBuilder$JellyTestSuite » NoClassDefFound

Simon

Simon M

unread,
Jun 6, 2017, 2:29:31 PM6/6/17
to Jenkins Users
Anyone? Any ideas?

Slide

unread,
Jun 6, 2017, 2:35:07 PM6/6/17
to Jenkins Users
I haven't seen that issue before, can you post the link to your source code so people can take a look?

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/14d5431e-a764-4572-8670-2492a4115f97%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Stephen Connolly

unread,
Jun 6, 2017, 3:12:02 PM6/6/17
to jenkins...@googlegroups.com
Make sure you have an index.jelly giving the plugin description 


For more options, visit https://groups.google.com/d/optout.
--
Sent from my phone

Simon M

unread,
Jun 6, 2017, 3:53:05 PM6/6/17
to Jenkins Users
Thanks for the offer of help.

I have pushed my project to github:
https://github.com/SimonMatthews-BP/BPWarnings

Simon

Simon M

unread,
Jun 6, 2017, 6:22:06 PM6/6/17
to Jenkins Users
I should also note, just in case it is related that it would not build unless I commented out the "@Override" statement for the "getID()" method. Could this be related?

Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.3:compile (default-compile) on project bluepearl: Compilation failure
[ERROR] /home/simon/Plugins/BluePearlParser/src/main/java/hudson/plugins/bluepearl/RunBluePearlParser.java:[40,5] method does not override or implement a method from a supertype

Line 40 is the @Override statement.

Simon


On Monday, June 5, 2017 at 5:45:51 PM UTC-7, Simon M wrote:
Reply all
Reply to author
Forward
0 new messages