1 Reply Latest reply on Nov 26, 2006 1:31 PM by Wayne Hannam

    PersistenceException on GeneratedValue property

    Wayne Hannam Newbie

      I am running on JBoss 4.0.5 with the EJB3 install

      I have a stateless EJB that persists entities (POJOs) to a MySQL db (5.x).

      When I first deploy the EJB, entities insert,update and delete just fine. However, if I make a modification to the EJB, and re-deploy it, I get:

      javax.persistence.PersistenceException: org.hibernate.PropertyAccessException: IllegalArgumentException occurred
      calling getter of com.company.entity.EntityBean.EntityId

      EntityId is a GeneratedValue field of EntityBean

      My thought here, is that the EJB3 persistence engine is "loosing track" of the unique id value for EntityId, upon re-deployment, and thus cannot perform the insert.

      Is there anyway around this ? (Custom Id Generator)