Skip to content

Inadequate error reporting from ChildLoader#548

Merged
jglick merged 2 commits intojenkinsci:masterfrom
jglick:ChildLoader-logging
Nov 5, 2025
Merged

Inadequate error reporting from ChildLoader#548
jglick merged 2 commits intojenkinsci:masterfrom
jglick:ChildLoader-logging

Conversation

@jglick
Copy link
Member

@jglick jglick commented Nov 5, 2025

While debugging an error related to #518 I noticed that Jenkins was by default printing a single-line warning

WARNING	c.c.h.plugins.folder.ChildLoader#loadItem: could not load …/jobs/xxx due to java.io.IOException: Unable to read …/jobs/xxx/config.xml

which is not exactly helpful for diagnosis! With this patch you can see that the full stack trace does in fact end with

…
Caused: java.io.IOException: Unable to read …/jobs/xxx/config.xml
	at hudson.XmlFile.read(XmlFile.java:167)
	at PluginClassLoader for cloudbees-folder//com.cloudbees.hudson.plugins.folder.ChildLoader.loadItem(ChildLoader.java:82)
…

but you can also see the actual error as processed by XStream.

The problem actually dates to #475 by @gbhat618. In that case the stack trace was uninteresting, but clearly it overshot the goal.

@jglick jglick added bug and removed enhancement labels Nov 5, 2025
@jglick jglick changed the title Better error reporting from ChildLoader Inadequate error reporting from ChildLoader Nov 5, 2025
@jglick jglick marked this pull request as ready for review November 5, 2025 15:12
@jglick jglick requested a review from a team as a code owner November 5, 2025 15:12
@jglick jglick merged commit a7888eb into jenkinsci:master Nov 5, 2025
17 checks passed
@jglick jglick deleted the ChildLoader-logging branch November 5, 2025 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants