Announcement Announcement Module
No announcement yet.
"id cannot be zero" on google appEngine Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • "id cannot be zero" on google appEngine

    I got the exception "id cannot be zero" from google appEngine when a new record is going to be inserted.
    The application is gwt + spring roo. The gwt work is done by me, not generated by spring roo. It works fine before I switch it to google app engine.

    The code about id was generated by spring roo.

    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    private Long;

    The id will be populated by the database. The google appEngine does not allow id to be zero. How does it work? Thanks,

    Caused by: java.lang.IllegalArgumentException: id cannot be zero
    at teKey(
    at teKey(
    at ger.storePrimaryKey( )
    at ger.storeObjectField( 4)
    at org.datanucleus.state.AbstractStateManager.provide dObjectField(
    at my.alarm.domain.Item.jdoProvideField(
    at my.alarm.domain.Item.jdoProvideFields(
    at org.datanucleus.state.JDOStateManagerImpl.provideF ields(
    at ceHandler.insertPreProcess(DatastorePersistenceHan
    at ceHandler.insertObjects(DatastorePersistenceHandle
    at ceHandler.insertObject(DatastorePersistenceHandler .java:240)
    at org.datanucleus.state.JDOStateManagerImpl.internal MakePersistent(
    at org.datanucleus.state.JDOStateManagerImpl.flush(JD
    at org.datanucleus.ObjectManagerImpl.flushInternal(Ob
    at org.datanucleus.ObjectManagerImpl.flush(ObjectMana
    at org.datanucleus.ObjectManagerImpl.preCommit(Object
    at org.datanucleus.TransactionImpl.internalPreCommit(
    at org.datanucleus.TransactionImpl.commit(Transaction
    at org.datanucleus.jpa.EntityTransactionImpl.commit(E
    at yTransactionImpl.commit(DatastoreEntityTransaction
    at org.springframework.orm.jpa.JpaTransactionManager. doCommit(

  • #2
    any body knows ?