Hi:
I upgrade to Objectify-2.1.1 with GAE-1.3.6 and retest the guestbook
tutorial. I get the exception while persisting the greeting object to
the datastore. I notice the ObjectifyOpts is new in this 2.1.1 version.
[java] WARNING: /sign
[java] java.lang.IllegalArgumentException: opts:
com.googlecode.objectify.ObjectifyOpts is not a supported property type.
[java] at
com.google.appengine.api.datastore.DataTypeUtils.checkSupportedSingleValue(DataTypeUtils.java:184)
[java] at
com.google.appengine.api.datastore.DataTypeUtils.checkSupportedValue(DataTypeUtils.java:157)
[java] at
com.google.appengine.api.datastore.DataTypeUtils.checkSupportedValue(DataTypeUtils.java:123)
[java] at
com.google.appengine.api.datastore.Entity.setUnindexedProperty(Entity.java:300)
[java] at
com.googlecode.objectify.impl.save.FieldSaver.setEntityProperty(FieldSaver.java:156)
[java] at
com.googlecode.objectify.impl.save.LeafFieldSaver.saveValue(LeafFieldSaver.java:94)
[java] at
com.googlecode.objectify.impl.save.FieldSaver.save(FieldSaver.java:139)
[java] at
com.googlecode.objectify.impl.save.ClassSaver.save(ClassSaver.java:110)
[java] at
com.googlecode.objectify.impl.Transmog.save(Transmog.java:342)
[java] at
com.googlecode.objectify.impl.EntityMetadata.toEntity(EntityMetadata.java:230)
[java] at
com.googlecode.objectify.impl.ObjectifyImpl.put(ObjectifyImpl.java:195)
[java] at
com.budhnet.aas.service.process.GenericDao.put(GenericDao.java:140)
[java] at
com.budhnet.aas.service.process.Greeting.storeGreeting(Greeting.java:104)
[java] at
com.budhnet.aas.service.process.SignGuestbookServlet.doPost(SignGuestbookServlet.java:50)
My constructors of genericDAO are:
@SuppressWarnings("unchecked")
public GenericDao(){ // DAO without transaction
super();
clazz = ((Class) ((ParameterizedType)
getClass().getGenericSuperclass()).getActualTypeArguments()[0]);
}
@SuppressWarnings("unchecked")
public GenericDao(boolean transactional){ // DAO with transaction
super(transactional);
clazz = ((Class) ((ParameterizedType)
getClass().getGenericSuperclass()).getActualTypeArguments()[0]);
}
and constructors for the greeting are:
public Greeting() { super(); }
public Greeting(boolean transactional) { super(transactional); }
public Greeting(User author, String content, Date date) {
this.author = author;
this.content = content;
this.date = date;
clazz = ((Class) ((ParameterizedType)
getClass().getGenericSuperclass()).getActualTypeArguments()[0]);
}
The sigGuestbookServlet has:
Greeting greeting = new Greeting(user, content, new Date());
greeting.storeGreeting();
resp.sendRedirect("/guestbook.jsp");
Any suggested solution?
Thanks
BaTien
DBGROUPS and BudhNet
--
You received this message because you are subscribed to the Google Groups
"Google App Engine" 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-appengine?hl=en.