Address already in use: bind


In Java web service development, JAX-WS, when an end point is published,

public static void main(String[] args) {
   Endpoint.publish("http://localhost:8080/ws/hello", new WallStreetImpl());

It hits the following error message.

Exception in thread "main" 
	Server Runtime Error: Address already in use: bind
Caused by: Address already in use: bind
	at Method)


A very common error message, it mean your address (usually it is the port number) is already in used by other application. Try change your port number for the end point publisher.

public static void main(String[] args) {
   Endpoint.publish("http://localhost:1234/ws/hello", new WallStreetImpl());
Tags :

About the Author

Founder of and, love Java and open source stuff. Follow him on Twitter, or befriend him on Facebook or Google Plus. If you like my tutorials, consider make a donation to these charities.


  • Pingback: pay per day loans plan()

  • Pingback: pay day loans()

  • Pingback: water ionizer plans()

  • Pingback: water ionizers()

  • Pingback: laan penge her og nu()

  • Pingback: penge laan nu()

  • Pingback: parking()

  • Pingback:

  • Pingback: parking()

  • Pingback: Direct TV()

  • Pingback: Alisya has her butt-hole gaped by buddies with fat belt cock faux-cocks()

  • Pingback: Blue Coaster33()

  • dhaval

    Thanks dude.problem solved.

  • Prathap


    I am able to fix this error if we change the port address.

    My problem is:

    I have published a web service at say http://localhost:8085/ws/hello successfully,
    i have added two more methods to the web service implementation class and i would like to publish the web service(update) to the same location.

    how can i publish the updated web services to the previous url?

    Please help me. Quick help would be appreciated.

    but i would like to keep the same port for the updated web service.

  • Gaja

    So if I want to free that port. What I have to do? Could you please advice.

  • Name


  • http://[email protected] Gaurav Arora

    Always a savior, Thanks Mr MkYong

  • june

    really cool and thanks Mr MkYong

  • Sri

    Thank you. Changed the port from 8080 to 8081 and it worked :)