开发者

unable to redeploy web application on glassfish3

I m trying to deploy a web application using netbeans to glassfish 3.01 but i m not able 开发者_JS百科to do so

Glassfish says

Inconsistent Module State

the web app has some jars and a ejb jar for a local ejb


Open the domain.xml file that you will find in this folder:

"your glassfish installation"/domains/"your domain"/config

In this file look for your application deployment configuration to manually remove it:

1) Remove the web-module tag

<applications>
...
<web-module availability-enabled="false" context-root="yourapplicatoinContext" ... />
 ...
</applications>

2) Also remove the application-ref to your application:

<server config-ref="server-config" lb-weight="100" name="server">
 ...
   <application-ref ... ref="your application name" ... />
 ... 
</server>


Just try this:

  • undeploy
  • stop Glassfish
  • start Glassfish
  • deploy

If you can't undeploy, try the other steps anyway. If you don't have any luck, you could try it this way:

  • stop Glassfish
  • edit domain.xml (probably in domains/domain1/config)- back it up first; remove all references to your app (probably under application / application-ref); just make sure it's still valid xml
  • start Glassfish
  • deploy

It should have solved it. If still no luck anyway, remove every file or directory related to your app, probably under domains/domain1/generated and domains/domain1/applications/....

You could always recreate a new domain, but above steps will solve your problem.

You could be in such a situation after stopping Glassfish middle in a deploiyment, for example.


The other answers are really extreme. There is no need to create a new domain or re-install if you cannot redeploy your web application during development.

If you app is very complex, then consider scripting any clean up needed in a Production environment. The below steps will keep you up and working in the short term.

To re-deploy a web app to a single domain on Glassfish 3.1, do the following:

  • Stop Glassfish from the command line.

  • Delete all the files in the following directories:

glassfish\domains\domain1\generated
glassfish\domains\domain1\applications

  • Start Glassfish from the command line.

  • Deploy your app via the Admin Tool or command line.


In Glassfish 5, I searched for my app name in the domain.xml and deleted all the tags mentioning it. There was one occurence in the beginning (<system-applications>) and one at the end at approx. line 460 (<applications>). Then redeploy worked!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜