I'm having the same problem. I have a plugin that's based on the email-ext. In one of the Validate buttons called from the global config page, I make use of a class that's implemented in a non-Jenkins JAR file. That JAR is referenced in the <depedencies> section of the pom.xml, it appears in the maven pre-build directory, and can be extracted from the HPI after a build. The JAR is there. But when I try to instantiate the class, I get a NoClassDefFoundError (com/company/mylibrary/MyClass) followed by a ClassNotFoundException (com.company.mylibrary.MyClass)
I'm working with pretty much the baseline email-ext code, except the addition of the Validate button. No special JNDI stuff that I'm aware of. On Wednesday, May 6, 2015 at 8:03:45 AM UTC-7, Greg Allen wrote: > > I have a plugin that creates a connection to a resource. This connection > requires some plugin-specific jar files, which are bundled up in the > .hpi file and distributed with the plugin. > > The plugin configuration includes connection information, such as URL > and authentication information. I have included a "test connection" > button there to allow the user to validate that their connection > information is connect. However, when the button is clicked and the > code is executed to validate the connection, I get a > java.lang.ClassNotFoundException. This class is in the jar files bundled > with the plugin, but these obviously aren't loaded at this point. > > Is there some standard way for handling situations like this? Do I have > to load these jars by hand? This seems like a problem that others have > probably run into. > > Thanks, > > -- Greg > -- 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/b6903095-492d-4aba-9490-4dd117dd3df6%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
