这两天每次打开MyEclipse都会报Could not create the view: An unexpected exception was thrown.然后再server中看不到配置的tomcat。
![解决Could not create the view: An unexpected exception was thrown 解决Could not create the view: An unexpected exception was thrown](https://i-blog.csdnimg.cn/blog_migrate/11a29d992fa160f05fb8e399e5e5de9a.gif)
实现了下发现出现该问题有以下两种情况
1)在tomcat里部署某个应用后后,没有将它从tomcat中移除掉,然后colse掉了该项目
2)突然断电,或者强制关机,死记,强制关闭Myeclipse也会出现该情况
解决方案:
打开工作空间,根据.metadata\.plugins\org.eclipse.core.runtime\.settings找到com.genuitec.eclipse.ast.deploy.core.prefs文件,删除掉
或者打开
eclipse.preferences.version=1
tomcat6Server.plat.IEARProjectName=
tomcat6Server.plat.altContextRoot=
tomcat6Server.plat.contextRoot=/plat
tomcat6Server.plat.deployIsOverProject=false
tomcat6Server.plat.deploymentPath=E\:\\javaserver\\tomcat\\apache-tomcat-6.0.18\\webapps\\plat
tomcat6Server.plat.isDeployed=true
tomcat6Server.plat.isExploded=true
tomcat6Server.plat.isUptoDate=true
tomcat6Server.plat.noFileCopy=false
tomcat6Server.plat.shouldBackup=false
tomcat6Server.plat.shouldOverwrite=false
tomcat6Server.plat.type=WebDeployment
tomcat7Server.LZPortal.IEARProjectName=
tomcat7Server.LZPortal.altContextRoot=
tomcat7Server.LZPortal.contextRoot=/LZPortal
tomcat7Server.LZPortal.deployIsOverProject=false
tomcat7Server.LZPortal.deploymentPath=E\:\\javaserver\\tomcat\\apache-tomcat-7.0.47\\webapps\\LZPortal
tomcat7Server.LZPortal.isDeployed=true
tomcat7Server.LZPortal.isExploded=true
tomcat7Server.LZPortal.isUptoDate=true
tomcat7Server.LZPortal.noFileCopy=false
tomcat7Server.LZPortal.shouldBackup=false
tomcat7Server.LZPortal.shouldOverwrite=false
tomcat7Server.LZPortal.type=WebDeployment
删除掉已经关闭掉的项目,这样还在的项目还在server中