eclipse serves Could not create the view: An unexpected exception was thrown.

eclipse经常出现这个报错,比如在项目部署到tomcat后,直接在myeclispe关闭该项目,下次重启eclipse就会出现

所以在关闭eclipse的项目时,如果项目已部署到tomcat,先移除掉在关闭项目

Could not create the view: An unexpected exception was thrown. 

java.lang.NullPointerException
	at com.genuitec.eclipse.ast.deploy.core.Deployment.<init>(Unknown Source)
	at com.genuitec.eclipse.ast.deploy.core.ModuleDeployment.<init>(Unknown Source)
	at com.genuitec.eclipse.ast.deploy.core.WebDeployment.<init>(Unknown Source)
	at com.genuitec.eclipse.ast.deploy.core.Deployment.create(Unknown Source)
	at com.genuitec.eclipse.ast.deploy.core.DeploymentManager.loadFromPreferences(Unknown Source)
	at com.genuitec.eclipse.ast.deploy.core.DeploymentManager.init(Unknown Source)
	at com.genuitec.eclipse.ast.deploy.core.DeploymentManager.<init>(Unknown Source)
	at com.genuitec.eclipse.ast.deploy.core.DeploymentManager.getDefault(Unknown Source)
	at com.genuitec.eclipse.ast.deploy.core.ui.ServerTreeViewer$ServerTreeContentProvider.inputChanged(Unknown Source)
	at org.eclipse.jface.viewers.ContentViewer.setInput(ContentViewer.java:276)
	at org.eclipse.jface.viewers.StructuredViewer.setInput(StructuredViewer.java:1690)
	at com.genuitec.eclipse.ast.deploy.core.ui.ServerTreeViewer.<init>(Unknown Source)
	at com.genuitec.eclipse.ast.deploy.core.ui.ServerView.createPartControl(Unknown Source)
	at org.eclipse.ui.internal.ViewReference.createPartHelper(ViewReference.java:375)
	at org.eclipse.ui.internal.ViewReference.createPart(ViewReference.java:229)
	at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
	at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:313)
	at org.eclipse.ui.internal.ViewPane.setVisible(ViewPane.java:534)
	at org.eclipse.ui.internal.presentations.PresentablePart.setVisible(PresentablePart.java:180)
	at org.eclipse.ui.internal.presentations.util.PresentablePartFolder.select(PresentablePartFolder.java:270)
	at org.eclipse.ui.internal.presentations.util.LeftToRightTabOrder.select(LeftToRightTabOrder.java:65)
	at org.eclipse.ui.internal.presentations.util.TabbedStackPresentation.selectPart(TabbedStackPresentation.java:473)
	at org.eclipse.ui.internal.PartStack.refreshPresentationSelection(PartStack.java:1245)
	at org.eclipse.ui.internal.PartStack.setSelection(PartStack.java:1198)
	at org.eclipse.ui.internal.PartStack.presentationSelectionChanged(PartStack.java:834)
	at org.eclipse.ui.internal.PartStack.access$1(PartStack.java:823)
	at org.eclipse.ui.internal.PartStack$1.selectPart(PartStack.java:137)
	at org.eclipse.ui.internal.presentations.util.TabbedStackPresentation$1.handleEvent(TabbedStackPresentation.java:133)
	at org.eclipse.ui.internal.presentations.util.AbstractTabFolder.fireEvent(AbstractTabFolder.java:269)
	at org.eclipse.ui.internal.presentations.util.AbstractTabFolder.fireEvent(AbstractTabFolder.java:278)
	at org.eclipse.ui.internal.presentations.defaultpresentation.DefaultTabFolder.access$1(DefaultTabFolder.java:1)
	at org.eclipse.ui.internal.presentations.defaultpresentation.DefaultTabFolder$2.handleEvent(DefaultTabFolder.java:88)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1062)
	at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:774)
	at org.eclipse.swt.custom.CTabFolder.setSelection(CTabFolder.java:2746)
	at org.eclipse.swt.custom.CTabFolder.onMouse(CTabFolder.java:1433)
	at org.eclipse.swt.custom.CTabFolder$1.handleEvent(CTabFolder.java:257)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4165)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2701)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2665)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at com.genuitec.pulse.eclipse.launcher.Main.main(Main.java:110)

解决方法

删除该工作空间

路径E:\developerSoft\workSpaceForMyeclipse10.7WSYY\.metadata\.plugins\org.eclipse.core.runtime\.settings下的

com.genuitec.eclipse.ast.deploy.core.prefs文件,重启eclipse

重启后tomcat已部署的项目不显示了

手动到tomcat删除已部署的项目,删除,在部署

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值