当eclipse工作台关闭时,NullPointerException

时间:2017-04-25 12:13:44

标签: java eclipse junit eclipse-plugin junit4

我正在使用BOJI(Junit)运行一些自动化测试,当测试完全运行并且它试图关闭工作台时出现以下错误

!ENTRY org.eclipse.ui 4 0 2017-04-25 14:10:23.021
!MESSAGE Error occurred during status handling
!STACK 0
java.lang.NullPointerException
at org.eclipse.ui.internal.statushandlers.StatusHandlerRegistry.<init>(StatusHandlerRegistry.java:72)
at org.eclipse.ui.internal.statushandlers.StatusHandlerRegistry.getDefault(StatusHandlerRegistry.java:91)
at org.eclipse.ui.statushandlers.StatusManager.getStatusHandler(StatusManager.java:145)
at org.eclipse.ui.statushandlers.StatusManager.handle(StatusManager.java:204)
at org.eclipse.ui.statushandlers.StatusManager.handle(StatusManager.java:246)
at org.eclipse.ui.statushandlers.StatusManager$StatusManagerLogListener.logging(StatusManager.java:317)
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.Log.log(Log.java:65)
at org.eclipse.core.internal.utils.Policy.log(Policy.java:159)
at org.eclipse.core.internal.resources.SaveManager.reportSnapshotRequestor(SaveManager.java:657)
at org.eclipse.core.internal.resources.Workspace.close(Workspace.java:575)
at org.eclipse.core.resources.ResourcesPlugin.stop(ResourcesPlugin.java:434)
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:270)
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:202)
at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule$1.run(EquinoxBundle.java:165)
at java.lang.Thread.run(Unknown Source)

这与此处报道的错误相同

https://bugs.eclipse.org/bugs/show_bug.cgi?id=460863

他们在这个帖子中提到了一些修复,但我没有得到它

任何人遇到同样的问题,解决方案是什么?

1 个答案:

答案 0 :(得分:0)

SaveManager调用工作空间上的方法关闭,跟踪指示工作空间未正常关闭。

可能是因为他们可能会锁定上述线程链进一步调用的任何资源的测试。

没有代码,所以我们不能多说这些。