This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Create a web project and a web service using Sun AS 8 as the server and deploy. The server is started and WS is deployed. Then switch the server to JBoss and deploy the application. Since you cannot change the port, see <a href="http://www.netbeans.org/issues/show_bug.cgi?id=62650">Issue 62650</a>, the JBoss deploy will fail if you shut down the sun server and attempt the deploy to JBoss again it will fail again with the error LifecycleException: Protocol handler start failed: java.net.BindException: Address already in use: JVM_Bind:8080. If you check the processes you will an extra 3-6 java processes which means that the servers that failed deployment were not shut down. In the runtime tab there is no option to shut down the JBoss servers even after a refresh it still does not know the servers are running, failed but running.
You can change JBoss server port: edit file $JBOSS_INSTALLDIR\server\default\deploy\jbossweb-tomcat55.sar\server.xml element's attribute <Connector port="8080" NetBeans are not supposed to handle multiple servers sharing the same port. It is up to user and his/her setup of servers. Or did I misunderstood anything?
I understand that NB does not support multiple servers sharing the same port. That would be a little hard to do but the issue is not that JBoss is not shut down correctly if it fails for any reason. The same port was used as a reproducible situation which will demonstrate the error. If a server fails a deploy for any reason it will hose up NB and leave the failed server process running. The only way to solve the situation is to kill the failed server processes manually. This has nothing to do with servers running on the same port that was simply an example. Also, the port is unable to be changed in the wizard for JBoss servers. Please see Issue 64837.
Fixed by preventing the collisions by testing the ports needed by the JB server before its startup. Checking in JBDeployer.java; /cvs/serverplugins/jboss4/src/org/netbeans/modules/j2ee/jboss4/JBDeployer.java,v <-- JBDeployer.java new revision: 1.11; previous revision: 1.10 done Checking in nodes/JBManagerNode.java; /cvs/serverplugins/jboss4/src/org/netbeans/modules/j2ee/jboss4/nodes/JBManagerNode.java,v <-- JBManagerNode.java new revision: 1.9; previous revision: 1.8 done Checking in ide/JBStartServer.java; /cvs/serverplugins/jboss4/src/org/netbeans/modules/j2ee/jboss4/ide/JBStartServer.java,v <-- JBStartServer.java new revision: 1.23; previous revision: 1.22 done Checking in ide/ui/JBPluginUtils.java; /cvs/serverplugins/jboss4/src/org/netbeans/modules/j2ee/jboss4/ide/ui/JBPluginUtils.java,v <-- JBPluginUtils.java new revision: 1.4; previous revision: 1.3 done Checking in ide/ui/JBPluginProperties.java; /cvs/serverplugins/jboss4/src/org/netbeans/modules/j2ee/jboss4/ide/ui/JBPluginProperties.java,v <-- JBPluginProperties.java new revision: 1.3; previous revision: 1.2 done Checking in ide/ui/JBInstantiatingIterator.java; /cvs/serverplugins/jboss4/src/org/netbeans/modules/j2ee/jboss4/ide/ui/JBInstantiatingIterator.java,v <-- JBInstantiatingIterator.java new revision: 1.3; previous revision: 1.2 done Checking in ide/ui/AddServerPropertiesVisualPanel.java; /cvs/serverplugins/jboss4/src/org/netbeans/modules/j2ee/jboss4/ide/ui/AddServerPropertiesVisualPanel.java,v <-- AddServerPropertiesVisualPanel.java new revision: 1.5; previous revision: 1.4 done
Fogotten log. Checking in Bundle.properties; /cvs/serverplugins/jboss4/src/org/netbeans/modules/j2ee/jboss4/ide/Bundle.properties,v <-- Bundle.properties new revision: 1.7; previous revision: 1.6 done
Verified