Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] Run-time exception with EclipseLink JPA 2.0 Employee example

I'm trying to run the EclipseLink JPA 2.0 Employee example:

I created a NetBeans project and configured persistence.xml to use Apache Derby.  It compiles fine, but when I run the Populate program, I get the following run-time exception:

Exception in thread "main" javax.persistence.RollbackException: Exception [EclipseLink-7251] (Eclipse Persistence Services - 2.0.0.v20091127-r5931): org.eclipse.persistence.exceptions.ValidationException
Exception Description: The attribute [type] of class [model.PhoneNumber] is mapped to a primary key column in the database. Updates are not allowed.
        at org.eclipse.persistence.internal.jpa.transaction.EntityTransactionImpl.commitInternal(
        at org.eclipse.persistence.internal.jpa.transaction.EntityTransactionImpl.commit(
        at example.Populate.populate(
        at example.Populate.main(

Any suggestions on how to get this example project to run correctly?

On a related note, NetBeans reports warning at line 70 of  
The attribute column name (PERIOD) is a reserved SQL:1999 keyword

Thanks in advance for any responses.

Back to the top