The exception was either thrown from the constructor of javax.naming.InitialContext, or from invoking the lookup method with the "java:comp/env" value. The program needs to create the InitialContext object and look up the "java:comp/env" value in order to access the J2EE environment settings.
Use the text of the exception error and your J2EE environment documentation to correct the problem.