Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Issue with embedded entities

Hi Patric,

  Based on what you say below, Guy and I agree that bug is not likely the problem.

Is there any way to try 2.3.2. The reason I suggest that is that assuming we are able to track down the issue, any patch we deliver will be on the 2.3.x stream - we currently do not have any additional 2.1.x patches planned.

-Tom

On 20/01/2012 2:47 PM, Patric Rufflar wrote:
Hi Guy,

I am not sure if I understand the bug correctly, but as far as I an see,
if this would be the case, the problem would be easily reproducible, at least it
would fail on the same operations over and over again.

But in my case it only happens very seldom (once a day in an average with a
total number of transactions surely greater than 10000 day).

Unfortunately no - because the problem happens only at the customer, I would not
see any differences easily.
Upgrading to 2.3.3 would introduce a large testing amount, so we cannot do this
(yet). A nightly build for production use is definitely not an option, of course.

Thanks,
Patric

Am 20.01.2012 19:44, schrieb Guy Pelletier:
Hi Patric,

I wonder if you are hitting this problem:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=365623

Any chance you could try a more recent version (nightly build) 2.3.3 or 2.4?

http://www.eclipse.org/eclipselink/downloads/nightly.php

Cheers,
Guy

On 20/01/2012 1:26 PM, Patric Rufflar wrote:
Hello,

I am facing a strange issue in EclipseLink 2.1.3 at a customer installation.
Occasionally (once a day on an average), it seems that EclipseLink misses an
@Embedded object inside a newly persisted entity
and does not insert its values.
The Insert fails because some of these columns (of the embedded object) are
defined as mandatory (db constraint). If this would not be the case, a data
loss would be the consequence.

Have a look at the log at level FINEST (during commit/flush): (anonymized)

execute_query, UpdateObjectQuery(Table1Class (some parts left out...),
recordInfo=CRecordInfo[colA=A, colB=C, colC=102283, colD=Wed Dec 28 11:43:33 CET
2011])
execute_query, InsertObjectQuery(Table2Class[CompositePK=pk[col1=2, col2=6633],
col3=2151225, col4=FLAG, col5=N, recordInfo=CRecordInfo[colA=A, colB=C,
colC=102283, colD=Wed Dec 28 11:43:33 CET 2011])
begin_batch_statements
UPDATE TABLE_1 (COL1, COL2, COLD, COLC, COL3) VALUES (?,?,?,?,?)
bind => [N, 2, 2011-12-28 11:43:33.804, 102283, 6633]
end_batch_statements
begin_batch_statements
INSERT INTO TABLE_2 (COL3, COL5, COL4, COL2, COL1) VALUES (?, ?, ?, ?, ?) <---
CRecordInfo Cols are missing!
bind => [2151225, N, FLAG, 2, 6633]
end_batch_statements


Local Exception Stack:
Exception [EclipseLink-4002] (Eclipse Persistence Services -
2.1.3.v20110304-r9073): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.BatchUpdateException: ORA-01400: cannot insert NULL
into ("PRODUCT"."TABLE_2"."COLC")

Error Code: 1400


The problem seems to be unrelated to specific entities/tables, it happens with
any kind of entities (all of them contain the same Embedded entity)
Maybe it related with Batch Writing, but that is just a guess.

Database is Oracle 10.2.
The customer is not able to reproduce it - but it happens from time to time
more or less regularly.
I was also not able to reproduce this in any other environment.

Why doesn't EclipseLink insert the columns of the embedded
object (colA,colB ...)? The embedded object and its values do clearly exist
(which you can see in line 2 of the log while printing the InsertObjectQuery).
Another embedded object of the same type (CRecordInfo) is successfully
processed in the UpdateQuery right before the errornous insert, as you can see
in the log, too.

Any help is appreciated. Thank you in advance.

Best regards,
Patric
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx <mailto: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

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


Back to the top