openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anton Rukhlin (JIRA)" <>
Subject [jira] [Commented] (OPENJPA-888) Empty method in an entity causes errors while enhancing
Date Fri, 25 May 2012 18:14:24 GMT


Anton Rukhlin commented on OPENJPA-888:

Because people are still running into this issue, I thought I'd leave a comment...

1. This issue has been resolved in serp 1.14.2
2. The JAR for serp 1.14.2 I downloaded from was
INCORRECT! That JAR is not actually version 1.14.2, as far as I can tell.
3. I ended up downloading the source code from Source Forge and building my own serp-1.14.2.jar.
This fixed the problem for me.

SERP official site:
> Empty method in an entity causes errors while enhancing
> -------------------------------------------------------
>                 Key: OPENJPA-888
>                 URL:
>             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(
>         at serp.bytecode.Local.updateTargets(
>         at serp.bytecode.LocalTable.updateTargets(
>         at
>         at serp.bytecode.Attributes.readAttributes(
>         at
>         at
>         at serp.bytecode.Project.loadClass(
> Looking the Serp code and debugging it, I can confirm it is a SERP error, and opened
a bug on its tracker (
> 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:!default.jspa
For more information on JIRA, see:


View raw message