openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevin Sutter <>
Date Wed, 02 Oct 2013 18:50:35 GMT
Hi Charles,
I looked a bit at the code in the call stack...  The message is a little
misleading.  The reference to "mapping" is just a reference to the Entity
being mapped.  The code is then attempting to access the sequence defined
for this Entity's primary key in the OPENJPA_SEQUENCE_TABLE.  When it can't
find that sequence row, the code attempts to insert a new row for this
sequence.  When that operation fails, then you get the logged message:

Caused by: java.sql.SQLException: There is no row for mapping
"com.mycompany.examples.persistence.part2.model.Incident" in sequence table
"OPENJPA_SEQUENCE_TABLE", and the attempt to insert a row has apparently

So, the message should probably say, "There is no row for mapping *the
primary key for* "com.mycompany.examples.persistence.part2.model.Incident"
in sequence table
"OPENJPA_SEQUENCE_TABLE", and the attempt to insert a row has apparently

This area of the code hasn't changed in a long time.  It's been pretty
standard processing for working with the sequence table since JPA 2.0 was
implemented.  When you say that previous releases worked okay, what release
of OpenJPA are you moving from?

I would also suggest tracing.  You can turn on OpenJPA tracing.  It's not
the best, but we do log all of the SQL that we generate and issue to the
database.  That might give a clue to which database and which table is
being used for each of these operations.  Maybe the schema name is
different from what's expected, or something similar?

What database is being used?  Tracing at the database level may also be
interesting and help figure out the source.

Like I mentioned, this code path has been pretty solid.  And, the junit
buckets are run constantly against all releases of OpenJPA.  I'm not aware
of any issues in this area, but maybe there's something unique with your
environment that puts us down the wrong path.  Let us know what you find


On Wed, Oct 2, 2013 at 11:49 AM, Charles Moulliard <>wrote:

> As OpenJPA is deployed on Apache Karaf (OSGI container), that will be
> difficult to create a unit test. I will try to use junit + pax exam to
> create something that we could use to reproduce the issue.
> BTW, this issue was not there with previous releases of OpenJPA
> --
> View this message in context:
> Sent from the OpenJPA Users mailing list archive at

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message