[google-appengine] JDO Query - Find error
Hello, I get following error: Problem with query SELECT FROM de.hsowl.google.evaluation.model.Appointment WHERE userPara == createdBy PARAMETERS String userPara: Unexpected expression type while parsing query: org.datanucleus.query.expression.ParameterExpression the Method: public ListAppointment getAppointments(User user) { PersistenceManager pm = PMF.get().getPersistenceManager(); Query q = pm.newQuery(Appointment.class); q.setFilter(userPara == createdBy); q.declareParameters(String userPara); ListAppointment queryResult = (ListAppointment) q.execute(user. getUserId()); return queryResult; } The important part of the object @PersistenceCapable(detachable = true) public class Appointment implements javax.jdo.listener.StoreCallback { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Long id; @Persistent private String createdBy; //contains the userid ... } How can I declare the Parameter correct? Have a nice day Benjamin -- You received this message because you are subscribed to the Google Groups Google App Engine group. To unsubscribe from this group and stop receiving emails from it, send an email to google-appengine+unsubscr...@googlegroups.com. To post to this group, send email to google-appengine@googlegroups.com. Visit this group at http://groups.google.com/group/google-appengine. To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/ab15e4e1-663d-489d-9fab-c4c01aee68f0%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[google-appengine] Re: White Page after Redirect?
uuuh, I forgot to encode the URL-Parameter in the Servlet... URLEncoder.encode(location, UTF8) Am Freitag, 9. Mai 2014 15:58:01 UTC+2 schrieb Benjamin Lietzau: I think the bug only appears, if the form contains Umlaute liek ä ü ö ß. But usually utf-8 is able to work with it... but the App Engine? Am Donnerstag, 6. März 2014 15:19:02 UTC+1 schrieb Benjamin Lietzau: There is a form with the action BlobstoreServiceFactory.getBlobstoreService().createUploadUrl(/save) form class=ink-form action=%= BlobstoreServiceFactory.getBlobstoreService().createUploadUrl(/save) % method=post onsubmit=return validate(this); accept-charset=utf-8 enctype=multipart/form-data The servlet still works (all lines will execute), but the redirect at the end of the servlet doesn't work form time to time. Then theres only a white Page. The URL in the URL-Field is like appspot.com/_ah/upload/verylongstring logger.log(Level.INFO, Redirect to result.jsp); resp.sendRedirect(/result.jsp?date= + startDate + searchText= + location); The logs are all ok. What could it be? -- You received this message because you are subscribed to the Google Groups Google App Engine group. To unsubscribe from this group and stop receiving emails from it, send an email to google-appengine+unsubscr...@googlegroups.com. To post to this group, send email to google-appengine@googlegroups.com. Visit this group at http://groups.google.com/group/google-appengine. For more options, visit https://groups.google.com/d/optout.
[google-appengine] Re: White Page after Redirect?
I think the bug only appears, if the form contains Umlaute liek ä ü ö ß. But usually utf-8 is able to work with it... but the App Engine? Am Donnerstag, 6. März 2014 15:19:02 UTC+1 schrieb Benjamin Lietzau: There is a form with the action BlobstoreServiceFactory.getBlobstoreService().createUploadUrl(/save) form class=ink-form action=%= BlobstoreServiceFactory.getBlobstoreService().createUploadUrl(/save) % method=post onsubmit=return validate(this); accept-charset=utf-8 enctype=multipart/form-data The servlet still works (all lines will execute), but the redirect at the end of the servlet doesn't work form time to time. Then theres only a white Page. The URL in the URL-Field is like appspot.com/_ah/upload/verylongstring logger.log(Level.INFO, Redirect to result.jsp); resp.sendRedirect(/result.jsp?date= + startDate + searchText= + location); The logs are all ok. What could it be? -- You received this message because you are subscribed to the Google Groups Google App Engine group. To unsubscribe from this group and stop receiving emails from it, send an email to google-appengine+unsubscr...@googlegroups.com. To post to this group, send email to google-appengine@googlegroups.com. Visit this group at http://groups.google.com/group/google-appengine. For more options, visit https://groups.google.com/d/optout.
Re: [google-appengine] White Page after Redirect?
I will try. At the moment it works... Am Donnerstag, 6. März 2014 21:49:11 UTC+1 schrieb Vinny P: On Thu, Mar 6, 2014 at 8:19 AM, Benjamin Lietzau ben...@gmail.comjavascript: wrote: There is a form with the action BlobstoreServiceFactory.getBlobstoreService().createUploadUrl(/save) The servlet still works (all lines will execute), but the redirect at the end of the servlet doesn't work form time to time. Then theres only a white Page. The URL in the URL-Field is like appspot.com/_ah/upload/verylongstring logger.log(Level.INFO, Redirect to result.jsp); resp.sendRedirect(/result.jsp?date= + startDate + searchText= + location); The logs are all ok. What could it be? The verylongstring URL is fine, since that's the way the blobstore handles uploads. However, you should be getting the redirect. Can you use your browser's developer tools (under Chrome, it's under the Tools Developer Tools menu) to see what redirects the client is getting? - -Vinny P Technology Media Advisor Chicago, IL App Engine Code Samples: http://www.learntogoogleit.com -- You received this message because you are subscribed to the Google Groups Google App Engine group. To unsubscribe from this group and stop receiving emails from it, send an email to google-appengine+unsubscr...@googlegroups.com. To post to this group, send email to google-appengine@googlegroups.com. Visit this group at http://groups.google.com/group/google-appengine. For more options, visit https://groups.google.com/d/optout.
[google-appengine] White Page after Redirect?
There is a form with the action BlobstoreServiceFactory.getBlobstoreService().createUploadUrl(/save) form class=ink-form action=%= BlobstoreServiceFactory.getBlobstoreService().createUploadUrl(/save) % method=post onsubmit=return validate(this); accept-charset=utf-8 enctype=multipart/form-data The servlet still works (all lines will execute), but the redirect at the end of the servlet doesn't work form time to time. Then theres only a white Page. The URL in the URL-Field is like appspot.com/_ah/upload/verylongstring logger.log(Level.INFO, Redirect to result.jsp); resp.sendRedirect(/result.jsp?date= + startDate + searchText= + location); The logs are all ok. What could it be? -- You received this message because you are subscribed to the Google Groups Google App Engine group. To unsubscribe from this group and stop receiving emails from it, send an email to google-appengine+unsubscr...@googlegroups.com. To post to this group, send email to google-appengine@googlegroups.com. Visit this group at http://groups.google.com/group/google-appengine. For more options, visit https://groups.google.com/groups/opt_out.