I don't know for COBOL, but for JEE, we've been able to migrate out of weblogic (to jboss) and then from oracle to postgresql (on code which is 10 years old). So even if JEE might be hard to maintain, it allows some flexibility in the base tools you choose. (my view of COBOL is that once you're into a vendor, it's pretty hard to leave to another one because COBOL is close to the metal, I may be totally wrong)
but in the long run, the problem is also the business logic. What disappears is the knowledge of the hacks that were applied at the business logic level. And this is much harder than to recover from the code. So I guess one has to make the difference between business logic maintenance and the actual COBOL maintenance.
But having rewrote some huge COBOL app in Java, I can say that Java is better structured, at a framework complexity cost.