for one, java fern likes high nitrate. 5ppm means that you are basically bottoming out. you should get it up to 20ppm base, and then continue dosing as usual.
probably has no impact on the java fern health, but the PO4 is too high. this may be a mere coincidence, but i just had a high PO4 problem and my Java Fern looks like it is withering away too. back when I had low PO4 (1-2ppm) the fern flourished. i know the "word on the street" is that high PO4 has no ill effects, but I have slightly been doubting that lately. either way, you could do with dosing less PO4. if you are at 5ppm now, then cut back by 1/2 and see what happens. test every few days until you get a good trend of keeping PO4 at 2ppm.
the only other factor that helped my java fern was lowering the temp, but it was from 85 down to 78, so yours is already at that lower temp that seems to work well.
edit>> should also add... the black spots could be BBA (black-beard algae). my fern has it too... never could get rid of it. still trying.
by you saying that holes are developing means that you probably arent dosing enough K. and by seeing that you have low Nitrates makes it seem that way too. How much of KNO3 (assuming that is what you are using for NO3) do you dose, and for how many gallons of water?