From dev-return-15324-apmail-openjpa-dev-archive=openjpa.apache.org@openjpa.apache.org Mon Mar 01 20:02:31 2010 Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 89440 invoked from network); 1 Mar 2010 20:02:30 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 1 Mar 2010 20:02:30 -0000 Received: (qmail 60282 invoked by uid 500); 1 Mar 2010 20:02:29 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 60233 invoked by uid 500); 1 Mar 2010 20:02:29 -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 60172 invoked by uid 99); 1 Mar 2010 20:02:29 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Mar 2010 20:02:29 +0000 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; Mon, 01 Mar 2010 20:02:27 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id E5623234C4B4 for ; Mon, 1 Mar 2010 20:02:05 +0000 (UTC) Message-ID: <1684465342.40221267473725938.JavaMail.jira@brutus.apache.org> Date: Mon, 1 Mar 2010 20:02:05 +0000 (UTC) From: "Tim McConnell (JIRA)" To: dev@openjpa.apache.org Subject: [jira] Assigned: (OPENJPA-1020) eager fetching of PersistentCollection of a primitive type fails In-Reply-To: <1077477920.1238779212969.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/OPENJPA-1020?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tim McConnell reassigned OPENJPA-1020: -------------------------------------- Assignee: Tim McConnell > eager fetching of PersistentCollection of a primitive type fails > ---------------------------------------------------------------- > > Key: OPENJPA-1020 > URL: https://issues.apache.org/jira/browse/OPENJPA-1020 > Project: OpenJPA > Issue Type: Bug > Components: jdbc > Affects Versions: 1.2.1, 2.0.0-M2 > Environment: Linux deltoid-r61 2.6.27.12-170.2.5.fc10.i686 #1 SMP Wed Jan 21 02:09:37 EST 2009 i686 i686 i386 GNU/Linux > java version "1.6.0_12" > Java(TM) SE Runtime Environment (build 1.6.0_12-b04) > Java HotSpot(TM) Server VM (build 11.2-b01, mixed mode) > Reporter: Ted Leung > Assignee: Tim McConnell > Attachments: openjpa_jdbc_patch.zip, openjpa_junit_patch.zip > > > When a PersistentCollection of primitives like String.class are persisted, if the collection is marked as eager fetching. An exception is thrown upon loading the collection : > Attached is a patch file to the 2.0.0 trunk's junit test which illustrates the collection working with lazy and failing with eager. This also happens in 1.2.1 > Exception below: > -------------------- > junit.framework.AssertionFailedError: java.lang.String cannot be cast to org.apache.openjpa.enhance.PersistenceCapable > at junit.framework.Assert.fail(Assert.java:47) > at org.apache.openjpa.persistence.annotations.TestPersistentCollection.testPersistentCollectionStringsEager(TestPersistentCollection.java:169) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at junit.framework.TestCase.runTest(TestCase.java:154) > at junit.framework.TestCase.runBare(TestCase.java:127) > at org.apache.openjpa.persistence.test.PersistenceTestCase.runBare(PersistenceTestCase.java:455) > at junit.framework.TestResult$1.protect(TestResult.java:106) > at junit.framework.TestResult.runProtected(TestResult.java:124) > at junit.framework.TestResult.run(TestResult.java:109) > at junit.framework.TestCase.run(TestCase.java:118) > at org.apache.openjpa.persistence.test.PersistenceTestCase.run(PersistenceTestCase.java:182) > at junit.framework.TestSuite.runTest(TestSuite.java:208) > at junit.framework.TestSuite.run(TestSuite.java:203) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:213) > at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140) > at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127) > at org.apache.maven.surefire.Surefire.run(Surefire.java:177) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:334) > at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:980) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.