Spot the mistake in this code meant to enter passive mode:
ftp.enterLocalPassiveMode();
This method should be called after connecting to the server.
It should be enterPassiveMode() not enterLocalPassiveMode().
enterPassiveMode()
enterLocalPassiveMode()
The code is correct; there's no mistake.
The method name is incorrect.