Am totally relieved today as I found the root cause of the issue with Cisco AnyConnect VPN, myBatis, IPv6 failure. As discussed in the previous post I am perplexed by the fact that the connection to the postgresql database fails when connected to VPN.So here is the short answer.
This is a known issue with Cisco AnyConnect VPN adapter, though cisco calls it an enhancement request. To understand the workaround please read part 2 of this article.
So, the real issue is that when you are connected to VPN using your Cisco AnyConnect VPN adapter you lose your IPv6 capabilities on the logical network connection to which the same adapter is bound to. This of course is a limitation of Cisco AnyConnect VPN. It seems that (unfortunately though) Java 1.7 and greater use IPv6 by default if one is available, so that's when it fails.