Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 15174 invoked from network); 4 Dec 2008 02:34:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Dec 2008 02:34:05 -0000 Received: (qmail 52766 invoked by uid 500); 4 Dec 2008 02:34:17 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 52743 invoked by uid 500); 4 Dec 2008 02:34:17 -0000 Mailing-List: contact dev-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openjpa.apache.org Delivered-To: mailing list dev@openjpa.apache.org Received: (qmail 52732 invoked by uid 99); 4 Dec 2008 02:34:17 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Dec 2008 18:34:16 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Dec 2008 02:32:56 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 28CBD234C2A1 for ; Wed, 3 Dec 2008 18:33:44 -0800 (PST) Message-ID: <151339365.1228358024162.JavaMail.jira@brutus> Date: Wed, 3 Dec 2008 18:33:44 -0800 (PST) From: "Fernando (JIRA)" To: dev@openjpa.apache.org Subject: [jira] Created: (OPENJPA-813) slices: em.getReference somewhat buggy MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org slices: em.getReference somewhat buggy -------------------------------------- Key: OPENJPA-813 URL: https://issues.apache.org/jira/browse/OPENJPA-813 Project: OpenJPA Issue Type: Bug Components: kernel Affects Versions: 2.0.0 Reporter: Fernando Priority: Minor It's hard for me to reproduce, but wanted to post a bug, to slowly build any evidence we can find to fix this bug. I used to do lots of em.getReference (because I got confused, and used that instead fo em.find). In non-slice code, it worked perfectly fine. But when I used slices, it would fail, but not in a very predictable/reproducable manner. let me try to explain. Here is some code that failed for me: Team team = em.getReference( teamId ); String name = team.getFullName(); I would get a reference to the Team object. And even at the next line, when I tried to access a field from that object, it would throw an exception, complaining that the object did not exist any longer. For some reason it did not find the object. So I tried this: Team team = em.getReference( teamId ); log().debug( "SLICE: "+SlicePersistence.getSlice( team ) ); String name = team.getFullName(); And it said "SLICE: null". So my only clue is that the slice was not set properly for references, so that they might fail in a later time.. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.