cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Florian.E...@gi-de.com
Subject Re: Loosing references to foreign objects -> update will fail
Date Thu, 21 Dec 2006 08:15:59 GMT
Hi Andrus,

so your patched jar works for us in this case. The error doesn't occure any
more.

So first question.

What do you have changed, because we also tried the 1.2.1 version?

Thanks florian




                                                                           
             Andrus Adamchik                                               
             <andrus@objectsty                                             
             le.org>                                                    An 
                                         cayenne-user@incubator.apache.org 
             21.12.2006 07:38                                        Kopie 
                                                                           
                                                                     Thema 
              Bitte antworten            Re: Loosing references to foreign 
                    an                   objects -> update will fail       
             cayenne-user@incu                                             
             bator.apache.org                                              
                                                                           
                                                                           
                                                                           
                                                                           




I wonder if that's another consequence of this bug:

http://issues.apache.org/cayenne/browse/CAY-724

I implemented a fix that works in my application, but I still don't
fully understand the underlying cause of it. Still it looks like a
suspect here too. Anyways, here is a patched 1.2 jar file that I
uploaded here:

http://people.apache.org/~aadamchik/cayenne-1.2-patchCAY-724/

Try that first and let me know if it worked. If it doesn't, next
thing to check is the value of "Max Number of Objects" for the
DataDomain in the Modeler (default is 10000). You may try to increase
it to something higher.

Andrus



On Dec 20, 2006, at 5:52 PM, Florian.Eska@gi-de.com wrote:
> 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
>
>




Mime
View raw message