Java 无法在 Eclipse 中将应用程序部署到 Glassfish 4.1
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/27904617/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Cannot deploy an application to Glassfish 4.1 in Eclipse
提问by user3601262
I have Glassfish 4.1 and Eclipse Luna installed on Ubuntu. When I tried to run a simple web application (jsp + servlet + java bean) I`ve received the following error:
我在 Ubuntu 上安装了 Glassfish 4.1 和 Eclipse Luna。当我尝试运行一个简单的 Web 应用程序(jsp + servlet + java bean)时,我收到以下错误:
Publishing to Glassfish 4 at localhost[domain1].. has encountered a
problem.
cannot Deploy mvcprj1 deploy is failing=Application with
name [mvcprj1] is not deployed
Publishing to Glassfish 4 at localhost[domain1].. has encountered a
problem.
cannot Deploy mvcprj1 deploy is failing=Application with
name [mvcprj1] is not deployed
Nothing is appearing neither in the glassfish server log or in the eclipse console.
glassfish 服务器日志或 eclipse 控制台中均未出现任何内容。
回答by eric A
I had same deployment issue (eclipse Lune/Glassfish 4.1) and it was resolved thanks to Marvin's feedback.
我遇到了同样的部署问题(eclipse Lune/Glassfish 4.1),由于 Marvin 的反馈,它得到了解决。
You can find the "Use JAR archives for deployment" by: right click on glassfish from eclipse server tab. Then, select Monitoring>Properties> Glassfishin new windows > Use JAR archives for deployment.
您可以通过以下方式找到“使用 JAR 档案进行部署”:右键单击 eclipse 服务器选项卡中的 glassfish。然后,选择Monitoring> Properties> Glassfishin new windows > Use JAR archives for deployment。
Then, the miracle occurs...
然后,奇迹发生了……
回答by Srilu
I have deleted the Glassfish server instance in eclipse and recreated it to solve this problem.
我已经在eclipse中删除了Glassfish服务器实例并重新创建它来解决这个问题。
回答by arnab layek
Try the following steps:
尝试以下步骤:
- right click on glassfishserver
- click on properties
- then you will get 3 options(general,glassfish,monitoring) at the left side of that box.
- click on glassfish
- click that checkbox "Use JAR archives for depolyment". Previously it was unchecked. That's why I was getting issue.
- 右键单击glassfish服务器
- 点击属性
- 然后您将在该框的左侧获得 3 个选项(常规、玻璃鱼、监控)。
- 点击玻璃鱼
- 单击该复选框“使用 JAR 存档进行解压缩”。以前它是未选中的。这就是我遇到问题的原因。
回答by yrz
I believe, that occurs, when one has not closed the "Browser Page" in Eclipse, after he had tried out the same application previous time. After closing all open "Browser Pages" of this application in Eclipse, the deployment is possible again.
我相信,当他之前尝试过相同的应用程序后,没有关闭 Eclipse 中的“浏览器页面”时,就会发生这种情况。在 Eclipse 中关闭此应用程序所有打开的“浏览器页面”后,即可再次部署。