app engine req.getParameter with type float
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(DatastoreFieldManager.java:331)
	at org.datanucleus.store.appengine.DatastoreFieldManager.fetchIntField(DatastoreFieldManager.java:435)
	at org.datanucleus.state.AbstractStateManager.replacingIntField(AbstractStateManager.java:1132)
	at prototipo2.Greeting.jdoReplaceField(Greeting.java)
	at prototipo2.Greeting.jdoReplaceFields(Greeting.java)


For example, I've create a field called "distance", which is a float, in this way:

          float distance = Integer.parseInt(req.getParameter("distance"));
   
And, in the "Greeting" class:

          @Persistent
	private Float distance;
          public Float getDistance() {
		return distance;
	}

I don't konw where the error coulb be.
Thank you in advance!
app engine req.getParameter with type float
===

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(DatastoreFieldManager.java:331)
	at org.datanucleus.store.appengine.DatastoreFieldManager.fetchIntField(DatastoreFieldManager.java:435)
	at org.datanucleus.state.AbstractStateManager.replacingIntField(AbstractStateManager.java:1132)
	at prototipo2.Greeting.jdoReplaceField(Greeting.java)
	at prototipo2.Greeting.jdoReplaceFields(Greeting.java)


For example, I've create a field called "distance", which is a float, in this way:

          float distance = Integer.parseInt(req.getParameter("distance"));
   
And, in the "Greeting" class:

          @Persistent
	private Float distance;
          public Float getDistance() {
		return distance;
	}

I don't konw where the error coulb be.
Thank you in advance!