Return-Path: X-Original-To: apmail-openjpa-users-archive@minotaur.apache.org Delivered-To: apmail-openjpa-users-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BDF8011269 for ; Wed, 10 Sep 2014 14:27:05 +0000 (UTC) Received: (qmail 24109 invoked by uid 500); 10 Sep 2014 14:27:05 -0000 Delivered-To: apmail-openjpa-users-archive@openjpa.apache.org Received: (qmail 24064 invoked by uid 500); 10 Sep 2014 14:27:05 -0000 Mailing-List: contact users-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@openjpa.apache.org Delivered-To: mailing list users@openjpa.apache.org Received: (qmail 24044 invoked by uid 99); 10 Sep 2014 14:27:04 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Sep 2014 14:27:04 +0000 X-ASF-Spam-Status: No, hits=2.0 required=5.0 tests=SPF_NEUTRAL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [216.139.236.26] (HELO sam.nabble.com) (216.139.236.26) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Sep 2014 14:26:38 +0000 Received: from jim.nabble.com ([192.168.236.80]) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1XRiqy-0003bJ-9p for users@openjpa.apache.org; Wed, 10 Sep 2014 07:26:36 -0700 Date: Wed, 10 Sep 2014 07:26:36 -0700 (PDT) From: olyalikov To: users@openjpa.apache.org Message-ID: <1410359196271-7587085.post@n2.nabble.com> Subject: EntityManager.find ClassCastException for wrong but existing id MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hello, I have base entity and 2 inheritors e.g. Person and Document. If I try to find Person entity and provide id of the Document entity I get ClassNotFoundException but it should return either null or EntityNotFoundException. If I provide just some wrong non existing id I get null. Here is link to the maven project with test: openjpa-find-test.zip Should I post a bug in issue tracker? Thanks, Oleg -- View this message in context: http://openjpa.208410.n2.nabble.com/EntityManager-find-ClassCastException-for-wrong-but-existing-id-tp7587085.html Sent from the OpenJPA Users mailing list archive at Nabble.com.