Win a copy of Rust Web Development this week in the Other Languages forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

java.net.BindException: Address already in use

 
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I am working in example for the NIO socket , i have found anexample from the net and i included it in my web application ,
in the first deploy of the war file , it works fine but whenever i redeploy the war file

i will get the error : java.net.BindException: Address already in use

it seems that port will be still opened even so if I undeploy the war file


any one tell me how to fix the issue
 
Ranch Hand
Posts: 820
IntelliJ IDE VI Editor Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Suresh Khant wrote:Hi All,

I am working in example for the NIO socket , i have found anexample from the net and i included it in my web application ,
in the first deploy of the war file , it works fine but whenever i redeploy the war file

i will get the error : java.net.BindException: Address already in use

it seems that port will be still opened even so if I undeploy the war file


any one tell me how to fix the issue



please share what example you found.
 
Suresh Khant
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Tim , Thanks alot for the reply ,

The example i have found is Rox java nio tutorial you can get the code and examples from the link :
http://rox-xmlrpc.sourceforge.net/niotut/
 
Tim McGuire
Ranch Hand
Posts: 820
IntelliJ IDE VI Editor Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks,

How about the code to your web app? Can you show how you call this NIO stuff inside your web app?
 
Suresh Khant
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Time,

Here is the code ,

I am calling the servlet from the web.xml

TCPServlet.java









TCPServer.java



off course the other classes and code are in the rox examples , i did not include them . I hope that you could help me to fix this issue.

Thanking you.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic