Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Problem with sequence after upgrade from 2.6-M3 to 2.6 (or 2.6.1-RC1)

Hi Karl,

 

I have used a simple test case to try and replicate this issue but was unable to do so (one difference is I am using SQL Server 2014).

If possible, please provide a simple self-contained test case which replicates this issue which could be used for further investigating this.

In case you would need to take a look at my test case and try running that against your setup, you may download it using this link.

 

Kind regards,

Petros Splinakis

 

From: Karl Kildén [mailto:karl.kilden@xxxxxxxxx]
Sent: Monday, June 29, 2015 10:17 AM
To: eclipselink-users@xxxxxxxxxxx
Subject: [eclipselink-users] Problem with sequence after upgrade from 2.6-M3 to 2.6 (or 2.6.1-RC1)

 

Hello,

 

Been running the same project with various versions of eclipselink for a long time and never had any issues in this area. Did not change anything for a long time regarding sequences but when I upgrade to 2.6.0 from 2.6-M3 I get this strange error:

Caused by: Exception [EclipseLink-7027] (Eclipse Persistence Services - 2.6.1.v20150605-31e8258): org.eclipse.persistence.exceptions.ValidationException

Exception Description: The sequence named [mp_seq] is setup incorrectly.  Its increment does not match its pre-allocation size.

            at org.eclipse.persistence.exceptions.ValidationException.sequenceSetupIncorrectly(ValidationException.java:1607)

            at org.eclipse.persistence.sequencing.StandardSequence.createVector(StandardSequence.java:96)

            at org.eclipse.persistence.sequencing.StandardSequence.getGeneratedVector(StandardSequence.java:75)

            at org.eclipse.persistence.sequencing.Sequence.getGeneratedVector(Sequence.java:257)

            at org.eclipse.persistence.internal.sequencing.SequencingManager$Preallocation_NoTransaction_State.getNextValue(SequencingManager.java:683)

            at org.eclipse.persistence.internal.sequencing.SequencingManager.getNextValue(SequencingManager.java:1107)

            at org.eclipse.persistence.internal.sequencing.ClientSessionSequencing.getNextValue(ClientSessionSequencing.java:70)

            at org.eclipse.persistence.internal.descriptors.ObjectBuilder.assignSequenceNumber(ObjectBuilder.java:362)

            at org.eclipse.persistence.internal.descriptors.ObjectBuilder.assignSequenceNumber(ObjectBuilder.java:321)

            at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.assignSequenceNumber(UnitOfWorkImpl.java:486)

            at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.assignSequenceNumber(UnitOfWorkImpl.java:471)

            at org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.cloneAndRegisterNewObject(RepeatableWriteUnitOfWork.java:604)

            at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalRegisterObject(UnitOfWorkImpl.java:2937)

            at org.eclipse.persistence.internal.sessions.MergeManager.registerObjectForMergeCloneIntoWorkingCopy(MergeManager.java:1087)

            at org.eclipse.persistence.internal.sessions.MergeManager.mergeChangesOfCloneIntoWorkingCopy(MergeManager.java:557)

            at org.eclipse.persistence.internal.sessions.MergeManager.mergeChanges(MergeManager.java:313)

            at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.mergeCloneWithReferences(UnitOfWorkImpl.java:3521)

            at org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.mergeCloneWithReferences(RepeatableWriteUnitOfWork.java:387)

            at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.mergeCloneWithReferences(UnitOfWorkImpl.java:3481)

            at org.eclipse.persistence.internal.jpa.EntityManagerImpl.mergeInternal(EntityManagerImpl.java:553)

            at org.eclipse.persistence.internal.jpa.EntityManagerImpl.merge(EntityManagerImpl.java:530)

            at org.apache.openejb.persistence.JtaEntityManager.merge(JtaEntityManager.java:154)

            at org.apache.webbeans.custom.persistence.EntityManager$$OwbNormalScopeProxy0.merge(javax/persistence/EntityManager.java)

            at org.apache.deltaspike.data.impl.handler.EntityRepositoryHandler.save(EntityRepositoryHandler.java:71)

            at org.apache.deltaspike.data.impl.handler.EntityRepositoryHandler.saveAndFlush(EntityRepositoryHandler.java:78)

            ... 43 more

 

 

I am using SQL Server 2012 and this is my sequence:

            @Id

            @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "mp_seq")

            @SequenceGenerator(name = "mp_seq", sequenceName = "mp_seq", allocationSize = 1)

            protected long id;

 

 

Any ideas?

 

cheers


Back to the top