Entwicklung einer Java-Web-Service-Entwicklung mit JAX-WS und Veröffentlichung eines Endpunkts …
public static void main(String[]args) { Endpoint.publish("http://localhost:8080/ws/hello", new WallStreetImpl()); }
1. Problem
Es wird die folgende Fehlermeldung angezeigt.
Exception in thread "main" com.sun.xml.internal.ws.server.ServerRtException: Server Runtime Error: java.net.BindException: Address already in use: bind ... Caused by: java.net.BindException: Address already in use: bind at sun.nio.ch.Net.bind(Native Method) ...
2. Lösung
Eine sehr häufige Fehlermeldung, dh die Adresse (normalerweise die Portnummer) wird bereits von einer anderen Anwendung verwendet.
public static void main(String[]args) { Endpoint.publish("http://localhost:1234/ws/hello", new WallStreetImpl()); }
Referenz
-
link://linux/linux-which-application-is-using-port-8080/[Linux - which
Anwendung verwendet Port 8080]