Connecting Corda node via external application

I am trying to connect node via external java application. I took the code from R3 Corda site

The code is failing at below line code
final NetworkHostAndPort nodeAddress = new NetworkHostAndPort(“localhost”,10009);

Error log is attached.

Same node can be connected via Node Explorer.
Node is running locally on my machine.

Error_Node_Connecting_Via_External_Application.txt (6.6 KB)