pro_java_server thread: javax.naming.NoInitialContextException when trying to use DataSource in the Movie Catalog
There are a couple of ways to provide the necessary information to create
the Context properly.
You can either hardcode it using a Properties object, e.g.
Properties prop = new Properties();
prop.put(Context.INITIAL_CONTEXT_FACTORY,
"weblogic.jndi.WLInitialContextFactory");
prop.put(Context.PROVIDER_URL, "t3://localhost:7001");
InitialContext ctx = new InitialContext(prop);
Obviously the above properties are for a WebLogic server. The exact
properties you need are server specific, plus some servers may require
additional properties such as security info.
You could also read the info in from a properties file.