[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[eclipselink-users] Eclipselink-7197 Null primary key
|
Hey everybody!
I'm quite new to Eclipselink and I have a serious problem here, that I'm
trying to understand/solve for over a week now:
We have a web application using spring.
I create a new object and save it via jpaTemplate.persist();
Later I try to load it via jpaTemplate.find().
That results in an Eclipselink-7197-error:
Exception [EclipseLink-7197] (Eclipse Persistence Services - 1.0.2
(Build 20081024)):
org.eclipse.persistence.exceptions.ValidationException Exception
Description: Null primary key encountered in unit of work clone [null].
I don't understand what is going on here. Debugged it down to
RepeatableWriteUnitOfWork(UnitOfWorkImpl).commitToDatabaseWithChangeSet:
1321
There, the method calculateChanges() is called which throws the exception.
I have no clue what is meant by null primary key, as in the database
everything seems to be alright. No keys are null, negative or zero.
Everything is persisted.
Sometimes the same code works in the same scenario. In these cases the
commitToDB-Code seems not to be executed....
We had the same errors on another part of the system. After setting the
cachetype of one dependent object to FULL, the problem doesn't occur
anymore...
Anyone got an idea? I'm thankful for everything and any explanation (why
is there a commit happening?).
Thanx in advance,
Andi
--
Andreas König
Developer
andreas.koenig@xxxxxxxxxx
serie a logistics solutions AG
Hülchrather Straße 15
D-50670 Köln
T +49 221 500 60 7-21
F +49 221 500 60 7-07
Vorstand: Axel Löhr, Erwin Soldo
Aufsichtsrat: Adam Musialik (Vors.), Fritz Pleitgen, Hans Jörg Klofat
Amtsgericht Köln HRB 61725
www.serie-a.de