Java自学者论坛

 找回密码
 立即注册

手机号码,快捷登录

恭喜Java自学者论坛(https://www.javazxz.com)已经为数万Java学习者服务超过8年了!积累会员资料超过10000G+
成为本站VIP会员,下载本站10000G+会员资源,会员资料板块,购买链接:点击进入购买VIP会员

JAVA高级面试进阶训练营视频教程

Java架构师系统进阶VIP课程

分布式高可用全栈开发微服务教程Go语言视频零基础入门到精通Java架构师3期(课件+源码)
Java开发全终端实战租房项目视频教程SpringBoot2.X入门到高级使用教程大数据培训第六期全套视频教程深度学习(CNN RNN GAN)算法原理Java亿级流量电商系统视频教程
互联网架构师视频教程年薪50万Spark2.0从入门到精通年薪50万!人工智能学习路线教程年薪50万大数据入门到精通学习路线年薪50万机器学习入门到精通教程
仿小米商城类app和小程序视频教程深度学习数据分析基础到实战最新黑马javaEE2.1就业课程从 0到JVM实战高手教程MySQL入门到精通教程
查看: 405|回复: 0

MyEclipse Server view报错解决方法

[复制链接]
  • TA的每日心情
    奋斗
    2024-11-24 15:47
  • 签到天数: 804 天

    [LV.10]以坛为家III

    2053

    主题

    2111

    帖子

    72万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

    积分
    726782
    发表于 2021-8-30 14:20:12 | 显示全部楼层 |阅读模式

    MyEclipse Server view报错解决方法

    方法/步骤

     
    1.  

      启动MyEclipse,弹出一个框,报错。

      --------------------------------------------------------------------------------

      Errors occurred during the build.

      Errors running builder 'DeploymentBuilder' on project 'SeNT-DL'.

      java.lang.NullPointerException

      MyEclipse Server view报错解决方法
    2.  

      Server view报错:

      --------------------------------------------------------------------------------

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

      MyEclipse Server view报错解决方法
    3.  

      Server view报错:

      --------------------------------------------------------------------------------

      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.Perspective.showFastView(Perspective.java:2171)

      at org.eclipse.ui.internal.Perspective.setActiveFastView(Perspective.java:1939)

      at org.eclipse.ui.internal.Perspective.setActiveFastView(Perspective.java:1952)

      at org.eclipse.ui.internal.Perspective.toggleFastView(Perspective.java:2367)

      at org.eclipse.ui.internal.WorkbenchPage.toggleFastView(WorkbenchPage.java:3972)

      at org.eclipse.ui.internal.ShowFastViewContribution.showView(ShowFastViewContribution.java:157)

      at org.eclipse.ui.internal.ShowFastViewContribution.access$1(ShowFastViewContribution.java:155)

      at org.eclipse.ui.internal.ShowFastViewContribution$3.widgetSelected(ShowFastViewContribution.java:138)

      at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:240)

      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)

      MyEclipse Server view报错解决方法
    4.  

      Server视图显示的是项目部署在Server的情况,每个工作空间都有个性化配置。找到工作空间的Server项目部署配置文件。

      --------------------------------------------------------------------------------

      目录是$工作空间\.metadata\.plugins\org.eclipse.core.runtime\.settings\com.genuitec.eclipse.ast.deploy.core.prefs

      MyEclipse Server view报错解决方法
    5.  

      根据工作空间的Server项目部署配置文件可以看出,Server部署了两个项目,分别是SeNT-DL,SeNT-b11M

      --------------------------------------------------------------------------------

      eclipse.preferences.version=1

      tomcat7Server.SeNT-DL.IEARProjectName=

      tomcat7Server.SeNT-DL.altContextRoot=

      tomcat7Server.SeNT-DL.contextRoot=/SeNT-DL

      tomcat7Server.SeNT-DL.deployIsOverProject=false

      tomcat7Server.SeNT-DL.deploymentPath=F\:\\apache-tomcat-7.0.55\\webapps\\SeNT-DL

      tomcat7Server.SeNT-DL.isDeployed=true

      tomcat7Server.SeNT-DL.isExploded=true

      tomcat7Server.SeNT-DL.isUptoDate=true

      tomcat7Server.SeNT-DL.noFileCopy=false

      tomcat7Server.SeNT-DL.shouldBackup=false

      tomcat7Server.SeNT-DL.shouldOverwrite=false

      tomcat7Server.SeNT-DL.type=WebDeployment

      tomcat7Server.SeNT-b11M.IEARProjectName=

      tomcat7Server.SeNT-b11M.altContextRoot=

      tomcat7Server.SeNT-b11M.contextRoot=/SeNT-b11M

      tomcat7Server.SeNT-b11M.deployIsOverProject=false

      tomcat7Server.SeNT-b11M.deploymentPath=F\:\\apache-tomcat-7.0.55\\webapps\\SeNT-b11M

      tomcat7Server.SeNT-b11M.isDeployed=true

      tomcat7Server.SeNT-b11M.isExploded=true

      tomcat7Server.SeNT-b11M.isUptoDate=true

      tomcat7Server.SeNT-b11M.noFileCopy=false

      tomcat7Server.SeNT-b11M.shouldBackup=false

      tomcat7Server.SeNT-b11M.shouldOverwrite=false

      tomcat7Server.SeNT-b11M.type=WebDeployment

      MyEclipse Server view报错解决方法
    6.  

       

      实际上,Server只部署了一个项目SeNT-DL,另外一个项目SeNT-b11M被删除了。

      MyEclipse Server view报错解决方法
    7.  

      另外一个项目SeNT-b11M被删除了,删除的方式是进入tomcat的webapps,直接删除。没有通知MyEclipse,导致MyEclipse的工作空间的Server项目部署配置文件没有做更新,依旧配置Server部署了两个项目,分别是SeNT-DL,SeNT-b11M。

      MyEclipse Server view报错解决方法
    8.  

      解决方法一:更新MyEclipse的工作空间的Server项目部署配置文件com.genuitec.eclipse.ast.deploy.core.prefs,根据实际情况,删除已经不存在于Server的项目配置。把以下高亮部分配置删除。

      MyEclipse Server view报错解决方法
    9.  

      解决方法二:删除tomcat的webapps的所有项目,删除文件com.genuitec.eclipse.ast.deploy.core.prefs。这种方式相当于清空部署在tomcat的所有项目,清空MyEclipse的工作空间的Server项目部署配置文件。(本人使用的就是这一种方法 ,直接删除)

      MyEclipse Server view报错解决方法
    10.  

      为了避免此类问题再次出现,想要删除部署在tomcat的项目时,不要进入tomcat的webapps,直接删除,而是在server view视图做删除。在server view视图做删除项目时,MyEclipse会更新工作空间的Server项目部署配置文件。

      MyEclipse Server view报错解决方法
    11.  

    哎...今天够累的,签到来了1...
    回复

    使用道具 举报

    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    QQ|手机版|小黑屋|Java自学者论坛 ( 声明:本站文章及资料整理自互联网,用于Java自学者交流学习使用,对资料版权不负任何法律责任,若有侵权请及时联系客服屏蔽删除 )

    GMT+8, 2024-12-23 04:51 , Processed in 0.060875 second(s), 29 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2021, Tencent Cloud.

    快速回复 返回顶部 返回列表