openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dominik Stadler (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OPENJPA-2339) OpenJPA Ant enhancer task generates .class files with missing stackmap frame
Date Fri, 01 Mar 2013 15:41:13 GMT

    [ https://issues.apache.org/jira/browse/OPENJPA-2339?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13590640#comment-13590640
] 

Dominik Stadler commented on OPENJPA-2339:
------------------------------------------

Hi, thanks for the comments, I just tried it with Java 7 and with that it runs without any
error, so your analysis seems to be correct. I'll do some more testing to see if Java 7 works
for the whole project, there are still some open issues in JIRA, hopefully I do not trigger
any of those.

BTW, I get the following warning during enhancement, seems the OpenJPA enhancer still does
not state that it support Java 7
{quote}
warning: Supported source version 'RELEASE_6' from annotation processor 'org.apache.openjpa.persistence.meta.AnnotationProcessor6'
less than -source '1.7'
{quote}
                
> OpenJPA Ant enhancer task generates .class files with missing stackmap frame
> ----------------------------------------------------------------------------
>
>                 Key: OPENJPA-2339
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-2339
>             Project: OpenJPA
>          Issue Type: Bug
>    Affects Versions: 2.2.0, 2.2.1
>         Environment: OpenJPA 2.2.0 & 2.2.1, JaCoCo latest from git, Java 6
>            Reporter: Dominik Stadler
>            Assignee: Kevin Sutter
>            Priority: Critical
>         Attachments: TestJaCoCoProblem.zip
>
>
> I have a project which uses JaCoCo for code-coverage testing. Some of the tests load
JPA Entities.
> Any JPA entities cause error messages "Missing or invalid stackmap frames." in JaCoCo
code, which the developers of JaCoco indicate is a problem in the code enhancing the .class
file before, i.e. here Open JPA Enhancer. 
> OPENJPA-2085 seems related, but it is fixed in 2.2.0, which I am using. Was this only
fixed for Java 7?
> I also upgraded to serp-1.14.1, which seems to have some related fixes, but the problem
persists.
> See https://github.com/jacoco/eclemma/issues/35 for a related discussion.
> See the attached sample project/ant-file which reproduces the problem. Simply run "ant
test" to trigger the error.
> A full stacktrace is 
>     [junit] Running MandantTest
>     [junit] java.lang.instrument.IllegalClassFormatException: Error while instrumenting
class Mandant.
>     [junit]     at org.jacoco.agent.rt.internal_f6710df.CoverageTransformer.transform(CoverageTransformer.java:91)
>     [junit]     at sun.instrument.TransformerManager.transform(TransformerManager.java:188)
>     [junit]     at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:385)
>     [junit]     at java.lang.ClassLoader.defineClass1(Native Method)
>     [junit]     at java.lang.ClassLoader.defineClass(ClassLoader.java:634)
>     [junit]     at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
>     [junit]     at java.net.URLClassLoader.defineClass(URLClassLoader.java:277)
>     [junit]     at java.net.URLClassLoader.access$000(URLClassLoader.java:73)
>     [junit]     at java.net.URLClassLoader$1.run(URLClassLoader.java:212)
>     [junit]     at java.security.AccessController.doPrivileged(Native Method)
>     [junit]     at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
>     [junit]     at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
>     [junit]     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
>     [junit]     at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
>     [junit]     at MandantTest.test(MandantTest.java:10)
>     [junit]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     [junit]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>     [junit]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>     [junit]     at java.lang.reflect.Method.invoke(Method.java:616)
>     [junit]     at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
>     [junit]     at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
>     [junit]     at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
>     [junit]     at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
>     [junit]     at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)
>     [junit]     at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)
>     [junit]     at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)
>     [junit]     at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
>     [junit]     at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
>     [junit]     at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
>     [junit]     at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
>     [junit]     at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
>     [junit]     at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
>     [junit]     at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:541)
>     [junit]     at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:1064)
>     [junit]     at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:923)
>     [junit] Caused by: java.lang.IllegalStateException: Missing or invalid stackmap frames.
>     [junit]     at org.jacoco.agent.rt.internal_f6710df.core.internal.instr.FrameTracker.assertValidFrames(FrameTracker.java:613)
>     [junit]     at org.jacoco.agent.rt.internal_f6710df.core.internal.instr.FrameTracker.pop(FrameTracker.java:602)
>     [junit]     at org.jacoco.agent.rt.internal_f6710df.core.internal.instr.FrameTracker.visitVarInsn(FrameTracker.java:386)
>     [junit]     at org.jacoco.agent.rt.internal_f6710df.asm.MethodVisitor.visitVarInsn(Unknown
Source)
>     [junit]     at org.jacoco.agent.rt.internal_f6710df.asm.MethodVisitor.visitVarInsn(Unknown
Source)
>     [junit]     at org.jacoco.agent.rt.internal_f6710df.asm.tree.VarInsnNode.accept(Unknown
Source)
>     [junit]     at org.jacoco.agent.rt.internal_f6710df.asm.tree.InsnList.accept(Unknown
Source)
>     [junit]     at org.jacoco.agent.rt.internal_f6710df.asm.tree.MethodNode.accept(Unknown
Source)
>     [junit]     at org.jacoco.agent.rt.internal_f6710df.core.internal.flow.ClassProbesAdapter$1.visitEnd(ClassProbesAdapter.java:124)
>     [junit]     at org.jacoco.agent.rt.internal_f6710df.asm.ClassReader.b(Unknown Source)
>     [junit]     at org.jacoco.agent.rt.internal_f6710df.asm.ClassReader.accept(Unknown
Source)
>     [junit]     at org.jacoco.agent.rt.internal_f6710df.asm.ClassReader.accept(Unknown
Source)
>     [junit]     at org.jacoco.agent.rt.internal_f6710df.core.instr.Instrumenter.instrument(Instrumenter.java:74)
>     [junit]     at org.jacoco.agent.rt.internal_f6710df.core.instr.Instrumenter.instrument(Instrumenter.java:87)
>     [junit]     at org.jacoco.agent.rt.internal_f6710df.CoverageTransformer.transform(CoverageTransformer.java:89)
>     [junit]     ... 34 more

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message