[jbosstools-issues] [JBoss JIRA] (JBDS-4228) NPE in log while executing JBDS Openshift test

Andre Dietisheim (JIRA) issues at jboss.org
Wed Dec 21 05:28:00 EST 2016


    [ https://issues.jboss.org/browse/JBDS-4228?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13341099#comment-13341099 ] 

Andre Dietisheim edited comment on JBDS-4228 at 12/21/16 5:27 AM:
------------------------------------------------------------------

The problem here looks like JVMProblem model trying to schedule a job, while the Eclipse is shutting down:
{code:title=JVMProblemModel#scheduleDetectorJob}
	public void scheduleDetectorJob() {
		if( job != null )
			job.schedule();
	}
{code}
IMHO there's not much that can be done but to swallow the exception.

Then there's another problem with a NPE in RuntimeWorkbenchUtils#refreshServersView when it tries to get the active page from the active workbench window. Eclipse seems to shut down, so there're no such things any more.
{code:title=RuntimeWorkbenchUtils#refreshServersView}
IViewPart view = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().findView("org.eclipse.wst.server.ui.ServersView"); //$NONE-NLS-1$ //$NON-NLS-1$
{code}
The code tries to check for the workbench to be running, but this is done before scheduling in an async way so that it can still occurr when the runnable is exectued. I believe that the check needs to be done within the runnable:
{code:title=RuntimeWorkbenchUtils#refreshServersView}
		// https://jira.jboss.org/jira/browse/JBDS-1091
		if (!PlatformUI.isWorkbenchRunning()) {
			return;
		}
		Display.getDefault().asyncExec(new Runnable() {
			public void run() {
{code}


was (Author: adietish):
The problem here looks like JVMProblem model trying to schedule a job, while the Eclipse is shutting down:
{code:title=JVMProblemModel#scheduleDetectorJob}
	public void scheduleDetectorJob() {
		if( job != null )
			job.schedule();
	}
{code}
IMHO there's not much that can be done but to swallow the exception.

Then there's another problem with a NPE in RuntimeWorkbenchUtils#refreshServersView when it tries to get the active page from the active workbench window. Eclipse seems to shut down, so there're no such things any more.
{code:title=RuntimeWorkbenchUtils#refreshServersView}
IViewPart view = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().findView("org.eclipse.wst.server.ui.ServersView"); //$NONE-NLS-1$ //$NON-NLS-1$
{code}
The code tries to check for the workbench to be running, but this is before scheduling. The would be more effective if done in the scheduled code:
{code:title=RuntimeWorkbenchUtils#refreshServersView}
		// https://jira.jboss.org/jira/browse/JBDS-1091
		if (!PlatformUI.isWorkbenchRunning()) {
			return;
		}
		Display.getDefault().asyncExec(new Runnable() {
			public void run() {
{code}

> NPE in log while executing JBDS Openshift test
> ----------------------------------------------
>
>                 Key: JBDS-4228
>                 URL: https://issues.jboss.org/browse/JBDS-4228
>             Project: Red Hat JBoss Developer Studio (devstudio)
>          Issue Type: Bug
>          Components: foundation, runtime
>            Reporter: Aurélien Pupier
>            Priority: Minor
>
> it occurs on module org.jboss.tools.openshift.cdk.server.test
> {noformat}
> Caught unexpected exception during test framework shutdown
> org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.NullPointerException)
> 	at org.eclipse.swt.SWT.error(SWT.java:4533)
> 	at org.eclipse.swt.SWT.error(SWT.java:4448)
> 	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:185)
> 	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4203)
> 	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3819)
> 	at org.eclipse.swt.widgets.Display.release(Display.java:3873)
> 	at org.eclipse.swt.graphics.Device.dispose(Device.java:298)
> 	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:154)
> 	at org.eclipse.tycho.surefire.osgibooter.UITestApplication.runApplication(UITestApplication.java:31)
> 	at org.eclipse.tycho.surefire.osgibooter.AbstractUITestApplication.run(AbstractUITestApplication.java:120)
> 	at org.eclipse.tycho.surefire.osgibooter.UITestApplication.start(UITestApplication.java:37)
> 	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
> 	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
> 	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
> 	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
> 	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:497)
> 	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673)
> 	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610)
> 	at org.eclipse.equinox.launcher.Main.run(Main.java:1519)
> 	at org.eclipse.equinox.launcher.Main.main(Main.java:1492)
> Caused by: java.lang.NullPointerException
> 	at org.jboss.tools.runtime.ui.internal.RuntimeWorkbenchUtils$1.run(RuntimeWorkbenchUtils.java:31)
> 	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
> 	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:182)
> 	... 21 more
> java.lang.IllegalStateException: Job manager has been shut down.
> 	at org.eclipse.core.internal.jobs.JobManager.schedule(JobManager.java:1240)
> 	at org.eclipse.core.internal.jobs.InternalJob.schedule(InternalJob.java:382)
> 	at org.eclipse.core.runtime.jobs.Job.schedule(Job.java:641)
> 	at org.jboss.tools.foundation.checkup.internal.model.JVMProblemModel.scheduleDetectorJob(JVMProblemModel.java:83)
> 	at org.jboss.tools.foundation.checkup.internal.log.JVMProblemLogListener.logging(JVMProblemLogListener.java:49)
> 	at org.eclipse.core.internal.runtime.RuntimeLog.logToListeners(RuntimeLog.java:161)
> 	at org.eclipse.core.internal.runtime.PlatformLogWriter.logged(PlatformLogWriter.java:103)
> 	at org.eclipse.osgi.internal.log.ExtendedLogReaderServiceFactory.safeLogged(ExtendedLogReaderServiceFactory.java:88)
> 	at org.eclipse.osgi.internal.log.ExtendedLogReaderServiceFactory.logPrivileged(ExtendedLogReaderServiceFactory.java:217)
> 	at org.eclipse.osgi.internal.log.ExtendedLogReaderServiceFactory.log(ExtendedLogReaderServiceFactory.java:189)
> 	at org.eclipse.osgi.internal.log.ExtendedLogServiceFactory.log(ExtendedLogServiceFactory.java:65)
> 	at org.eclipse.osgi.internal.log.ExtendedLogServiceImpl.log(ExtendedLogServiceImpl.java:87)
> 	at org.eclipse.osgi.internal.log.LoggerImpl.log(LoggerImpl.java:54)
> 	at org.eclipse.core.internal.runtime.PlatformLogWriter.logging(PlatformLogWriter.java:44)
> 	at org.eclipse.core.internal.runtime.RuntimeLog.log(RuntimeLog.java:97)
> 	at org.eclipse.core.internal.jobs.JobManager.doShutdown(JobManager.java:652)
> 	at org.eclipse.core.internal.jobs.JobManager.shutdown(JobManager.java:277)
> 	at org.eclipse.core.internal.jobs.JobActivator.stop(JobActivator.java:57)
> 	at org.eclipse.osgi.internal.framework.BundleContextImpl$4.run(BundleContextImpl.java:830)
> 	at org.eclipse.osgi.internal.framework.BundleContextImpl$4.run(BundleContextImpl.java:1)
> 	at java.security.AccessController.doPrivileged(Native Method)
> 	at org.eclipse.osgi.internal.framework.BundleContextImpl.stop(BundleContextImpl.java:823)
> 	at org.eclipse.osgi.internal.framework.EquinoxBundle.stopWorker0(EquinoxBundle.java:946)
> 	at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.stopWorker(EquinoxBundle.java:314)
> 	at org.eclipse.osgi.container.Module.doStop(Module.java:636)
> 	at org.eclipse.osgi.container.Module.stop(Module.java:498)
> 	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.decStartLevel(ModuleContainer.java:1661)
> 	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1580)
> 	at org.eclipse.osgi.container.SystemModule.stopWorker(SystemModule.java:253)
> 	at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule.stopWorker(EquinoxBundle.java:147)
> 	at org.eclipse.osgi.container.Module.doStop(Module.java:636)
> 	at org.eclipse.osgi.container.Module.stop(Module.java:498)
> 	at org.eclipse.osgi.container.SystemModule.stop(SystemModule.java:191)
> 	at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule$1.run(EquinoxBundle.java:165)
> 	at java.lang.Thread.run(Thread.java:745)
> Job found still running after platform shutdown.  Jobs should be canceled by the plugin that scheduled them during shutdown: org.eclipse.ui.internal.progress.TaskBarProgressManager$2
> java.lang.IllegalStateException: Job manager has been shut down.
> 	at org.eclipse.core.internal.jobs.JobManager.schedule(JobManager.java:1240)
> 	at org.eclipse.core.internal.jobs.InternalJob.schedule(InternalJob.java:382)
> 	at org.eclipse.core.runtime.jobs.Job.schedule(Job.java:641)
> 	at org.jboss.tools.foundation.checkup.internal.model.JVMProblemModel.scheduleDetectorJob(JVMProblemModel.java:83)
> 	at org.jboss.tools.foundation.checkup.internal.log.JVMProblemLogListener.logging(JVMProblemLogListener.java:49)
> 	at org.eclipse.core.internal.runtime.RuntimeLog.logToListeners(RuntimeLog.java:161)
> 	at org.eclipse.core.internal.runtime.PlatformLogWriter.logged(PlatformLogWriter.java:103)
> 	at org.eclipse.osgi.internal.log.ExtendedLogReaderServiceFactory.safeLogged(ExtendedLogReaderServiceFactory.java:88)
> 	at org.eclipse.osgi.internal.log.ExtendedLogReaderServiceFactory.logPrivileged(ExtendedLogReaderServiceFactory.java:217)
> 	at org.eclipse.osgi.internal.log.ExtendedLogReaderServiceFactory.log(ExtendedLogReaderServiceFactory.java:189)
> 	at org.eclipse.osgi.internal.log.ExtendedLogServiceFactory.log(ExtendedLogServiceFactory.java:65)
> 	at org.eclipse.osgi.internal.log.ExtendedLogServiceImpl.log(ExtendedLogServiceImpl.java:87)
> 	at org.eclipse.osgi.internal.log.LoggerImpl.log(LoggerImpl.java:54)
> 	at org.eclipse.core.internal.runtime.PlatformLogWriter.logging(PlatformLogWriter.java:44)
> 	at org.eclipse.core.internal.runtime.RuntimeLog.log(RuntimeLog.java:97)
> 	at org.eclipse.core.internal.jobs.JobManager.doShutdown(JobManager.java:652)
> 	at org.eclipse.core.internal.jobs.JobManager.shutdown(JobManager.java:277)
> 	at org.eclipse.core.internal.jobs.JobActivator.stop(JobActivator.java:57)
> 	at org.eclipse.osgi.internal.framework.BundleContextImpl$4.run(BundleContextImpl.java:830)
> 	at org.eclipse.osgi.internal.framework.BundleContextImpl$4.run(BundleContextImpl.java:1)
> 	at java.security.AccessController.doPrivileged(Native Method)
> 	at org.eclipse.osgi.internal.framework.BundleContextImpl.stop(BundleContextImpl.java:823)
> 	at org.eclipse.osgi.internal.framework.EquinoxBundle.stopWorker0(EquinoxBundle.java:946)
> 	at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.stopWorker(EquinoxBundle.java:314)
> 	at org.eclipse.osgi.container.Module.doStop(Module.java:636)
> 	at org.eclipse.osgi.container.Module.stop(Module.java:498)
> 	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.decStartLevel(ModuleContainer.java:1661)
> 	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1580)
> 	at org.eclipse.osgi.container.SystemModule.stopWorker(SystemModule.java:253)
> 	at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule.stopWorker(EquinoxBundle.java:147)
> 	at org.eclipse.osgi.container.Module.doStop(Module.java:636)
> 	at org.eclipse.osgi.container.Module.stop(Module.java:498)
> 	at org.eclipse.osgi.container.SystemModule.stop(SystemModule.java:191)
> 	at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule$1.run(EquinoxBundle.java:165)
> 	at java.lang.Thread.run(Thread.java:745)
> Job found still running after platform shutdown.  Jobs should be canceled by the plugin that scheduled them during shutdown: org.eclipse.ui.internal.decorators.DecorationScheduler$3
> java.lang.IllegalStateException: Job manager has been shut down.
> 	at org.eclipse.core.internal.jobs.JobManager.schedule(JobManager.java:1240)
> 	at org.eclipse.core.internal.jobs.InternalJob.schedule(InternalJob.java:382)
> 	at org.eclipse.core.runtime.jobs.Job.schedule(Job.java:641)
> 	at org.jboss.tools.foundation.checkup.internal.model.JVMProblemModel.scheduleDetectorJob(JVMProblemModel.java:83)
> 	at org.jboss.tools.foundation.checkup.internal.log.JVMProblemLogListener.logging(JVMProblemLogListener.java:49)
> 	at org.eclipse.core.internal.runtime.RuntimeLog.logToListeners(RuntimeLog.java:161)
> 	at org.eclipse.core.internal.runtime.PlatformLogWriter.logged(PlatformLogWriter.java:103)
> 	at org.eclipse.osgi.internal.log.ExtendedLogReaderServiceFactory.safeLogged(ExtendedLogReaderServiceFactory.java:88)
> 	at org.eclipse.osgi.internal.log.ExtendedLogReaderServiceFactory.logPrivileged(ExtendedLogReaderServiceFactory.java:217)
> 	at org.eclipse.osgi.internal.log.ExtendedLogReaderServiceFactory.log(ExtendedLogReaderServiceFactory.java:189)
> 	at org.eclipse.osgi.internal.log.ExtendedLogServiceFactory.log(ExtendedLogServiceFactory.java:65)
> 	at org.eclipse.osgi.internal.log.ExtendedLogServiceImpl.log(ExtendedLogServiceImpl.java:87)
> 	at org.eclipse.osgi.internal.log.LoggerImpl.log(LoggerImpl.java:54)
> 	at org.eclipse.core.internal.runtime.PlatformLogWriter.logging(PlatformLogWriter.java:44)
> 	at org.eclipse.core.internal.runtime.RuntimeLog.log(RuntimeLog.java:97)
> 	at org.eclipse.core.internal.jobs.JobManager.doShutdown(JobManager.java:652)
> 	at org.eclipse.core.internal.jobs.JobManager.shutdown(JobManager.java:277)
> 	at org.eclipse.core.internal.jobs.JobActivator.stop(JobActivator.java:57)
> 	at org.eclipse.osgi.internal.framework.BundleContextImpl$4.run(BundleContextImpl.java:830)
> 	at org.eclipse.osgi.internal.framework.BundleContextImpl$4.run(BundleContextImpl.java:1)
> 	at java.security.AccessController.doPrivileged(Native Method)
> 	at org.eclipse.osgi.internal.framework.BundleContextImpl.stop(BundleContextImpl.java:823)
> 	at org.eclipse.osgi.internal.framework.EquinoxBundle.stopWorker0(EquinoxBundle.java:946)
> 	at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.stopWorker(EquinoxBundle.java:314)
> 	at org.eclipse.osgi.container.Module.doStop(Module.java:636)
> 	at org.eclipse.osgi.container.Module.stop(Module.java:498)
> 	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.decStartLevel(ModuleContainer.java:1661)
> 	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1580)
> 	at org.eclipse.osgi.container.SystemModule.stopWorker(SystemModule.java:253)
> 	at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule.stopWorker(EquinoxBundle.java:147)
> 	at org.eclipse.osgi.container.Module.doStop(Module.java:636)
> 	at org.eclipse.osgi.container.Module.stop(Module.java:498)
> 	at org.eclipse.osgi.container.SystemModule.stop(SystemModule.java:191)
> 	at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule$1.run(EquinoxBundle.java:165)
> 	at java.lang.Thread.run(Thread.java:745)
> Job found still running after platform shutdown.  Jobs should be canceled by the plugin that scheduled them during shutdown: org.eclipse.ui.internal.progress.AnimationManager$1
> java.lang.IllegalStateException: Job manager has been shut down.
> 	at org.eclipse.core.internal.jobs.JobManager.schedule(JobManager.java:1240)
> 	at org.eclipse.core.internal.jobs.InternalJob.schedule(InternalJob.java:382)
> 	at org.eclipse.core.runtime.jobs.Job.schedule(Job.java:641)
> 	at org.jboss.tools.foundation.checkup.internal.model.JVMProblemModel.scheduleDetectorJob(JVMProblemModel.java:83)
> 	at org.jboss.tools.foundation.checkup.internal.log.JVMProblemLogListener.logging(JVMProblemLogListener.java:49)
> 	at org.eclipse.core.internal.runtime.RuntimeLog.logToListeners(RuntimeLog.java:161)
> 	at org.eclipse.core.internal.runtime.PlatformLogWriter.logged(PlatformLogWriter.java:103)
> 	at org.eclipse.osgi.internal.log.ExtendedLogReaderServiceFactory.safeLogged(ExtendedLogReaderServiceFactory.java:88)
> 	at org.eclipse.osgi.internal.log.ExtendedLogReaderServiceFactory.logPrivileged(ExtendedLogReaderServiceFactory.java:217)
> 	at org.eclipse.osgi.internal.log.ExtendedLogReaderServiceFactory.log(ExtendedLogReaderServiceFactory.java:189)
> 	at org.eclipse.osgi.internal.log.ExtendedLogServiceFactory.log(ExtendedLogServiceFactory.java:65)
> 	at org.eclipse.osgi.internal.log.ExtendedLogServiceImpl.log(ExtendedLogServiceImpl.java:87)
> 	at org.eclipse.osgi.internal.log.LoggerImpl.log(LoggerImpl.java:54)
> 	at org.eclipse.core.internal.runtime.PlatformLogWriter.logging(PlatformLogWriter.java:44)
> 	at org.eclipse.core.internal.runtime.RuntimeLog.log(RuntimeLog.java:97)
> 	at org.eclipse.core.internal.jobs.JobManager.doShutdown(JobManager.java:652)
> 	at org.eclipse.core.internal.jobs.JobManager.shutdown(JobManager.java:277)
> 	at org.eclipse.core.internal.jobs.JobActivator.stop(JobActivator.java:57)
> 	at org.eclipse.osgi.internal.framework.BundleContextImpl$4.run(BundleContextImpl.java:830)
> 	at org.eclipse.osgi.internal.framework.BundleContextImpl$4.run(BundleContextImpl.java:1)
> 	at java.security.AccessController.doPrivileged(Native Method)
> 	at org.eclipse.osgi.internal.framework.BundleContextImpl.stop(BundleContextImpl.java:823)
> 	at org.eclipse.osgi.internal.framework.EquinoxBundle.stopWorker0(EquinoxBundle.java:946)
> 	at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.stopWorker(EquinoxBundle.java:314)
> 	at org.eclipse.osgi.container.Module.doStop(Module.java:636)
> 	at org.eclipse.osgi.container.Module.stop(Module.java:498)
> 	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.decStartLevel(ModuleContainer.java:1661)
> 	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1580)
> 	at org.eclipse.osgi.container.SystemModule.stopWorker(SystemModule.java:253)
> 	at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule.stopWorker(EquinoxBundle.java:147)
> 	at org.eclipse.osgi.container.Module.doStop(Module.java:636)
> 	at org.eclipse.osgi.container.Module.stop(Module.java:498)
> 	at org.eclipse.osgi.container.SystemModule.stop(SystemModule.java:191)
> 	at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule$1.run(EquinoxBundle.java:165)
> 	at java.lang.Thread.run(Thread.java:745)
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.2.3#72005)



More information about the jbosstools-issues mailing list