Google App Engine JDO error caused by GregorianCalendar ?
Posted
by Frank
on Stack Overflow
See other posts from Stack Overflow
or by Frank
Published on 2010-04-26T17:30:03Z
Indexed on
2010/04/26
17:33 UTC
Read the original article
Hit count: 330
My class looks like this :
import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;
@PersistenceCapable(identityType=IdentityType.APPLICATION)
public class Contact_Info implements Serializable
{
@PrimaryKey
@Persistent(valueStrategy=IdGeneratorStrategy.IDENTITY)
Long Id;
public static final long serialVersionUID=26362862L;
@Persistent
String Contact_Id="";
@Persistent
GregorianCalendar Date_1;
public Contact_Info() { }
public void setId(Long value) { Id=value; }
public Long getId() { return Id; }
public void setContact_Id(String value) { Contact_Id=value; }
public String getContact_Id() { return Contact_Id; }
public void setDate_1(GregorianCalendar value) { Date_1=value; }
public GregorianCalendar getDate_1() { return Date_1; }
public String toString() { return Contact_Id; }
}
When it's run, I got the following error :
java.lang.UnsupportedOperationException org.datanucleus.store.appengine.EntityUtils.getPropertyName(EntityUtils.java:62) org.datanucleus.store.appengine.DatastoreFieldManager.storeObjectField(DatastoreFieldManager.java:839) org.datanucleus.state.AbstractStateManager.providedObjectField(AbstractStateManager.java:1037) PayPal_Monitor.Contact_Info.jdoProvideField(Contact_Info.java) PayPal_Monitor.Contact_Info.jdoProvideFields(Contact_Info.java) org.datanucleus.state.JDOStateManagerImpl.provideFields(JDOStateManagerImpl.java:2715) org.datanucleus.store.appengine.DatastorePersistenceHandler.insertPreProcess(DatastorePersistenceHandler.java:341) org.datanucleus.store.appengine.DatastorePersistenceHandler.insertObjects(DatastorePersistenceHandler.java:251)
If I take out the "GregorianCalendar Date_1", it works correctly, what should I do to fix it ? I do need the date in it.
Frank
© Stack Overflow or respective owner