Menu

#33 Can't process ICU4J class file

closed-invalid
None
4
2003-10-02
2003-09-20
Anonymous
No

Proguard1.7.2 begins processing but after some time
stops with error. Input jar file includes IBM icu4j
(http://oss.software.ibm.com/icu4j/), which seems to
be the cause. See below for details :

java -jar proguard.jar -injars test.jar -outjar
mtf_shink.jar

ProGuard, version 1.7
Reading program jar [test.jar]
Error: Can't read [test.jar] (Can't process class file
[com/ibm/icu/impl/data
/LocaleElements_zh__PINYIN.class] (Unknown constant
type [60] in constant pool))

Related

Bugs: #562
Bugs: #597
Bugs: #607

Discussion

  • Eric Lafortune

    Eric Lafortune - 2003-09-22

    Logged In: YES
    user_id=555208

    The class com.ibm.icu.impl.data.LocaleElements_zh__PINYIN in
    the ICU4J library appears corrupt. Maybe it has been
    compiled with a non-standard compiler. Trying to look at the
    class with javap (from Sun JDK1.4.2):

    javap -classpath icu4j_2_6.jar
    com.ibm.icu.impl.data.LocaleElements_zh__PINYIN

    java.lang.ClassFormatError: invalid constant type: 60
    at sun.tools.javap.ClassData.readCP(ClassData.java:180)
    at sun.tools.javap.ClassData.read(ClassData.java:81)
    at sun.tools.javap.ClassData.<init>(ClassData.java:52)
    at
    sun.tools.javap.JavapPrinter.<init>(JavapPrinter.java:28)
    at sun.tools.javap.Main.displayResults(Main.java:204)
    at sun.tools.javap.Main.perform(Main.java:61)
    at sun.tools.javap.Main.entry(Main.java:49)
    at sun.tools.javap.Main.main(Main.java:34)
    ERROR:fatal error
    Compiled from null
    Exception in thread "main" java.lang.NullPointerException
    at
    sun.tools.javap.JavapPrinter.javaclassname(JavapPrinter.java:788)
    at
    sun.tools.javap.JavapPrinter.printclassHeader(JavapPrinter.java:57)
    at
    sun.tools.javap.JavapPrinter.print(JavapPrinter.java:40)
    at sun.tools.javap.Main.displayResults(Main.java:205)
    at sun.tools.javap.Main.perform(Main.java:61)
    at sun.tools.javap.Main.entry(Main.java:49)
    at sun.tools.javap.Main.main(Main.java:34)

    So javap doesn't like the class either. As a temporary
    solution, you could manually remove the class from the
    library, or you could recompile the library from the sources.

    If this problem hasn't been reported before, you may want to
    notify the maintainers of ICU4J. If the constant type is
    actually produced by some compiler, I might add support for
    it in ProGuard.

    Eric.

     
  • Eric Lafortune

    Eric Lafortune - 2003-09-22
    • priority: 5 --> 4
    • assigned_to: nobody --> lafortune
    • status: open --> pending
     
  • Nobody/Anonymous

    Logged In: NO

    What about an option, so illegal class files are just copied to
    output without any changes! I.e. so a few "strange" class
    files will not stop proguard from doing its thing on the rest of
    the files, using the illegal class file as is.

     
  • Eric Lafortune

    Eric Lafortune - 2003-09-23

    Logged In: YES
    user_id=555208

    Leaving some class files unchanged will often lead to
    inconsistencies. It may also lead to problems in other class
    files that depend on it. I prefer users getting their input
    straight first, rather than processing anything, and then
    maybe blaming ProGuard, and then maybe asking me why their
    code doesn't work anymore. The -ignorewarnings option is
    dangerous enough as it is.

    The upcoming version 2.0 supports filters, which allow to
    remove any unwanted files from the input, e.g.

    -injars
    icu4j_2_6.jar(!com/ibm/icu/impl/data/LocaleElements_zh__PINYIN.class)

     
  • Eric Lafortune

    Eric Lafortune - 2003-10-02
    • status: pending --> closed-invalid
     

Log in to post a comment.

MongoDB Logo MongoDB