Return-Path: X-Original-To: apmail-openjpa-dev-archive@www.apache.org Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 923A99D67 for ; Fri, 16 Mar 2012 16:34:00 +0000 (UTC) Received: (qmail 81482 invoked by uid 500); 16 Mar 2012 16:34:00 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 81449 invoked by uid 500); 16 Mar 2012 16:34:00 -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 81441 invoked by uid 99); 16 Mar 2012 16:34:00 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Mar 2012 16:34:00 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Mar 2012 16:33:59 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 2BA93231EB for ; Fri, 16 Mar 2012 16:33:39 +0000 (UTC) Date: Fri, 16 Mar 2012 16:33:39 +0000 (UTC) From: "Rick Curtis (Closed) (JIRA)" To: dev@openjpa.apache.org Message-ID: <121601604.25237.1331915619221.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Closed] (OPENJPA-888) Empty method in an entity causes errors while enhancing 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-888?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Rick Curtis closed OPENJPA-888. ------------------------------- Resolution: Won't Fix I'm closing this issue for a number of reasons... 1.] This is a serp bug, not an OpenJPA bug. 2.] Serp is pretty much dead and no one is going to cut a new serp release for this one problem. 3.] There is a valid workaround. Thanks, Rick > Empty method in an entity causes errors while enhancing > ------------------------------------------------------- > > Key: OPENJPA-888 > URL: https://issues.apache.org/jira/browse/OPENJPA-888 > Project: OpenJPA > Issue Type: Bug > Components: kernel > Affects Versions: 1.2.0 > Reporter: Simone Gianni > > I have a class subclassing another class. Both are entities. They have a method, which has nothing to do with JPA cause it's not a getter o a setter. The subclass overrides this method with an empty implementation, that is @Override public void theMethod() {} . > As a result, OpenJPA throws an error while enhancing the subclass, more specifically the stacktrace is relative at SERP internals : > java.lang.ClassCastException: serp.bytecode.CodeEntry cannot be cast to serp.bytecode.Instruction > at serp.bytecode.Local.getEnd(Local.java:114) > at serp.bytecode.Local.updateTargets(Local.java:155) > at serp.bytecode.LocalTable.updateTargets(LocalTable.java:163) > at serp.bytecode.Code.read(Code.java:2031) > at serp.bytecode.Attributes.readAttributes(Attributes.java:152) > at serp.bytecode.BCMember.read(BCMember.java:365) > at serp.bytecode.BCClass.read(BCClass.java:123) > at serp.bytecode.Project.loadClass(Project.java:211) > Looking the Serp code and debugging it, I can confirm it is a SERP error, and opened a bug on its tracker (https://sourceforge.net/tracker2/?func=detail&aid=2556092&group_id=31479&atid=402282 ). > I'm opening this bug here to track the problem, and eventually use an updated version of SERP if/when they solve the problem. > The most obvious workaround (which works) is to write something inside an empty method, a plain "int i = 0" will do the job. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira