An internal error occurred during: "Launching xxx on WebLogic10.x". java.lang.NullPointerException
==============================
蕃薯耀 2018年3月15日
http://www.cnblogs.com/fanshuyao/
一、問題描述:
Myeclipse 將項目部署web服務器報錯:
An internal error occurred during: "Launching xxx on WebLogic10.x". java.lang.NullPointerException
二、解決方案:
選中【項目】,右鍵,選擇【Properties】》【MyEclipse】》【Web】,查看右邊【Context Root】選項卡的Web-root folder有沒有設置正確,設置不正確或目錄不存在時會有錯誤提示:
Web-root folder should contain WEB-INF sub directory
如下圖所示:
將Web-root folder設置自己的部署目錄就可以了,一般為WebRoot或者WebContent,但如果有些項目比較特殊,不是使用這類的目錄的話,就需要手動改一下。因為該目錄下的子目錄是需要有WEB-INF子目錄的。
如果目錄比較特殊,可能還需要改下Deployment Assembly的配置,操作如下
選中【項目】,右鍵,選擇【Properties】》【MyEclipse】》【Deployment Assembly】
勾選 Use deplloyment assembly mapping for deployment
然后就可以設置自己的Web文件部署目錄。
還有需要注意的是:項目如果是復制其它項目直接導入的,可能該項目的下的.project文件里面的name標簽的項目名稱需要修改正確
.project文件位於該項目的目錄下,每個項目都會有這個文件
打開.project文件,查看name標簽的項目名是否正確。不正確,請修改。
- <?xml version="1.0" encoding="UTF-8"?>
- <projectDescription>
- <name>xxx</name>
.project文件的完整內容:
- <?xml version="1.0" encoding="UTF-8"?>
- <projectDescription>
- <name>xxx</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.wst.common.project.facet.core.builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.wst.validation.validationbuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.springframework.ide.eclipse.core.springbuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.springframework.ide.eclipse.boot.validation.springbootbuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.m2e.core.maven2Builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.springframework.ide.eclipse.core.springnature</nature>
- <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
- <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.m2e.core.maven2Nature</nature>
- <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
- <nature>org.eclipse.wst.jsdt.core.jsNature</nature>
- </natures>
- </projectDescription>
-----------------------------------------------分隔線----------------------------------------------------------
網上流傳的類似問題的其它方法,但不是本人遇到的問題解決方法:
1、首先關閉退出MyEclipse。
2、然后刪除MyEclipse工作空間(workspace)下的
“/.metadata/.plugins/org.eclipse.core.runtime/.settings/com.genuitec.eclipse.ast.deploy.core.prefs”
這個文件。在這個文件中存儲了一些部署項目的信息。刪了這個部署的項目的信息就沒有錯誤了。
3、重啟啟動MyEclipse即可解決了。
==============================
蕃薯耀 2018年3月15日
http://www.cnblogs.com/fanshuyao/