RE: Plugin can't find its own descriptor?

2013-01-30 Thread James Nord (jnord)
> > java.lang.NullPointerException
> >at
> > hudson.model.AbstractDescribableImpl.getDescriptor(AbstractDescribable
> > Impl.java:35)
> 
> Jenkins.getInstance() is null. Perhaps Jenkins is shutting down?

Hmmm  I did update a couple of plugins and hit "restart when no jobs are 
running"  but this job was running then so it shouldn't have shutdown until 
after the job finished.

However looking that the rest of the build logs the build seems to have 
abruptly terminated part way though so you may well be correct - and the 
restart when no jobs are running may be "restart when I feel like it"  and I 
will probably go back to plugin updated by hand (copy hpi, restart service)

> > is there any known issue in core around this area?
> 
> Generally there are occasional race conditions involving app==null,
> frequently seen during shutdown. It is probably impossible to improve null
> safety here since this API uses the singleton pattern rather than dependency
> injection.


-- 
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-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Plugin can't find its own descriptor?

2013-01-30 Thread Jesse Glick

On 01/30/2013 06:49 AM, James Nord (jnord) wrote:

java.lang.NullPointerException
   at 
hudson.model.AbstractDescribableImpl.getDescriptor(AbstractDescribableImpl.java:35)


Jenkins.getInstance() is null. Perhaps Jenkins is shutting down?


is there any known issue in core around this area?


Generally there are occasional race conditions involving app==null, frequently seen during shutdown. It is probably impossible to improve null safety here since this API 
uses the singleton pattern rather than dependency injection.


(kutzi: the stack trace seems to indicate that the code is being run from 
master, not in a slave VM.)

--
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-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




RE: Plugin can't find its own descriptor?

2013-01-30 Thread James Nord (jnord)
We only run jobs on slaves and the master has no executors, so would this code 
not reliably hit this issue if it was a master/slave issue?

/James

From: jenkinsci-dev@googlegroups.com [mailto:jenkinsci-dev@googlegroups.com] On 
Behalf Of Christoph Kutzinski
Sent: 30 January 2013 11:55
To: jenkinsci-dev@googlegroups.com
Subject: Aw: Plugin can't find its own descriptor?

I'm not sure but maybe the code part where you are is running in the forked 
Java VM for the Maven build where the descriptors would be null - AFAIK.

You need to do your work in a callable which executes the code on the master.
Gesendet: Mittwoch, 30. Januar 2013 um 12:49 Uhr
Von: "James Nord (jnord)" mailto:jn...@cisco.com>>
An: "jenkinsci-dev@googlegroups.com" 
mailto:jenkinsci-dev@googlegroups.com>>
Betreff: Plugin can't find its own descriptor?
Hi all,

I got a really bizarre stacktrace from my plugin overnight (m2release 0.9.1, 
Jenkins 1.466.2+JENKINS-15382).

ERROR: Processing failed due to a bug in the code. Please report this to 
jenkinsci-us...@googlegroups.com
java.lang.NullPointerException
  at 
hudson.model.AbstractDescribableImpl.getDescriptor(AbstractDescribableImpl.java:35)
  at 
org.jvnet.hudson.plugins.m2release.M2ReleaseBuildWrapper.getDescriptor(M2ReleaseBuildWrapper.java:395)
  at 
org.jvnet.hudson.plugins.m2release.M2ReleaseBuildWrapper$2.tearDown(M2ReleaseBuildWrapper.java:234)
  at 
hudson.maven.MavenModuleSetBuild$RunnerImpl.doRun(MavenModuleSetBuild.java:817)
  at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:480)
  at hudson.model.Run.run(Run.java:1438)
  at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:477)
  at hudson.model.ResourceController.execute(ResourceController.java:88)
  at hudson.model.Executor.run(Executor.java:239)

But this occurs at the end of the job during the plugin environments teardown

But what I don't understand is how the plugin can be used in a job if its main 
descriptor can't be found, and this was a once off as subsequent releases are 
fine...

Anyone any clues - is there any know issues in core around this area?

/James
--
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-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
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-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


-- 
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-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.