openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevin Sutter (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OPENJPA-2283) Upgrade to ASM 4 dependency
Date Wed, 24 Oct 2012 21:52:12 GMT

    [ 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

Mime
View raw message