Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » app engine req.getParameter with type float
app engine req.getParameter with type float [message #835042] Mon, 02 April 2012 18:23 Go to next message
Natalia Molinero is currently offline Natalia MolineroFriend
Messages: 1
Registered: April 2012
Junior Member
Hi,


0down votefavorite

share [g+]share [fb]share [tw]



I'm trying to do something very similar to the Guestbook which is in the App Engine tutorial (get started). However, I want to modified the types of the fields in the form. Eclipse doesn't show any error, but the server says:

HTTP ERROR 500 Problem accessing /. Reason:
java.lang.String cannot be cast to java.lang.Long

Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Long at org.datanucleus.store.appengine.TypeConversionUtils$1.apply(TypeConversionUtils.java:47) at org.datanucleus.store.appengine.TypeConversionUtils$1.apply(TypeConversionUtils.java:45) at org.datanucleus.store.appengine.TypeConversionUtils.datastoreValueToPojoValue(TypeConversionUtils.java:317) at org.datanucleus.store.appengine.DatastoreFieldManager.fetchObjectField

This is what I'm doing:

@Persistent private float weight; 
public Greeting (User author, String content, Date date, String weight) { this.author = author; 
this.content = content; 
this.date = date; 
this.weight = Float.parseFloat(weight); } 
public float getWeight() { 
return weight; }


I don't know where the error is...

Thank you in advance!!
Re: app engine req.getParameter with type float [message #835141 is a reply to message #835042] Mon, 02 April 2012 21:12 Go to previous message
David Wegener is currently offline David WegenerFriend
Messages: 1445
Registered: July 2009
Senior Member
Not a JDT question. Ask in a Web Development forum.
Previous Topic:BugZilla... Is It Being Actioned?
Next Topic:Intellisense does not work for one class
Goto Forum:
  


Current Time: Tue Apr 23 14:09:56 GMT 2024

Powered by FUDForum. Page generated in 0.03922 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top