Overriding Toplink Preallocation Size Fails With NullPointerException While Using Oracle Native Sequencing (Doc ID 1266883.1)

Last updated on SEPTEMBER 10, 2014

Applies to:

Oracle TopLink - Version 9.0.4.1 and later
Information in this document applies to any platform.

Symptoms

When trying to override the Toplink project level pre-allocation size, it fails with NullPointerException.  On the database, Oracle Native sequencing was used.

[TopLink Finest]: 2010.11.03 11:14:14.203--UnitOfWork(3431235)--Thread(Thread[main,5,main])--Register the new container bean project1.Employees@1ff2e1b
[TopLink Finer]: 2010.11.03 11:14:14.203--UnitOfWork(3431235)--Thread(Thread[main,5,main])--begin unit of work commit
[TopLink Warning]: 2010.11.03 11:14:14.203--UnitOfWork(3431235)--Thread(Thread[main,5,main])--java.lang.NullPointerException
at oracle.toplink.sequencing.NativeSequence.buildSelectQuery(NativeSequence.java:49)
at oracle.toplink.sequencing.QuerySequence.select(QuerySequence.java:261)
at oracle.toplink.sequencing.QuerySequence.updateAndSelectSequence(QuerySequence.java:216)
at oracle.toplink.sequencing.StandardSequence.getGeneratedVector(StandardSequence.java:58)
at oracle.toplink.sequencing.Sequence.getGeneratedVector(Sequence.java:229)
at oracle.toplink.internal.sequencing.SequencingManager$Preallocation_NoTransaction_State.getNextValue(SequencingManager.java:510)
at oracle.toplink.internal.sequencing.SequencingManager.getNextValue(SequencingManager.java:864)
at oracle.toplink.internal.sequencing.ClientSessionSequencing.getNextValue(ClientSessionSequencing.java:75)
at oracle.toplink.internal.descriptors.ObjectBuilder.assignSequenceNumber(ObjectBuilder.java:204)
at oracle.toplink.publicinterface.UnitOfWork.assignSequenceNumbers(UnitOfWork.java:401)
at oracle.toplink.publicinterface.UnitOfWork.collectAndPrepareObjectsForCommit(UnitOfWork.java:841)
at oracle.toplink.publicinterface.UnitOfWork.commitToDatabaseWithChangeSet(UnitOfWork.java:1392)
at oracle.toplink.publicinterface.UnitOfWork.commitRootUnitOfWork(UnitOfWork.java:1164)
at oracle.toplink.publicinterface.UnitOfWork.commit(UnitOfWork.java:932)
at project1.JavaServiceFacade.persistEntity(JavaServiceFacade.java:52)
at project1.JavaServiceFacade.main(JavaServiceFacade.java:42)

 

 

Changes

Overriding the preallocation size while using Oracle Native sequencing.

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms