解决MyEclipse10.7 building/deploy 到服务器的时候报java.lang.NullPointerException

2014/01/20 3655点热度 0人点赞 0条评论

由于电脑突然死机,重启电脑后进入myeclipse的时候直接报

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.WorkbenchPage$ActivationList.setActive(WorkbenchPage.java:4317)
	at org.eclipse.ui.internal.WorkbenchPage$18.runWithException(WorkbenchPage.java:3359)
	at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4140)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3757)
	at org.eclipse.ui.application.WorkbenchAdvisor.openWindows(WorkbenchAdvisor.java:803)
	at org.eclipse.ui.internal.Workbench$33.runWithException(Workbench.java:1600)
	at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4140)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3757)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2609)
	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)

这玩意以前没见过,

com.genuitec.eclipse.ast.deploy.core.Deployment

百度了一下原来这个是myEclipse在workspace中生成的运行时的配置文件

.metadata\.plugins\org.eclipse.core.runtime\.settings

打开这个文件com.genuitec.eclipse.ast.deploy.core.prefs

eclipse.preferences.version=1
tomcat7Server.bpm.IEARProjectName=
tomcat7Server.bpm.altContextRoot=
tomcat7Server.bpm.contextRoot=/heas
tomcat7Server.bpm.deployIsOverProject=false
tomcat7Server.bpm.deploymentPath=D\:\\javaserver\\tomcat\\apache-tomcat-7.0.47\\webapps\\heas
tomcat7Server.bpm.isDeployed=true
tomcat7Server.bpm.isExploded=true
tomcat7Server.bpm.isUptoDate=true
tomcat7Server.bpm.noFileCopy=false
tomcat7Server.bpm.shouldBackup=false
tomcat7Server.bpm.shouldOverwrite=false
tomcat7Server.bpm.type=WebDeployment
tomcat7Server.pmreport.IEARProjectName=
tomcat7Server.pmreport.altContextRoot=
tomcat7Server.pmreport.contextRoot=/pmreport
tomcat7Server.pmreport.deployIsOverProject=false
tomcat7Server.pmreport.deploymentPath=D\:\\javaserver\\tomcat\\apache-tomcat-7.0.47\\webapps\\pmreport
tomcat7Server.pmreport.isDeployed=true
tomcat7Server.pmreport.isExploded=true
tomcat7Server.pmreport.isUptoDate=true
tomcat7Server.pmreport.noFileCopy=false
tomcat7Server.pmreport.shouldBackup=false
tomcat7Server.pmreport.shouldOverwrite=false
tomcat7Server.pmreport.type=WebDeployment

发现里面有两个项目,第一个项目我已经close掉了,由于突然死机,myeclipse没有把我close的项目从配置中去掉(估计是在关闭myeclipse的时候才会修改这些配置文件),把这个

tomcat7Server.bpm.

开头的配置去掉重启myEclipse就好了

yxkong

这个人很懒,什么都没留下

文章评论