Git Product home page Git Product logo

Comments (11)

GoogleCodeExporter avatar GoogleCodeExporter commented on August 14, 2024
...a bit more info...

Please ignore the Type.a(null, 0) values above, they're wrong (post-exception). 
 The 
char array (b[]) definitely has the poison value:  This value is just a string 
in 
a .class.  But apparently while doing mapPath(), the type is created as an 
ARRAY 
sort, and it's not, it's a string.  Then mapType() is called, tries to get the 
element type descriptor for the internal name, and barfs.

So in a nutshell, having a String in a class that happens to start with "[" and 
also 
contains something that looks like a RESOURCE causes the problem.

Original comment by [email protected] on 7 Aug 2007 at 1:53

from jarjar.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 14, 2024
I'm experiencing the same Exception while bundling Objectweb asm-3.0.jar to a 
jar.
Tried 1.0rc3 and 1.0rc5

Original comment by [email protected] on 8 Aug 2007 at 8:52

from jarjar.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 14, 2024
FYI, I've temporarily added an ugly hack around the problem in my local 
com.tonicsystems.jarjar.PackageRemapper.mapPath().  Given the current impl of 
ASM, 
it looks like this method is especially dangerous before and after the hack - 
it 
could easily still fail: there are an infinite number of poison values that 
will 
throw or cause other havoc.  I changed this section (look at the original code 
and 
it'll be obvious):

            boolean absolute = s.startsWith("/");
            if (absolute)
                s = s.substring(1);
            boolean array = s.startsWith("[");
            if (array)
                s = s.substring(1);
            String after = mapType(s);
            s = after;
            if (array)
                s = "[" + s;
            if (absolute)
                s = "/" + s;

Original comment by [email protected] on 8 Aug 2007 at 5:53

from jarjar.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 14, 2024
The jarjar task is working again after making this change.

Original comment by [email protected] on 9 Aug 2007 at 6:51

from jarjar.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 14, 2024
New JarJar release coming soon with this fix in it? JRuby is pushing a release 
in a
couple weeks and we need to update JarJar to handle our annotation-based classes
correctly; but we ship ASM.

Original comment by [email protected] on 22 Oct 2007 at 1:25

from jarjar.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 14, 2024
FYI, here's the JRuby issue that's prompted us to upgrade JarJar:

http://jira.codehaus.org/browse/JRUBY-1456. Hopefully this is fixed already?

Original comment by [email protected] on 22 Oct 2007 at 1:29

from jarjar.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 14, 2024
This issue also appears when repackaging Rhino 1.6 R7.

Original comment by [email protected] on 22 Oct 2007 at 10:16

from jarjar.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 14, 2024
The hack (downloadable from http://jira.codehaus.org/browse/JRUBY-1456) 
repackages
Rhino 1.6 R7 without failing to build, however, the new version of Rhino still
creates class files using the old types.  Presumably jarjar would have to 
change the
behaviour of org.mozilla.javascript.optimizer.Codegen as well.

Original comment by [email protected] on 22 Oct 2007 at 10:28

from jarjar.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 14, 2024
I had the named problem directly after downloading jarjar and trying to apply 
it to a
project where Groovy (groovy-all-1.0.jar) is involved. 

I think that AsmClassGenerator.class  causes the problem (the next one expected 
to be
listed but missing in the 'adding'-list below).

The hack provided by  psychesy in Comment No 3 seems to have solved it.


--------------------------------------------------------------------------------
-----
[...]
   [jarjar] adding entry org/codehaus/groovy/bsf/GroovyEngine.class
   [jarjar] adding entry org/codehaus/groovy/classgen/AsmClassGenerator$1.class
   [jarjar] adding entry org/codehaus/groovy/classgen/AsmClassGenerator$2.class
   [jarjar] adding entry org/codehaus/groovy/classgen/AsmClassGenerator$3.class
   [jarjar] adding entry org/codehaus/groovy/classgen/AsmClassGenerator$4.class
   [jarjar] adding entry org/codehaus/groovy/classgen/AsmClassGenerator$5.class
   [jarjar] adding entry org/codehaus/groovy/classgen/AsmClassGenerator$6.class
   [jarjar] adding entry org/codehaus/groovy/classgen/AsmClassGenerator$7.class

BUILD FAILED
D:\Sdegui\build.xml:74: java.lang.ArrayIndexOutOfBoundsException: 20
        at org.apache.tools.ant.Task.perform(Task.java:373)
        at org.apache.tools.ant.Target.execute(Target.java:341)
        at org.apache.tools.ant.Target.performTasks(Target.java:369)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1220)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1189)
        at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:
40)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1072)
        at org.apache.tools.ant.Main.runBuild(Main.java:668)
        at org.apache.tools.ant.Main.startAnt(Main.java:187)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 20
        at com.tonicsystems.jarjar.asm.Type.a(Unknown Source)
        at com.tonicsystems.jarjar.asm.Type.getElementType(Unknown Source)
        at com.tonicsystems.jarjar.asm.commons.Remapper.mapType(Unknown Source)
        at com.tonicsystems.jarjar.asm.commons.Remapper.mapType(Unknown Source)
        at com.tonicsystems.jarjar.PackageRemapper.mapPath(PackageRemapper.java:82)
        at com.tonicsystems.jarjar.PackageRemapper.mapValue(PackageRemapper.java:104)
        at
com.tonicsystems.jarjar.asm.commons.RemappingMethodAdapter.visitLdcInsn(Unknown 
Source)
        at com.tonicsystems.jarjar.asm.ClassReader.accept(Unknown Source)
        at com.tonicsystems.jarjar.asm.ClassReader.accept(Unknown Source)
        at
com.tonicsystems.jarjar.ext_util.JarTransformer.process(JarTransformer.java:35)
        at
com.tonicsystems.jarjar.ext_util.JarProcessorChain.process(JarProcessorChain.jav
a:31)
        at com.tonicsystems.jarjar.MainProcessor.process(MainProcessor.java:83)
        at
com.tonicsystems.jarjar.ext_util.AntJarProcessor.zipFile(AntJarProcessor.java:55
)
        at org.apache.tools.ant.taskdefs.Zip.zipFile(Zip.java:1146)
        at org.apache.tools.ant.taskdefs.Zip.addResources(Zip.java:681)
        at org.apache.tools.ant.taskdefs.Zip.executeMain(Zip.java:481)
        at org.apache.tools.ant.taskdefs.Zip.execute(Zip.java:350)
        at
com.tonicsystems.jarjar.ext_util.AntJarProcessor.execute(AntJarProcessor.java:42
)
        at com.tonicsystems.jarjar.JarJarTask.execute(JarJarTask.java:50)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
        at org.apache.tools.ant.Task.perform(Task.java:364)
        ... 10 more
--- Nested Exception ---
java.lang.ArrayIndexOutOfBoundsException: 20
        at com.tonicsystems.jarjar.asm.Type.a(Unknown Source)
        at com.tonicsystems.jarjar.asm.Type.getElementType(Unknown Source)
        at com.tonicsystems.jarjar.asm.commons.Remapper.mapType(Unknown Source)
        at com.tonicsystems.jarjar.asm.commons.Remapper.mapType(Unknown Source)
        at com.tonicsystems.jarjar.PackageRemapper.mapPath(PackageRemapper.java:82)
        at com.tonicsystems.jarjar.PackageRemapper.mapValue(PackageRemapper.java:104)
        at
com.tonicsystems.jarjar.asm.commons.RemappingMethodAdapter.visitLdcInsn(Unknown 
Source)
        at com.tonicsystems.jarjar.asm.ClassReader.accept(Unknown Source)
        at com.tonicsystems.jarjar.asm.ClassReader.accept(Unknown Source)
        at
com.tonicsystems.jarjar.ext_util.JarTransformer.process(JarTransformer.java:35)
        at
com.tonicsystems.jarjar.ext_util.JarProcessorChain.process(JarProcessorChain.jav
a:31)
        at com.tonicsystems.jarjar.MainProcessor.process(MainProcessor.java:83)
        at
com.tonicsystems.jarjar.ext_util.AntJarProcessor.zipFile(AntJarProcessor.java:55
)
        at org.apache.tools.ant.taskdefs.Zip.zipFile(Zip.java:1146)
        at org.apache.tools.ant.taskdefs.Zip.addResources(Zip.java:681)
        at org.apache.tools.ant.taskdefs.Zip.executeMain(Zip.java:481)
        at org.apache.tools.ant.taskdefs.Zip.execute(Zip.java:350)
        at
com.tonicsystems.jarjar.ext_util.AntJarProcessor.execute(AntJarProcessor.java:42
)
        at com.tonicsystems.jarjar.JarJarTask.execute(JarJarTask.java:50)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
        at org.apache.tools.ant.Task.perform(Task.java:364)
        at org.apache.tools.ant.Target.execute(Target.java:341)
        at org.apache.tools.ant.Target.performTasks(Target.java:369)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1220)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1189)
        at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:
40)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1072)
        at org.apache.tools.ant.Main.runBuild(Main.java:668)
        at org.apache.tools.ant.Main.startAnt(Main.java:187)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)

Original comment by [email protected] on 7 Nov 2007 at 11:21

from jarjar.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 14, 2024
Sorry, for some reason I was not getting notification of issues posted here. 
I'll
investigate the problem and get a new release out ASAP.

Original comment by [email protected] on 7 Nov 2007 at 8:57

  • Changed state: Accepted

from jarjar.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 14, 2024
Fixes checked into SVN. Please give it a go. I'll put out a new release later 
this week.

Sorry for the delay! The project was configured to send issue updates to the 
mailing
list but something must have gone wrong.

Original comment by [email protected] on 8 Nov 2007 at 6:21

  • Changed state: Fixed

from jarjar.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.