Add Deployment java.lang.NullPointerException

来源:互联网 发布:手机知乎怎么发帖子 编辑:程序博客网 时间:2024/06/07 10:53
1. 在用Myeclipse部署项目时候突然报错:



无法进行部署操作

2. 原因1. 可能是你的Web-root的值不对。通过右击项目->Properties->MyEclipse->Web
   查看自己的web根目录是否正确。


  



    发现Web-root 的值为 WebRoot 和 项目的 web 不一致。可会导致上面的错误。

3. 解决方法: 在项目路径目录下找到 .mymetadata 打开
Xml代码  收藏代码
  1. <?xml version="1.0" encoding="UTF-8"?>  
  2. <project-module  
  3.   type="WEB"  
  4.   name="wlms"  
  5.   id="myeclipse.1345519075437"  
  6.   context-root="/wlms"  
  7.   j2ee-spec="1.4"  
  8.   archive="wlms.war">  
  9.   <attributes>  
  10.     <attribute name="webrootdir" value="/WebRoot" />  
  11.   </attributes>  
  12. </project-module>  


修改配置项
Xml代码  收藏代码
  1. <attributes>  
  2.   <attribute name="webrootdir" value="/WebRoot" />  
  3. </attributes>  
  4.   
  5. 为  
  6. <attributes>  
  7.   <attribute name="webrootdir" value="/web" />  
  8. </attributes>  


保存。。重新启动Myeclipse就可以
原创粉丝点击