the exception is clear
java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory
it complains that class is not loaded, you have to add the appropriate jar file
apart from that, while setting your properties at line: prop.setProperty("java.naming.provider.url","localhost:");
you must remove the : (colon) from the value