eclipse 使用 GlassFish 部署 Java 应用程序时出错

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/16801749/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 20:38:12  来源:igfitidea点击:

Error when Deploying Java app with GlassFish

javaeclipsejakarta-eeglassfish

提问by ConorW

What does this error with GlassFish (when being used with Eclipse) mean? login is a Java project I was working with earlier. I take it I have to stop it or remove it or something. Can some please help?

GlassFish 的这个错误(与 Eclipse 一起使用时)是什么意思?login 是我之前使用的一个 Java 项目。我认为我必须停止或删除它或其他什么。有人可以帮忙吗?

cannot Deploy numberquiz
deploy is failing=Error occurred during deployment: Exception while loading the app : 
java.lang.Exception: WEB0113: Virtual server [server] already has a web module [login] loaded at 
[/numberquiz]; therefore web module [numberquiz] cannot be loaded at this context path on this 
virtual server. . Please see server.log for more details.

Thanks, Conor.

谢谢,康纳。

回答by unwichtich

You already have an application deployed with the contextpath /numberquiz. Changing the context path in your project settings will result in the same problem the next time you deploy your app.

您已经使用 contextpath 部署了一个应用程序/numberquiz。下次部署应用程序时,更改项目设置中的上下文路径将导致相同的问题。

You have to undeploy your application via Eclipse or in the Glassfish Admin GUI,

您必须通过 Eclipse 或 Glassfish Admin GUI 取消部署您的应用程序,

The Admin GUI can be accessed under http://localhost:4848. Go to Applicationsin the left menu, select your application and click Undeploy.

可以在 下访问管理 GUI http://localhost:4848。转到Applications左侧菜单中的 ,选择您的应用程序并单击Undeploy

回答by Emefile Francis Waje

The reason for this error is because you are trying to deploy an application in GlassFish that is conflicting with another application with the same "Context Root". You have to undeploy the application in GlassFish or alter the Context Root of either of the applications. In Glassfish 5, open your browser and go to the url- localhost:4848 it will open the GlassFish Server Open Source Edition index.jsf page. On the left panel click on the Applications drop-down and select the application whose Context Root is conflicting with the new application. The Edit Application pane opens on the right, then you can now alter the Context Root. After this, click the save button on the top-right corner.

出现此错误的原因是您尝试在 GlassFish 中部署一个应用程序,该应用程序与具有相同“上下文根”的另一个应用程序发生冲突。您必须在 GlassFish 中取消部署应用程序或更改任一应用程序的上下文根。在 Glassfish 5 中,打开浏览器并转到 url-localhost:4848,它将打开 GlassFish Server Open Source Edition index.jsf 页面。在左侧面板上单击 Applications 下拉列表,然后选择 Context Root 与新应用程序冲突的应用程序。“编辑应用程序”窗格在右侧打开,然后您现在可以更改上下文根。之后,单击右上角的保存按钮。