On Wed, May 18, 2011 at 10:43 PM, Brian Reilly <[email protected]>wrote:
> You need to work on your AvailabilityLocator implementation. Your
> implementation of getVersion() is returning null, which is exactly
> what the error message is telling you. Also, your implementation of
> find() isn't doing what it should, getIdType() is returning null
> (should return Long.class in this case), and getId() is converting an
> int to a String to a Long which is a pretty roundabout way of getting
> that result.
>
Thx, a lot!
But after changing server/AvailabilityLocator.java to:
import com.google.web.bindery.requestfactory.shared.Locator;
import dp.verp.model.Availability;
public class AvailabilityLocator extends Locator<Availability, Integer> {
@Override
public Availability create(Class<? extends Availability> aClass) {
return new Availability();
}
@Override
public Availability find(Class<? extends Availability> aClass, Integer
id) {
return new Availability();
}
@Override
public Class<Availability> getDomainType() {
return Availability.class;
}
@Override
public Integer getId(Availability availability) {
return availability.getId();
}
@Override
public Class<Integer> getIdType() {
return Integer.class;
}
@Override
public Object getVersion(Availability availability) {
return availability;
}
}
##################
I permanently get
[ERROR] Error for /gwtRequest
java.lang.StackOverflowError
at sun.misc.FloatingDecimal.<init>(FloatingDecimal.java:26)
at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1220)
at java.lang.Double.parseDouble(Double.java:510)
at
com.google.web.bindery.autobean.vm.impl.JsonSplittable.create(JsonSplittable.java:72)
at
com.google.web.bindery.autobean.shared.impl.StringQuoter.create(StringQuoter.java:46)
at
com.google.web.bindery.autobean.shared.ValueCodex$Type$10.encode(ValueCodex.java:155)
[...]
[ERROR] Stack overflow; to increase the stack size, use the -Xss flag at
startup (java -Xss1M ...)
...and setting -Xmx from 64 MB to -Xmx512m or -Xss1M doesn't solve the
problem:
--
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.