Skip to content
Commit f5a78695 authored by Jesse Glick's avatar Jesse Glick
Browse files

Null safety of Trigger.timer.

A botched startup (say by an error in InitializerFinder) can cause log to be filled with junk like:
Sep 20, 2012 1:10:50 PM hudson.ExtensionFinder$GuiceFinder instantiate
WARNING: Failed to load hudson.node_monitors.DiskSpaceMonitor
java.lang.InstantiationException: java.lang.ExceptionInInitializerError
	at net.java.sezpoz.IndexItem.instance(IndexItem.java:193)
	at hudson.ExtensionFinder$GuiceFinder.instantiate(ExtensionFinder.java:353)
	at hudson.ExtensionFinder$GuiceFinder.access$400(ExtensionFinder.java:232)
	at hudson.ExtensionFinder$GuiceFinder$SezpozModule$1.get(ExtensionFinder.java:509)
	at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:84)
	at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision(InternalFactoryToInitializableAdapter.java:52)
	at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:66)
	at com.google.inject.internal.InternalFactoryToInitializableAdapter.get(InternalFactoryToInitializableAdapter.java:45)
	at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
	at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1018)
	at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
	at com.google.inject.Scopes$1$1.get(Scopes.java:59)
	at hudson.ExtensionFinder$GuiceFinder$4$1.get(ExtensionFinder.java:420)
	at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
	at com.google.inject.internal.InjectorImpl$3$1.call(InjectorImpl.java:965)
	at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1011)
	at com.google.inject.internal.InjectorImpl$3.get(InjectorImpl.java:961)
	at hudson.ExtensionFinder$GuiceFinder._find(ExtensionFinder.java:389)
	at hudson.ExtensionFinder$GuiceFinder.find(ExtensionFinder.java:380)
	at hudson.ExtensionFinder._find(ExtensionFinder.java:149)
	at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:289)
	at hudson.ExtensionList.load(ExtensionList.java:278)
	at hudson.ExtensionList.ensureLoaded(ExtensionList.java:231)
	at hudson.ExtensionList.getComponents(ExtensionList.java:149)
	at hudson.DescriptorExtensionList.load(DescriptorExtensionList.java:182)
	at hudson.ExtensionList.ensureLoaded(ExtensionList.java:231)
	at hudson.ExtensionList.size(ExtensionList.java:157)
	at java.util.AbstractCollection.isEmpty(AbstractCollection.java:86)
	at hudson.model.labels.LabelAtom.updateTransientActions(LabelAtom.java:107)
	at hudson.model.labels.LabelAtom.load(LabelAtom.java:189)
	at jenkins.model.Jenkins.getLabelAtom(Jenkins.java:1545)
	at jenkins.model.Jenkins.getSelfLabel(Jenkins.java:2422)
	at hudson.model.Node.getAssignedLabels(Node.java:240)
	at jenkins.model.Jenkins$17.run(Jenkins.java:2499)
	at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:146)
	at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:259)
	at jenkins.model.Jenkins$7.runTask(Jenkins.java:875)
	at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:187)
	at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:94)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
	at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.ExceptionInInitializerError
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at net.java.sezpoz.IndexItem.instance(IndexItem.java:183)
	... 41 more
Caused by: java.lang.NullPointerException
	at hudson.node_monitors.AbstractNodeMonitorDescriptor.schedule(AbstractNodeMonitorDescriptor.java:73)
	at hudson.node_monitors.AbstractNodeMonitorDescriptor.<init>(AbstractNodeMonitorDescriptor.java:58)
	at hudson.node_monitors.AbstractNodeMonitorDescriptor.<init>(AbstractNodeMonitorDescriptor.java:54)
	at hudson.node_monitors.DiskSpaceMonitorDescriptor.<init>(DiskSpaceMonitorDescriptor.java:49)
	at hudson.node_monitors.DiskSpaceMonitor$1.<init>(DiskSpaceMonitor.java:62)
	at hudson.node_monitors.DiskSpaceMonitor.<clinit>(DiskSpaceMonitor.java:62)
	... 46 more
parent a885cc21
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment