Could not create the view: An unexpected exception was thrown

一、问题描述

  打开myclipse,发现server窗口报错,Could not create the view: An unexpected exception was thrown。

二、解决

  这是由于之前被部署到tomcat中的项目被关闭,或者找不到导致的。我这里是之前把部署了的项目closed了,所以打开这几个项目就解决了这个问题。

三、拓展

  D:install oolsmyeclipsemyeclipse10workspace.metadata.pluginsorg.eclipse.core.runtime.settings

  打开这个文件,发现它记载着被部署的项目:

eclipse.preferences.version=1
tomcat6Server.JavaEE.IEARProjectName=
tomcat6Server.JavaEE.altContextRoot=
tomcat6Server.JavaEE.contextRoot=/JavaEE
tomcat6Server.JavaEE.deployIsOverProject=false
tomcat6Server.JavaEE.deploymentPath=D:\install\basic\tomcat\apache-tomcat-6.0.41\webapps\JavaEE
tomcat6Server.JavaEE.isDeployed=true
tomcat6Server.JavaEE.isExploded=true
tomcat6Server.JavaEE.isUptoDate=true
tomcat6Server.JavaEE.noFileCopy=false
tomcat6Server.JavaEE.shouldBackup=false
tomcat6Server.JavaEE.shouldOverwrite=false
tomcat6Server.JavaEE.type=WebDeployment
tomcat7Server.bspring.IEARProjectName=
tomcat7Server.bspring.altContextRoot=
tomcat7Server.bspring.contextRoot=/bspring
tomcat7Server.bspring.deployIsOverProject=false
tomcat7Server.bspring.deploymentPath=D:\install\basic\tomcat\apache-tomcat-7.0.55\webapps\bspring
tomcat7Server.bspring.isDeployed=true
tomcat7Server.bspring.isExploded=true
tomcat7Server.bspring.isUptoDate=true
tomcat7Server.bspring.noFileCopy=false
tomcat7Server.bspring.shouldBackup=false
tomcat7Server.bspring.shouldOverwrite=false
tomcat7Server.bspring.type=WebDeployment

找不到里面记载的项目就会上面的错误。

原文地址:https://www.cnblogs.com/brolanda/p/4549703.html