因为default-web-module被声明,Glassfish无法在根部署 [英] Glassfish unable to deploy at root because default-web-module is declared

查看:227
本文介绍了因为default-web-module被声明,Glassfish无法在根部署的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在尝试从 Netbeans 管理控制台抛出以下消息。尽管管理控制台应用程序部分没有部署的应用程序。我已经尝试重新启动域,没有成功。

While trying to deploy to Glassfish Server Open Source Edition 3.1.2.2 (build 5) from both Netbeans and Admin Console the following message is thrown. Eventhough the Applications section of the Admin Console has no deployed applications. I have tried restarting the domain without success.

加载应用程序时异常:java.lang.Exception:WEB0145:无法部署Web模块[ * module name *]在虚拟服务器[服务器]的根上下文中,因为这个虚拟服务器声明一个default-web-module

有没有任何缓存或可以清空的东西,以清理根,所以我可以再次部署我的应用程序在根上下文?感谢任何帮助!

Is there any cache or something that can be emptied in order to clean up the root so I can once again deploy my application at root context? Thanks for any help!

步骤1

我从一个简单的 grep -command在我的 Glassfish 目录default-web-module。似乎这是在 domains / domain1 / config / domain.xml 中定义的(我怎么想错过了?)。

I started with a simple grep-command on my Glassfish-directory for "default-web-module". Seems this was defined in domains/domain1/config/domain.xml (how could I have missed to think of that?).

步骤2

内部 domain.xml 如下:

<applications>
    <application context-root="/" ...>
         ...
    </application>
    ...
</applications>

此外,这个应用程序以前在 root-context =/中部署的应用程序名称。一旦我回家,我会尝试删除这个< application context-root =/...> ...< / application> (ofcourse备份 domain.xml )。希望这将解决问题,我将能够再次部署到 root

Also, this application caries multiple references to the applicationname that was previously deployed in root-context="/". As soon as I'm home I will try removing this <application context-root="/" ...>...</application> (ofcourse with a backup of domain.xml). Hope this will solve the problem and that I will be able to deploy to root again!

推荐答案

由于我遇到了这个问题,其他人也很可能会这样。因此,我会回答我自己的问题,而不是删除它。

Since I ran into the problem it's probable that others will too. For this reason I will answer my own question instead of deleting it.

按照我在问题中提到的步骤,我注意到$ code中的配置> domain.xml 仍然引用了具有 context-root =/的应用程序。从文件中删除此应用程序并将其保存后,我可以再次将应用程序部署到 /

Following the steps I've mentioned in the question, I noticed the config in domain.xml still had reference to an application with context-root="/". Upon removing this application from the file and saving it, I could once again deploy an application to /!

这篇关于因为default-web-module被声明,Glassfish无法在根部署的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆