Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] ECLIPSELINK-4011: Any more information?

OK...what I had noticed when running JPA-only unit tests was that the JPA provider takes care of populating these rows, provided that @TableGenerator is filled out properly.

In my JPA-only unit tests, I do not do anything other than create this table.

In my embedded Glassfish integration tests (where this error is occurring), I use the same database setup code (I deliberately do NOT leave this up to the JPA provider--I create the tables using Liquibase).  So, again, I perform no insertions of any rows in this table.  Again, such a setup works fine for our hundreds of JPA-only unit tests: it appears that EclipseLink has no problem adding rows to this table automatically as necessary.

For some reason, this doesn't seem to be occurring when EclipseLink-running-in-Glassfish starts up.

Still looking for more ways to debug this.  :-)

Thanks very much for your advice.

Best,
Laird

On Tue, Aug 30, 2011 at 1:08 PM, Andrei Ilitchev <andrei.ilitchev@xxxxxxxxxx> wrote:
Probably sequence table is not populated: either the whole row corresponding to the sequence_name is missing or last_value is null.


On 8/30/2011 12:37 PM, Laird Nelson wrote:
How can I tell, specifically, how the table I've designated (and
successfully created) for JPA sequences is broken?  I'm getting
ECLIPSELINK-4011 ("Error preallocating sequence numbers. The sequence
table information is not complete.").  I'm using EclipseLink 2.2.0 with
the logging turned up to FINEST.  The SQL output at the FINE level is
what I would expect.  A snippet follows:

Aug 30, 2011 11:58:55 AM
org.eclipse.persistence.session.file:/var/folders/BT/BT0U2CqlGHuq-S5z-Xo
6E
TI/-Tmp-/gfembed1384539542393785361tmp/applications/test-classes/_ngp.sql
FINE: UPDATE test.ngp.jpa_sequence SET last_value = last_value + ? WHERE
sequence_name = ?
    bind => [2 parameters bound]
Aug 30, 2011 11:58:55 AM
org.eclipse.persistence.session.file:/var/folders/BT/BT0U2CqlGHuq-S5z-Xo
6E
TI/-Tmp-/gfembed1384539542393785361tmp/applications/test-classes/_ngp.sql
FINE: SELECT last_value FROM test.ngp.jpa_sequence WHERE sequence_name = ?
    bind => [1 parameter bound]
Aug 30, 2011 11:58:55 AM
org.eclipse.persistence.session.file:/var/folders/BT/BT0U2CqlGHuq-S5z-Xo
6E   TI/-Tmp-/gfembed1384539542393785361tmp/applications/test-classes/_ngp
WARNING:
Local Exception Stack:
Exception [EclipseLink-4011] (Eclipse Persistence Services -
2.2.0.v20110202-r8913): org.eclipse.persistence.exceptions.DatabaseException
Exception Description: Error preallocating sequence numbers.  The
sequence table information is not complete.
    at
org.eclipse.persistence.exceptions.DatabaseException.errorPreallocatingSequenceNumbers(DatabaseException.java:143)
    at
org.eclipse.persistence.sequencing.StandardSequence.getGeneratedVector(StandardSequence.java:73)
    at
org.eclipse.persistence.sequencing.Sequence.getGeneratedVector(Sequence.java:257)
    at
org.eclipse.persistence.internal.sequencing.SequencingManager$Preallocation_Transaction_NoAccessor_State.getNextValue(SequencingManager.java:474)
    at
org.eclipse.persistence.internal.sequencing.SequencingManager.getNextValue(SequencingManager.java:961)
    at
org.eclipse.persistence.internal.sequencing.ClientSessionSequencing.getNextValue(ClientSessionSequencing.java:70)
    at
org.eclipse.persistence.internal.descriptors.ObjectBuilder.assignSequenceNumber(ObjectBuilder.java:292)
    at
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.assignSequenceNumber(UnitOfWorkImpl.java:454)
    at
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.registerNotRegisteredNewObjectForPersist(UnitOfWorkImpl.java:4190)
    at
org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.registerNotRegisteredNewObjectForPersist(RepeatableWriteUnitOfWork.java:493)
    at
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.registerNewObjectForPersist(UnitOfWorkImpl.java:4135)
    at
org.eclipse.persistence.internal.jpa.EntityManagerImpl.persist(EntityManagerImpl.java:406)
    at
com.sun.enterprise.container.common.impl.EntityManagerWrapper.persist(EntityManagerWrapper.java:269)

Best,
Laird

--
http://about.me/lairdnelson



_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users



--
http://about.me/lairdnelson


Back to the top