You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Kevin Sutter (JIRA)" <ji...@apache.org> on 2012/10/22 23:16:12 UTC

[jira] [Created] (OPENJPA-2283) Upgrade to ASM 4 dependency

Kevin Sutter created OPENJPA-2283:
-------------------------------------

             Summary: Upgrade to ASM 4 dependency
                 Key: OPENJPA-2283
                 URL: https://issues.apache.org/jira/browse/OPENJPA-2283
             Project: OpenJPA
          Issue Type: New Feature
          Components: Enhance
    Affects Versions: 2.3.0
            Reporter: Kevin Sutter
             Fix For: 2.3.0


OpenJPA currently has a dependency on ASM 3.2 for some post-enhancement processing to fix up the stack map tables (Java 7 requirement).  The latest release of ASM is 4.1, which just came out last week.  We should either move up to 4.0 or 4.1.

--
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

[jira] [Commented] (OPENJPA-2283) Upgrade to ASM 4 dependency

Posted by "Kevin Sutter (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENJPA-2283?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13483629#comment-13483629 ] 

Kevin Sutter commented on OPENJPA-2283:
---------------------------------------

As mentioned above, I'm having some problems with the changes submitted for making ASM optional (OpenJPA-2171)...  I'm trying to upgrade OpenJPA trunk to use ASM 4.0.  I got by the "easy" problem when reflectively finding the accept() method [1].  But, after making that change, I am getting a strange error [2] when our enhancement process is working on CacheTest.class in our JUnit bucket.  This error doesn't happen with all of the other enhancement processing that happens before this one.  I have no idea if other classes would also fail later in the bucket since it never gets that far.

If I replace AsmAdapter.java with the previous version (pre-OpenJPA-2171), then everything works just fine.  Thoughts or suggestions?  Since the move to ASM 4.0 is important, I'd like to do something that's compatible with these OpenJPA-2171 changes.  But, if I can't figure something out quickly, I might have to re-open that JIRA and back out the changes to make progress on ASM 4.0.  Thanks!

[1]              classReaderAccept = crClass.getMethod("accept", cwClass.getSuperclass(), int.class);
[2]
18450  xml-persistence-unit  INFO   [main] openjpa.Tool - Enhancer running on type "class org.apache.openjpa.persistence.datacache.CacheTest".
java.io.IOException: java.lang.reflect.InvocationTargetException
        at org.apache.openjpa.enhance.AsmAdaptor.toJava7ByteArray(AsmAdaptor.java:156)
        at org.apache.openjpa.enhance.AsmAdaptor.writeJava7(AsmAdaptor.java:137)
        at org.apache.openjpa.enhance.AsmAdaptor.write(AsmAdaptor.java:107)
        at org.apache.openjpa.enhance.PCEnhancer.record(PCEnhancer.java:633)
        at org.apache.openjpa.enhance.PCEnhancer.record(PCEnhancer.java:619)
        at org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java:4899)
        at org.apache.openjpa.ant.PCEnhancerTask.executeOn(PCEnhancerTask.java:89)
        at org.apache.openjpa.lib.ant.AbstractTask.execute(AbstractTask.java:171)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:88)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
        at java.lang.reflect.Method.invoke(Method.java:613)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:357)
        at org.apache.tools.ant.Target.performTasks(Target.java:385)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
        at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:416)
        at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:88)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
        at java.lang.reflect.Method.invoke(Method.java:613)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:357)
        at org.apache.tools.ant.Target.performTasks(Target.java:385)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
        at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:416)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:88)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
        at java.lang.reflect.Method.invoke(Method.java:613)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:357)
        at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:118)
        at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:98)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
        at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:88)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
        at java.lang.reflect.Method.invoke(Method.java:613)
        at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
        at java.lang.reflect.Method.invoke(Method.java:613)
        at org.apache.openjpa.enhance.AsmAdaptor.toJava7ByteArray(AsmAdaptor.java:152)
        ... 63 more
Caused by: java.lang.ClassFormatError: JVMCFRE113 unexpected EOF; class=org/apache/openjpa/persistence/datacache/CacheTest, offset=0
        at java.lang.ClassLoader.defineClassImpl(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:286)
        at org.apache.tools.ant.AntClassLoader.defineClassFromData(AntClassLoader.java:1146)
        at org.apache.tools.ant.AntClassLoader.getClassFromStream(AntClassLoader.java:1324)
        at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1388)
        at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1341)
        at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1088)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:660)
        at java.lang.ClassLoader.defineClassImpl(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:286)
        at org.apache.tools.ant.AntClassLoader.defineClassFromData(AntClassLoader.java:1146)
        at org.apache.tools.ant.AntClassLoader.getClassFromStream(AntClassLoader.java:1324)
        at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1388)
        at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1341)
        at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1088)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:660)
        at java.lang.Class.forNameImpl(Native Method)
        at java.lang.Class.forName(Class.java:176)
        at org.objectweb.asm.ClassWriter.getCommonSuperClass(Unknown Source)
        at org.objectweb.asm.ClassWriter.a(Unknown Source)
        at org.objectweb.asm.Frame.a(Unknown Source)
        at org.objectweb.asm.Frame.a(Unknown Source)
        at org.objectweb.asm.MethodWriter.visitMaxs(Unknown Source)
        at org.objectweb.asm.ClassReader.accept(Unknown Source)
        at org.objectweb.asm.ClassReader.accept(Unknown Source)
        ... 67 more
[INFO] ------------------------------------------------------------------------

                
> Upgrade to ASM 4 dependency
> ---------------------------
>
>                 Key: OPENJPA-2283
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-2283
>             Project: OpenJPA
>          Issue Type: New Feature
>          Components: Enhance
>    Affects Versions: 2.3.0
>            Reporter: Kevin Sutter
>             Fix For: 2.3.0
>
>
> OpenJPA currently has a dependency on ASM 3.2 for some post-enhancement processing to fix up the stack map tables (Java 7 requirement).  The latest release of ASM is 4.1, which just came out last week.  The immediate need is to move up to ASM 4.0.  We can entertain 4.1 at a later date.

--
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

[jira] [Updated] (OPENJPA-2283) Upgrade to ASM 4 dependency

Posted by "Kevin Sutter (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-2283?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kevin Sutter updated OPENJPA-2283:
----------------------------------

    Description: OpenJPA currently has a dependency on ASM 3.2 for some post-enhancement processing to fix up the stack map tables (Java 7 requirement).  The latest release of ASM is 4.1, which just came out last week.  The immediate need is to move up to ASM 4.0.  We can entertain 4.1 at a later date.  (was: OpenJPA currently has a dependency on ASM 3.2 for some post-enhancement processing to fix up the stack map tables (Java 7 requirement).  The latest release of ASM is 4.1, which just came out last week.  We should either move up to 4.0 or 4.1.)
    
> Upgrade to ASM 4 dependency
> ---------------------------
>
>                 Key: OPENJPA-2283
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-2283
>             Project: OpenJPA
>          Issue Type: New Feature
>          Components: Enhance
>    Affects Versions: 2.3.0
>            Reporter: Kevin Sutter
>             Fix For: 2.3.0
>
>
> OpenJPA currently has a dependency on ASM 3.2 for some post-enhancement processing to fix up the stack map tables (Java 7 requirement).  The latest release of ASM is 4.1, which just came out last week.  The immediate need is to move up to ASM 4.0.  We can entertain 4.1 at a later date.

--
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

[jira] [Commented] (OPENJPA-2283) Upgrade to ASM 4 dependency

Posted by "Kevin Sutter (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENJPA-2283?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13483370#comment-13483370 ] 

Kevin Sutter commented on OPENJPA-2283:
---------------------------------------

As usual, these type of updates are not as easy as first envisioned...  The changes that were put in for OpenJPA-2171 are causing some issues.  The first one is due to the fact that ASM 4.0 changed the ClassVisitor from an Interface to an Abstract Class.  This affects the reflective signature for the ClassReader.accept method.  That issue was pretty easy to resolve.  But, now I'm hitting some problems while our JUnit bucket attempts to enhance the various classes, specifically the CacheTest.java class.  I'm trying to narrow this one down, but it's taking more time than I expected.  May need some assistance with this since it seems directly related to the changes introduced by OpenJPA-2171, and personally I'm skeptical about those changes...
                
> Upgrade to ASM 4 dependency
> ---------------------------
>
>                 Key: OPENJPA-2283
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-2283
>             Project: OpenJPA
>          Issue Type: New Feature
>          Components: Enhance
>    Affects Versions: 2.3.0
>            Reporter: Kevin Sutter
>             Fix For: 2.3.0
>
>
> OpenJPA currently has a dependency on ASM 3.2 for some post-enhancement processing to fix up the stack map tables (Java 7 requirement).  The latest release of ASM is 4.1, which just came out last week.  The immediate need is to move up to ASM 4.0.  We can entertain 4.1 at a later date.

--
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