logo       

Re: Jelly Errors / Debug Advice?: msg#00092

java.hudson.user

Subject: Re: Jelly Errors / Debug Advice?


Thanks for filing this as a bug, and here's how you usually debug this.

First, the ultimate root cause of this is NPE in Hudson code.

> java.lang.NullPointerException
> at hudson.Functions.isMultiline(Functions.java:312)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

Then Jelly reports that as:

[WARN] JexlExpression - -Caught exception evaluating: h.isMultiline(
attrs.value). Reason: java.lang.NullPointerException <
java.lang.NullPointerException>

... so you know where (although limited) the exception happened. I guess it would be really nice if Jelly can report the file name and line number where this happened, and all the jelly script "call stack" leading up to this point --- I'll see if I can make that change.

In the mean time, if you need that information, you either needs to run this in the debugger (the doc contains an explanation of how to do it.) Or often a simple grepping gets you where you have the code.

Eric Crahen wrote:
I'm venturing into writing plugins for the first time, so I'm just starting
to learn how the global.jelly and config.jelly's work. This is my first time
playing with jelly so its all a learning experience for me.

After activating the HelloWorld plugin, I've noticed that when I go into the
Job Configuration screen, it renders correctly - but I sometimes see the
error below depending on what I've done to the file. For example, if I
comment out the body of the xml so its just the opening and closing j:jelly
tag, or if I actually remove the configure.jelly file altogether. I only
know the problem has to do with this file because of the screen it happens
on and when I see errors on stderr (and because I'm only changing one thing
at a time)

From the error, I really don't know what is wrong - or what file is there. I
can deduce the file with the problem through the means above, but I haven't
yet learned what is expected. I'm guessing it must be the missing f:entry
tag. I'll figure it out shortly, but I'm wondering if there are some
techniques to better debug this kind of stuff that you've developed through
your experience in creating the built-in jelly components?


--
Kohsuke Kawaguchi
Sun Microsystems kohsuke.kawaguchi@xxxxxxx

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise