Debugging vicious java.net.BindException (Windows)

java.net.BindException is thrown when JVM fails binding a socket to a local address and port.. Most common reason is that port is already used by some other application/service. Message like “Port already in use: 1098;” further confirms this.

This is how you can debug this exception:

  1. Check which service is binding the port by command “netstat –b”

This will list down all port and the application which binds the port like:

Proto Local Address Foreign Address State PID

TCP hddlntd100000:1090 test.test.cim:1026 ESTABLISHED 2248 [OUTLOOK.EXE]

  1. Now check for the port which is shown as already in use. Like if the message resulted by BindException is “Port already in use: 1098”, then 1098 is in use by other application.
  2. Identify the application running on the given port. Like Outlook is acquiring port 1090.
  3. Either close the application which is acquiring the port directly by exiting the application like in case of Outlook or go to task manager and do end task for the given application/service. If application/service closes successfully you are done, now retry whatever had caused BindException earlier.

Restoring Conventional Browser Navigation to AJAX Applications

This article was result of my experience in developing Rich Internet application. It is depiction of my fight against the pitfalls of AJAX application. User is happy if you give him a better usability and performance but he is not aware about the underline technologies. If all of the sudden the default browser navigation stops to work in the desired fashion, user will start to panic. The developer starts getting issues like my back button is not working, clicking refresh lost my work done, so and so forth. The first reaction of developer is this is AJAX world and it act this way only, what can I do? Then we have to look for the ways of supporting default browser navigation in AJAX world. There are few hacks for providing supporting for default browser’s navigation using javascript but AJAX provide more systematic way of doing this. In my article I will explain how to use DOJO history APIs to cope up with one of the pitfall of AJAX application.
To read the article please follow the link

Technology