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 thro
The problem is due to the fact that glassfish assigns any newly deployed web module to all the available virtual servers except the _asadmin one. If any one of the servers already has a default web module assigned to it you will get this error. The solution is to login into your glassfish web admin navigate to configurations > server-config > Virtual Servers click on each of your virtual servers and remove the assigned default web modules. Deploy your application and then reassign each web module to its respective virtual server.