Return-Path: Delivered-To: apmail-cayenne-user-archive@www.apache.org Received: (qmail 91555 invoked from network); 2 Feb 2010 15:19:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 2 Feb 2010 15:19:21 -0000 Received: (qmail 75757 invoked by uid 500); 2 Feb 2010 15:19:21 -0000 Delivered-To: apmail-cayenne-user-archive@cayenne.apache.org Received: (qmail 75724 invoked by uid 500); 2 Feb 2010 15:19:21 -0000 Mailing-List: contact user-help@cayenne.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cayenne.apache.org Delivered-To: mailing list user@cayenne.apache.org Received: (qmail 75706 invoked by uid 99); 2 Feb 2010 15:19:21 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Feb 2010 15:19:21 +0000 X-ASF-Spam-Status: No, hits=1.8 required=10.0 tests=MIME_QP_LONG_LINE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [209.86.89.62] (HELO elasmtp-dupuy.atl.sa.earthlink.net) (209.86.89.62) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Feb 2010 15:19:11 +0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=dk20050327; d=earthlink.net; b=FKbk9mnW71JXrQr8WeLXX1zww/uGHcz85KJ3pfoAcvcrhcyK0VnxRvuGTzYL+JCY; h=Received:Content-Type:Mime-Version:Subject:From:In-Reply-To:Date:Content-Transfer-Encoding:Message-Id:References:To:X-Mailer:X-ELNK-Trace:X-Originating-IP; Received: from [24.253.146.147] (helo=[10.0.1.2]) by elasmtp-dupuy.atl.sa.earthlink.net with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.67) (envelope-from ) id 1NcKWg-0001kx-2g for user@cayenne.apache.org; Tue, 02 Feb 2010 10:18:50 -0500 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1077) Subject: Re: BUG: Cayenne Modeler From: Joe Baldwin In-Reply-To: <7e3605161002020630m7dc8e94fje4597754aec93eb9@mail.gmail.com> Date: Tue, 2 Feb 2010 10:18:49 -0500 Content-Transfer-Encoding: quoted-printable Message-Id: References: <7649FBC5-DCF0-47B9-99EE-2B4D161FA4EF@earthlink.net> <7e3605161002012007m5effc8c2j3cbdc25a378e35c7@mail.gmail.com> <3984F884-098C-4455-BAE1-D04B68A58508@earthlink.net> <86f0c84d1002020326p2af47605i49b6b36458d3d0fc@mail.gmail.com> <1D3776E2-4D14-4343-A396-E4A564138367@earthlink.net> <7e3605161002020630m7dc8e94fje4597754aec93eb9@mail.gmail.com> To: user@cayenne.apache.org X-Mailer: Apple Mail (2.1077) X-ELNK-Trace: 74aacf41df18ac9f85338a7d01cb3b6a7e972de0d01da940eb0a9d7bc74f1921710a08788335e9d2350badd9bab72f9c350badd9bab72f9c350badd9bab72f9c X-Originating-IP: 24.253.146.147 X-Virus-Checked: Checked by ClamAV on apache.org Kevin, I think we might have a communication problem. First of all let me say = that I will follow any instruction the team requests in order to solve = this problem. Cayenne is one of the best pieces of software I have ever = used. Also, I have my own methodology when analyzing a problem. The first = thing I do is establish what steps the user has taken. Since there are = quite a few ways to accomplish the same task in Cayenne Modeler (and = especially since I did this one in reverse order), I was hoping to = discuss the user procedure first since the dialog window didn't explain = much. So I either have missed some fundamental design step in using CM or I = should never have gotten the dialog window in the first place. Again, I don't want to bother the team with a problem if it is simply = user-procedure. In addition, if I increase the memory and it doesn't = crash then I still in a position in which I do not understand why I got = this message or what the modeler is doing to my design. So my first question is: what is the recommended method to create a = "to-one" relationship? If as someone explained that the CM is = suggesting, 'I don't need a foreign key' then how does the database keep = track of the relationship between the two tables? Thanks, Joe On Feb 2, 2010, at 9:30 AM, Kevin Menard wrote: > Hi Joe, >=20 > Please find comments in-line. >=20 >=20 > On Tue, Feb 2, 2010 at 9:09 AM, Joe Baldwin = wrote: >=20 >> The behavior by an app in which it freezes for about 3-4 minutes and = then >> generates an out-of-memory-error is typically associated with an = infinite >> loop. Increasing the available memory to an app does nothing to = analyze the >> problem. >>=20 >=20 > An infinite loop should manifest itself as a stack overflow issue, not = an > out of memory one. I'm not saying it can't happen, but an OOME = doesn't mean > that there's an infinite loop. By your description of the problem, it = was a > large model. So, there are other ways that memory use could explode = and we > won't really have a better idea until you try increasing the heap = size. > That's simply the nature of the halting problem. >=20 >=20 >>=20 >> It is more likely to be associated the the CM attempting to "remove = the >> foreign key" as the CM dialog suggested. If the CM algorithm = responsible for >> accomplishing this task is somehow faulty it could have easily = resulted in >> an out of memory error. >>=20 >> If on the other hand there is no error in the algorithm and this task >> requires and extraordinary amount of memory then it still points to = the >> assumptions associated with the algorithm and its memory = requirements. >>=20 >=20 > Certainly. No one is suggesting to the contrary. I'm just trying to = get > more information to help diagnose the issue. Without your data model, = it's > not something I can easily replicate. >=20 >=20 >>=20 >> Still, it is not clear what the CM-dialog is attempting to accomplish = or >> rectify (an associated, we-usually-do-it-this-way would help in these = types >> of cases), so either the CM has mis-analysed or the user has made a >> procedural error. Either way the CM should not go into some = functionality >> that takes 3-4 minutes and then runs out of memory. >>=20 >> In addition, simply dismissing the CM's dialog window with the = "remove the >> foreign key?" question results in no out of memory error. This would = not >> typically happen if the CM were operating with insufficient memory. >>=20 >=20 > If it is indeed the removing of the foreign key that is causing an = OOME, it > still would point at Cayenne operating with insufficient memory. The > application's memory footprint is not static. >=20 >=20 >>=20 >> Therefore, the facts tend to point towards some exceptional condition = that >> should be caught by the CM. If there is something missing in the = user >> configuration then this might be an opportunity to have the CM point = this >> out. >>=20 >=20 >=20 > There is no logical entailment from any of the facts that suggest the > problem at this stage. All we know for certain is you operated on a = large > dataset and ran out of memory. Occam's Razor would suggest you just = need > more memory. Please try bumping the heap size and report and we can = get a > better idea. If it truly is a memory issue, we can investigate = reductions > in the allocated memory and provide a different max heap size by = default. >=20 > --=20 > Kevin >=20 >=20 >>=20 >>=20 >>=20 >>=20 >> On Feb 2, 2010, at 6:26 AM, Bryan Lewis wrote: >>=20 >>> Sure, but you can run the modeler with an increased heap size, like >>>=20 >>> java.exe -Xmx512m -jar CayenneModeler.jar >>>=20 >>>=20 >>>=20 >>> On Mon, Feb 1, 2010 at 11:25 PM, Joe Baldwin = >> wrote: >>>=20 >>>> The CayenneModeler crashed not my app. >>>>=20 >>>>=20 >>>>=20 >>>>=20 >>>> On Feb 1, 2010, at 11:07 PM, Kevin Menard wrote: >>>>=20 >>>>> Hi Joe, >>>>>=20 >>>>> It looks like you would have needed to increased the -Xmx JVM = property. >>>> Did >>>>> you actually corrupt any data in the process? If not, I'd suggest >>>>> re-running with an increased heap value. Otherwise, please file a = JIRA >>>>> issue describing the problem. >>>>>=20 >>>>> -- >>>>> Kevin >>>>>=20 >>>>>=20 >>>>> On Sun, Jan 31, 2010 at 6:11 PM, Joe Baldwin = >>>> wrote: >>>>>=20 >>>>>> Tried to save a project with a new Entity (which had a many to = one >>>>>> relationship). When I selected "Save" the following panel was >>>> displayed: >>>>>>=20 >>>>>> Remove Foreign Keys mapped as object attributes? >>>>>>=20 >>>>>> Not sure what this would accomplish, I selected "Yes", which = appears >> to >>>> be >>>>>> the wrong answer because Cayenne Modeler crashed big time. (see = auto >>>> report >>>>>> below) >>>>>>=20 >>>>>> Joe >>>>>>=20 >>>>>> CayenneModeler Info >>>>>> Version: cayenne.version >>>>>> Build Date: cayenne.build.date >>>>>> Exception: >>>>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>>>>> java.lang.OutOfMemoryError: Java heap space >>>>>> at >>>>>>=20 >>>>=20 >> = java.util.Collections$UnmodifiableCollection.iterator(Collections.java:100= 6) >>>>>> at >>>>>>=20 >>>>=20 >> = org.apache.cayenne.map.ObjEntity.getAttributeForDbAttribute(ObjEntity.java= :845) >>>>>> at >>>>>>=20 >>>>=20 >> = org.apache.cayenne.modeler.undo.DbEntitySyncUndoableEdit$MeaningfulFKsUndo= ableEdit.(DbEntitySyncUndoableEdit.java:96) >>>>>> at >>>>>>=20 >>>>=20 >> = org.apache.cayenne.modeler.action.DbEntitySyncAction.synchDbEntity(DbEntit= ySyncAction.java:95) >>>>>> at >>>>>>=20 >>>>=20 >> = org.apache.cayenne.modeler.action.DbEntitySyncAction.performAction(DbEntit= ySyncAction.java:60) >>>>>> at >>>>>>=20 >>>>=20 >> = org.apache.cayenne.modeler.util.CayenneAction.actionPerformed(CayenneActio= n.java:163) >>>>>> at >>>>>>=20 >> = javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2028) >>>>>> at >>>>>>=20 >>>>=20 >> = javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:235= 1) >>>>>> at >>>>>>=20 >>>>=20 >> = javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java= :387) >>>>>> at >>>>>> = javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242) >>>>>> at >>>>>>=20 >>>>=20 >> = javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListen= er.java:236) >>>>>> at >>>>>>=20 >> = java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272) >>>>>> at java.awt.Component.processMouseEvent(Component.java:6348) >>>>>> at = javax.swing.JComponent.processMouseEvent(JComponent.java:3255) >>>>>> at java.awt.Component.processEvent(Component.java:6113) >>>>>> at java.awt.Container.processEvent(Container.java:2085) >>>>>> at java.awt.Component.dispatchEventImpl(Component.java:4714) >>>>>> at java.awt.Container.dispatchEventImpl(Container.java:2143) >>>>>> at java.awt.Component.dispatchEvent(Component.java:4544) >>>>>> at >>>>>> = java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4618) >>>>>> at >>>>>> = java.awt.LightweightDispatcher.processMouseEvent(Container.java:4282) >>>>>> at >>>> java.awt.LightweightDispatcher.dispatchEvent(Container.java:4212) >>>>>> at java.awt.Container.dispatchEventImpl(Container.java:2129) >>>>>> at java.awt.Window.dispatchEventImpl(Window.java:2475) >>>>>> at java.awt.Component.dispatchEvent(Component.java:4544) >>>>>> at java.awt.EventQueue.dispatchEvent(EventQueue.java:635) >>>>>> at >>>>>>=20 >>>>=20 >> = java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.ja= va:296) >>>>>> at >>>>>>=20 >>>>=20 >> = java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:= 211) >>>>>> at >>>>>>=20 >>>>=20 >> = java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.ja= va:201) >>>>>> at >>>>>> = java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196) >>>>>> at >>>>>> = java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188) >>>>>> at = java.awt.EventDispatchThread.run(EventDispatchThread.java:122) >>>>>>=20 >>>>>>=20 >>>>>>=20 >>>>>>=20 >>>>=20 >>>>=20 >>=20 >>=20