ITeye博客

Add Deployment java.lang.NullPointerException

编程足球 · 2012-08-22 17:28 · java · Web前端 · Markdown

  1. 在用Myeclipse部署项目时候突然报错:

无法进行部署操作

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

发现Web-root 的值为 WebRoot 和 项目的 web 不一致。可会导致上面的错误。
  1. 解决方法: 在项目路径目录下找到 .mymetadata 打开

<?xml version="1.0" encoding="UTF-8"?>
<project-module
  type="WEB"
  name="wlms"
  id="myeclipse.1345519075437"
  context-root="/wlms"
  j2ee-spec="1.4"
  archive="wlms.war">
  <attributes>
    <attribute name="webrootdir" value="/WebRoot" />
  </attributes>
</project-module>

修改配置项


  <attributes>
    <attribute name="webrootdir" value="/WebRoot" />
  </attributes>

  为
  <attributes>
    <attribute name="webrootdir" value="/web" />
  </attributes>

保存。。重新启动Myeclipse就可以了

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。