Hi Subbu, Google App Engine has a whitelist of classes that are allowed for use, and unfortunately ut seems like InitialContext didn't make the cut. Please see http://code.google.com/appengine/docs/java/runtime.html#The_Sandbox and the section after it.
Also, Google App Engine questions are better answered in its Google Group at http://groups.google.com/group/google-appengine-java jason On Mon, Jun 8, 2009 at 9:10 AM, subbu <[email protected]> wrote: > > Hi all,. > > I am getting the Following exception in my eclipse IDE > > javax.naming.InitialContext is not supported by Google App Engine's > Java runtime environment > > while using the Following code. > > public static Connection openConnection(String jndi) throws > NamingException, SQLException { > Context ct = new InitialContext(); > Context env = (Context)ct.lookup("java:comp/env"); > DataSource ds = (DataSource)env.lookup(jndi); > Connection con = ds.getConnection(); > > return con; > } > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~----------~----~----~----~------~----~------~--~---
