Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Hudson » Plugin NoClassDefFoundError
Plugin NoClassDefFoundError [message #1292153] Fri, 11 April 2014 15:12 Go to next message
michael baron is currently offline michael baronFriend
Messages: 3
Registered: April 2014
Junior Member
Hi, I have a plugin that I've been developing that I import:

import org.jfree.data.general.DefaultPieDataset;


To create a graph, this works fine in Jenkins, but in Hudson I get:

FATAL: org/jfree/data/general/PieDataset
java.lang.NoClassDefFoundError: org/jfree/data/general/PieDataset
         at com.me.hudson.plugins.myplugin.Publisher.perform(Publisher.java:138)
         at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:51)
         at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:736)
         at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:714)
         at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:690)
         at hudson.model.Build$RunnerImpl.post2(Build.java:163)
         at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:652)
         at hudson.model.Run.run(Run.java:1474)
         at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:44)
         at hudson.model.ResourceController.execute(ResourceController.java:82)
         at hudson.model.Executor.run(Executor.java:137)
Caused by: java.lang.ClassNotFoundException: org.jfree.data.general.PieDataset
         at org.aspectj.weaver.bcel.ExtensibleURLClassLoader.findClass(ExtensibleURLClassLoader.java:54)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
         ... 11 more


So I thought something must be off with the dependencies, commenting out this import and code using it solves the issue, but then I get the same with: hudson.util.Graph;

so now im confused... any ideas? also using 3.1.2 hudson
Re: Plugin NoClassDefFoundError [message #1292298 is a reply to message #1292153] Fri, 11 April 2014 17:59 Go to previous messageGo to next message
Winston Prakash is currently offline Winston PrakashFriend
Messages: 534
Registered: August 2011
Location: Fremont, CA USA
Senior Member
Hudson graphing interface is abstracted to use jfreechart or any other graphing technology. jfreechart is move to a plugin. If you want to use jfreechart, then add jfreechart-plugin as dependency to your plugin

<dependency>
    <groupId>org.hudsonci.plugins</groupId>
    <artifactId>jfreechart-plugin</artifactId>
    <version>1.5</version>
</dependency>




Winston Prakash
Eclipse Hudson team
Re: Plugin NoClassDefFoundError [message #1295740 is a reply to message #1292298] Mon, 14 April 2014 14:45 Go to previous messageGo to next message
michael baron is currently offline michael baronFriend
Messages: 3
Registered: April 2014
Junior Member
Thanks, that resolved that issue, but now its bumped into the same for:

hudson.util.Graph


I tried adding:

<dependency>
    <groupId>org.jvnet.hudson.main</groupId>
    <artifactId>hudson-core</artifactId>
    <version>2.2.1</version>
</dependency>


But now I get the error:

error: javax.annotation.processing.FilerException: Attempt to reopen a file for path ConfigFailNew.stapler


Just looking to see if im going down the right path here?
Re: Plugin NoClassDefFoundError [message #1319909 is a reply to message #1295740] Mon, 28 April 2014 13:13 Go to previous messageGo to next message
michael baron is currently offline michael baronFriend
Messages: 3
Registered: April 2014
Junior Member
Anyone got any ideas here?
Re: Plugin NoClassDefFoundError [message #1320306 is a reply to message #1319909] Mon, 28 April 2014 18:15 Go to previous message
Winston Prakash is currently offline Winston PrakashFriend
Messages: 534
Registered: August 2011
Location: Fremont, CA USA
Senior Member
Hi Michael, hudson.util.Graph is part of the jfreechart-plugin, if you include that plugin as your dependency your plugin should build fine. Do not directly add core as dependency. BTW, if your plugin is somewhere in github I can take a look at it.

Feel free to write to me directly at winston DOT prakash AT gmail


Winston Prakash
Eclipse Hudson team
Previous Topic:Hudson slaves killed (3.1.2 update)
Next Topic:Problems installing and using Hudson 3.1.2
Goto Forum:
  


Current Time: Tue Mar 19 07:49:44 GMT 2024

Powered by FUDForum. Page generated in 0.06475 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top