ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 54090] New: Depend task does not handle invokeDynamic constant pool entries - java.lang.ClassFormatError: Invalid Constant Pool entry Type 18
Date Fri, 02 Nov 2012 08:08:22 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=54090

          Priority: P2
            Bug ID: 54090
          Assignee: notifications@ant.apache.org
           Summary: Depend task does not handle invokeDynamic constant
                    pool entries - java.lang.ClassFormatError: Invalid
                    Constant Pool entry Type 18
          Severity: normal
    Classification: Unclassified
                OS: Linux
          Reporter: lahoda@gmail.com
          Hardware: PC
            Status: NEW
           Version: unspecified
         Component: Optional Tasks
           Product: Ant

Created attachment 29541
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=29541&action=edit
A project demonstrating the problem.

Seems that the depend task does not handle classfiles with the invokeDynamic
properly:
/tmp/invokeDynamicByteCode/nbproject/build-impl.xml:923: The following error
occurred while executing this line:
/tmp/invokeDynamicByteCode/nbproject/build-impl.xml:329:
java.lang.ClassFormatError: Invalid Constant Pool entry Type 18
        at
org.apache.tools.ant.taskdefs.optional.depend.constantpool.ConstantPoolEntry.readEntry(ConstantPoolEntry.java:159)
        at
org.apache.tools.ant.taskdefs.optional.depend.constantpool.ConstantPool.read(ConstantPool.java:67)
        at
org.apache.tools.ant.taskdefs.optional.depend.ClassFile.read(ClassFile.java:72)
        at
org.apache.tools.ant.taskdefs.optional.depend.AntAnalyzer.determineDependencies(AntAnalyzer.java:92)
        at
org.apache.tools.ant.util.depend.AbstractAnalyzer.getClassDependencies(AbstractAnalyzer.java:100)
        at
org.apache.tools.ant.taskdefs.optional.depend.Depend.determineDependencies(Depend.java:346)
        at
org.apache.tools.ant.taskdefs.optional.depend.Depend.execute(Depend.java:718)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
        at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:474)
        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.taskdefs.Sequential.execute(Sequential.java:68)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
        at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:474)
        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.taskdefs.MacroInstance.execute(MacroInstance.java:398)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
        at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:474)
        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:390)
        at org.apache.tools.ant.Target.performTasks(Target.java:411)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
        at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
        at org.apache.tools.ant.Main.runBuild(Main.java:809)
        at org.apache.tools.ant.Main.startAnt(Main.java:217)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)

This may exist for some time, but is a bigger problem now, as it seems that
recent JDK-lambda builds appear to be using invokeDynamic to implement lambdas.

To reproduce:
-download and unpack the attached project
-run "ant" inside the project - the above exception appears for me

The above steps work even when running on JDK6, but the project as such can
only be succesfully compiled on a lambda JDK.

Tested with custom build ant from revision 1404889, and with:
$ ant -version
Apache Ant(TM) version 1.8.2 compiled on December 20 2010

-- 
You are receiving this mail because:
You are the assignee for the bug.

Mime
View raw message