Return-Path: Delivered-To: apmail-incubator-cayenne-user-archive@locus.apache.org Received: (qmail 61994 invoked from network); 20 Dec 2006 15:52:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 20 Dec 2006 15:52:35 -0000 Received: (qmail 56017 invoked by uid 500); 20 Dec 2006 15:52:41 -0000 Delivered-To: apmail-incubator-cayenne-user-archive@incubator.apache.org Received: (qmail 56006 invoked by uid 500); 20 Dec 2006 15:52:41 -0000 Mailing-List: contact cayenne-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cayenne-user@incubator.apache.org Delivered-To: mailing list cayenne-user@incubator.apache.org Received: (qmail 55997 invoked by uid 99); 20 Dec 2006 15:52:41 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Dec 2006 07:52:41 -0800 X-ASF-Spam-Status: No, hits=0.6 required=10.0 tests=NO_REAL_NAME X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [193.108.184.25] (HELO mail.gi-de.com) (193.108.184.25) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Dec 2006 07:52:31 -0800 Received: from notessmtp1.domino.intern [10.4.4.49] by mail.gi-de.com id 7BO4ETTC outgoing id 7BO4ETTC; 20 Dec 2006 16:52:08 +0100 Subject: Loosing references to foreign objects -> update will fail To: cayenne-user@incubator.apache.org X-Mailer: Lotus Notes Release 7.0.1 January 17, 2006 Message-ID: From: Florian.Eska@gi-de.com Date: Wed, 20 Dec 2006 16:52:06 +0100 X-MIMETrack: Serialize by Router on NOTESSMTP1/SRV/GuD(Release 7.0.2|September 26, 2006) at 20.12.2006 16:52:07 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII X-Virus-Checked: Checked by ClamAV on apache.org Hallo, in our application we loose sometimes the reference to a mandatory foreign object (not null, foreign key) Our object relation are Export Container -> products product -> client product -> image product -> state The problem occurs in our exporter process. It works like Begin Transaction Select all products that are in the correct state Create the export container export all product information including the image blob to file (read the objects into the memory) change the export container content for each product create the following state of the process (update of the product row and create a new state row) commit Transaction During the commit some of the products have no reference to a client object. => Update will fail because no mandatory object reference exist. (org.objectstyle.cayenne.validation.ValidatiionException Product.client: "client" is required.) The database contains the correct client relation. So it will run correct if we reduce the max. exported products to 100. But for a other run with other data we exported 500 products per export run. Also we have attached to the running process and so we see no memory problem, because it occure if we have around 300 MB free memory in the jvm. For a test run we also changed the implementation. So step 6 will also make a commit for each product update :-(. The result is that we can export the first 480 products, than we got the error. Than we have additional product in the correct state to export. So we will export in the example 180 and after 176 we got an additonal error. Afterwards we export the last 4 without a problem. So for us it seems that we loose during the processing the references of some of out products. The corrupt products hat the persistent state 3 (Commited) and after the change state 4 (Modified). The persistent state seems for us okay. Our Environment: Windows XP Oracle Cayenne 1.2 Jboss Jdk 1.5.0.5 thanks florian