StaplerProxy getTarget

8 views
Skip to first unread message

Ullrich Hafner

unread,
Dec 14, 2021, 7:14:01 PM12/14/21
to JenkinsCI Developers
I am implementing StaplerProxy for some of my detail views. When I am returning a new view object in the getTarget method that is part of my plugin then everything shows up correctly. When I return an object from another plugin I get a 404 error. Is this some restriction (class loader?) that I cannot return objects from other plugins?

(Code https://github.com/jenkinsci/warnings-ng-plugin/pull/1145/)

Daniel Beck

unread,
Dec 15, 2021, 4:21:53 AM12/15/21
to jenkin...@googlegroups.com


On Wed, Dec 15, 2021 at 1:13 AM Ullrich Hafner <ullrich...@gmail.com> wrote: 
(Code https://github.com/jenkinsci/warnings-ng-plugin/pull/1145/)

Is this the correct PR? Looking at the plugin, only ResultAction has a getTarget returning an IssuesDetail, and neither is involved in the PR.

Ullrich Hafner

unread,
Dec 15, 2021, 6:06:30 AM12/15/21
to JenkinsCI Developers
I found the problem. Seems that during my merge the index.jelly file has been deleted. 

It would be nice though if Stapler would actually print the thing that is not found rather than writing just "Not Found“.
Sorry, this was indeed the wrong PR. I should not write mails after midnight :-(


--
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 jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CAMo7PtLNhNKk1ZN162Lp0nATWw%2BUZD6DbW_CdfQQwk%3DN_P5Qug%40mail.gmail.com.

Daniel Beck

unread,
Dec 15, 2021, 6:32:56 AM12/15/21
to jenkin...@googlegroups.com
On Wed, Dec 15, 2021 at 12:06 PM Ullrich Hafner <ullrich...@gmail.com> wrote:
I found the problem. Seems that during my merge the index.jelly file has been deleted. 

It would be nice though if Stapler would actually print the thing that is not found rather than writing just "Not Found“.

Set stapler.trace to get more debug information, both in response headers and on 404 error pages. See #isTraceEnabled and fields of https://javadoc.jenkins.io/component/stapler/org/kohsuke/stapler/Dispatcher.html

That wouldn't help all that much in this case, because Stapler doesn't know whether index.jelly (or index.groovy) is missing, or whether a doIndex method is missing (or perhaps even whether you intended to return a different type).
Reply all
Reply to author
Forward
0 new messages