Please post to the App Engine group and include a stack trace. This is server-side code, not GWT.
/dmc On Thu, Jul 7, 2011 at 2:21 PM, SwaminathanG <swami...@gmail.com> wrote: > Hello, > > I am trying to query the datastore from GWT client side code > > But it throws an exception '500 error' even while accessing the method. > > But we can insert into the datastore through other method. > > What am i missing? > > public String[] getStocks() throws NotLoggedInException { > checkLoggedIn(); > PersistenceManager pm = getPersistenceManager(); > List<String> symbols = new ArrayList<String>(); > try { > Query q = pm.newQuery(Stock.class, "user == u"); > q.declareParameters("com.google.appengine.api.users.User u"); > q.setOrdering("createDate"); > List<Stock> stocks = (List<Stock>) q.execute(getUser()); > for (Stock stock : stocks) { > symbols.add(stock.getSymbol()); > } > } finally { > pm.close(); > } > return (String[]) symbols.toArray(new String[0]); > } > > Regards, > Swaminathan.G > > -- > You received this message because you are subscribed to the Google Groups > "Google Web Toolkit" group. > To post to this group, send email to google-web-toolkit@googlegroups.com. > To unsubscribe from this group, send email to > google-web-toolkit+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/google-web-toolkit?hl=en. > -- David Chandler Developer Programs Engineer, GWT+GAE w: http://code.google.com/ b: http://turbomanage.wordpress.com/ b: http://googlewebtoolkit.blogspot.com/ t: @googledevtools -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.