On 2015-02-19 10:15, Stefan Thieme wrote:
Gesendet: Mittwoch, 18. Februar 2015 um 16:51 Uhr
Von: "Julian Reschke" <[email protected]>
An: "Stefan Thieme" <[email protected]>
Cc: [email protected]
Betreff: Re: Aw: Re: [PATCH] [OAK-1914] RDB: Oracle support
On 2015-02-18 16:07, Stefan Thieme wrote:
(resend as text mail)
Dear Julian,
I have retried the test case (curl5) for the error I got when inserting a
previously deleted node on an Oracle 12c EE database.
I do get the same java.sql.SQLIntegrityConstraintViolation as initially
described for Oracle 11g.
See below for the table description / constraint on Oracle 12c.
Is there a way we could handle this Exception more gracefully, e.g. by throwing
a DocumentStoreException ?
Again, that exception is not supposed to occur.
I believe it is store.create(NODES, newNodes) that tries to commit/create the root node
("1:/test" in my case) again.
org.apache.jackrabbit.oak.plugins.document.Commit.applyToDocumentStore
...
try {
if (newNodes.size() > 0) {
// set commit root on new nodes
if (!store.create(NODES, newNodes)) {
// some of the documents already exist:
// try to apply all changes one by one
for (UpdateOp op : newNodes) {
if (op == commitRoot) {
...
As explained in OAK-1914 the exception is raised because the above code tries
to (re-)create the node in my case (create, delete and recreate a node).
Even though I have deleted the node in an earlier step the row is still in my
NODES table (which is by design and unquestionable correct), hence the
constraint violation when store.create(NODES, newNodes) is called.
The code then goes on to Update the node which is giving updated results in
NODES table, only the exception is left as a trace of the first try to recreate
it in my case.
So the code actually works, and the problem is just that an exception is
logged?
...
Best regards, Julian