Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Deploying WAR File to Glassfish

I'm just getting to grips with the NetBeans 6.9 / Glassfish 3 combo, and have developed a Java EE app consisting of a WAR module and an EJB module. Having played around with the EJB side of things for a while, I went back to run the web code, and started having problems.

When I try to run the WAR file, it fails to deploy, and the error from the server is `WEB0113: virtual server [server] already has a web module [MyApp-war.war] loaded.' But I haven't edited the web side code since I last ran it, and I'm rather puzzled as to what it's trying to do.

I've tried the usual things: restarting the server, undeploying and redeploying the application, but to no avail... so if anyone with any more experience with Glassfish has any hints, they will be gratefully received!

like image 601
julian Avatar asked Jun 23 '10 14:06

julian


3 Answers

if anyone with any more experience with Glassfish has any hints, they will be gratefully received!

Open GlassFish's Admin Console, see if the application is listed and try to undeploy it from there.

like image 188
Pascal Thivent Avatar answered Sep 16 '22 13:09

Pascal Thivent


Did you create and deploy an enterprise application (ear) containing the ejb and web module? I don't think you can then deploy only the webapplication since its already deployed inside the ear. You'll have to redeploy the ear instead.

like image 32
Jörn Horstmann Avatar answered Sep 16 '22 13:09

Jörn Horstmann


I had the same problem. Restart of glassfish server helped.

What was interesting, the Applications list did not have the application. Apparently some glassfish/netbeans bug.

like image 42
Moroders Avatar answered Sep 16 '22 13:09

Moroders