julian
julian

Reputation: 51

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!

Upvotes: 5

Views: 8098

Answers (4)

John Royceton Arthur
John Royceton Arthur

Reputation: 2388

What I did was , i went to the admin console for my Glassfish server and I undeployed all the unused projects and redeployed the project that i was trying to run. And it worked!

Upvotes: 0

Moroders
Moroders

Reputation: 11

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.

Upvotes: 1

Jörn Horstmann
Jörn Horstmann

Reputation: 34044

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.

Upvotes: 1

Pascal Thivent
Pascal Thivent

Reputation: 570595

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.

Upvotes: 6

Related Questions