Bug 403164 - Unable to find class 'org.jenkinsci.plugins.tokenmacro.DataBoundTokenMacro' in repository
Summary: Unable to find class 'org.jenkinsci.plugins.tokenmacro.DataBoundTokenMacro' i...
Status: ASSIGNED
Alias: None
Product: Hudson
Classification: Technology
Component: Plugins (show other bugs)
Version: 3.0.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Bob Foster CLA
QA Contact: Geoff Waymark CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-13 06:41 EDT by Florian Schneider CLA
Modified: 2013-03-15 14:15 EDT (History)
2 users (show)

See Also:


Attachments
Stacktrace of ClassNotFoundException (7.92 KB, text/plain)
2013-03-13 06:41 EDT, Florian Schneider CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Schneider CLA 2013-03-13 06:41:36 EDT
Created attachment 228335 [details]
Stacktrace of ClassNotFoundException

Some part of Hudson, and I was not able to determine which one, seems to have a dependency to a Jenkins component: org.jenkinsci.plugins.tokenmacro.DataBoundTokenMacro 

My first guess would be that it is a plugin that is being maintained for both platforms. See attached stacktrace for details.
Comment 1 Florian Schneider CLA 2013-03-14 06:44:42 EDT
Ulli Hafner, maintainer of the analysis-core plugin suggests I should discuss the issue with the Hudson team.

https://issues.jenkins-ci.org/browse/JENKINS-17210
Comment 2 Florian Schneider CLA 2013-03-14 06:46:07 EDT
when checking the manifest files of the plugins in .hudson/plugins , I find several plugins that do not optionally depend on version 1.6-h-1 , but 1.1 . Could that be a hint?
Comment 3 Florian Schneider CLA 2013-03-14 07:20:38 EDT
I installed the token-macro plugin 1.6-h-1 for hudson now. Will keep you updated whether this helped. Upon startup of hudson (where plugins are loaded) the error does not occur anymore. So the dependency does not seem to be optional.
Comment 4 Winston Prakash CLA 2013-03-14 12:10:00 EDT
(In reply to comment #3)
Hi Florian, we released token-macro plugin 1.6-h-1 for this purpose. If token macro is optional, when you installing it may not get installed. If it is not optional then it must be installed by the dependent plugin.

Let us know after installing token-macro-plugin 1.6-h-1 if it works for you.

I've assigned this to Bob, who is the maintainer of static analysis plugins on the Hudson side.
Comment 5 Florian Schneider CLA 2013-03-14 13:20:51 EDT
It works. But I still don't get how the error could occur. All plugins that were installed only had an optional dependency to either token-macro 1.1 or 1.6-h-1. But the error went away only after installing the token-macro plugin.
Comment 6 Bob Foster CLA 2013-03-14 13:42:28 EDT
It would seem that the dependency is not really optional in at least one of the plugins, i.e., it uses token-macro unconditionally. It would help if you could isolate the issue to a single plugin, perhaps by examining the stack trace when the error occurs.

I would prefer to fix the plugin than to just close this because there is a workaround. Thanks!
Comment 7 Florian Schneider CLA 2013-03-15 02:20:59 EDT
What is wrong with the stacktrace I attached? ;-)

Speaking of it, I did not find any hint regarding a concrete plugin in that stack trace, because it seems to be issued when the plugin manager is loading plugins. I could however provide you with the list of plugins that have an optional dependency to token-macro. 

Will I be able to uninstall that not-so-optional token-macro plugin should the bug be fixed?
Comment 8 Florian Schneider CLA 2013-03-15 04:18:56 EDT
Here is the information extracted from the plugins directory of my current Hudson installation:

tasks, analysis-collector, check style, warnings, and pmd plugins still depend on token-macro 1.1. Maybe these are good candidates for being not so optional.

./tasks/META-INF/MANIFEST.MF: token-macro:1.1;resolution:=optional
--
./analysis-collector/META-INF/MANIFEST.MF: token-macro:1.1;resolution:=optional
--
./checkstyle/META-INF/MANIFEST.MF: token-macro:1.1;resolution:=optional
--
./warnings/META-INF/MANIFEST.MF: token-macro:1.1;resolution:=optional
--
./pmd/META-INF/MANIFEST.MF: token-macro:1.1;resolution:=optional


--
./findbugs/META-INF/MANIFEST.MF: token-macro:1.6-h-1;resolution:=optional
--
./analysis-core/META-INF/MANIFEST.MF:  token-macro:1.6-h-1;resolution:=optional
Comment 9 Bob Foster CLA 2013-03-15 14:15:22 EDT
"What is wrong with the stacktrace I attached? ;-)"

No context. If an exception occurs during plugin loading or initialization it usually makes the load fail, which logs a clear error message.

I'll assume that you are using the latest version of the plugins you list and test them all for load failure.

Well, yes, you'll be able to not explicitly install tokenmacro, but if the fix is to remove the optional qualification, it will be loaded nonetheless.