[Android-tools-devel] Bug#1033226: java.lang.NoClassDefFoundError: org/apache/commons/text/StringEscapeUtils
Hans-Christoph Steiner
hans at eds.org
Mon Mar 20 11:39:53 GMT 2023
Package: apktool
Version: 2.7.0+dfsg-4
Severity: important
$ apktool build org.sajeg.fallingblocks_3
I: Using Apktool 2.7.0-dirty
Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/commons/text/StringEscapeUtils
at
brut.androlib.meta.YamlStringEscapeUtils.unescapeString(YamlStringEscapeUtils.java:141)
at
brut.androlib.meta.ClassSafeConstructor$ConstructStringEx.construct(ClassSafeConstructor.java:58)
at
org.yaml.snakeyaml.constructor.Constructor$ConstructScalar.constructStandardJavaInstance(Constructor.java:452)
at
org.yaml.snakeyaml.constructor.Constructor$ConstructScalar.construct(Constructor.java:403)
at
org.yaml.snakeyaml.constructor.BaseConstructor.constructObjectNoCheck(BaseConstructor.java:270)
at
org.yaml.snakeyaml.constructor.BaseConstructor.constructObject(BaseConstructor.java:253)
at
org.yaml.snakeyaml.constructor.SafeConstructor.processDuplicateKeys(SafeConstructor.java:108)
at
org.yaml.snakeyaml.constructor.SafeConstructor.flattenMapping(SafeConstructor.java:81)
at
org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.constructJavaBean2ndStep(Constructor.java:252)
at
org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.construct(Constructor.java:207)
at
org.yaml.snakeyaml.constructor.Constructor$ConstructYamlObject.construct(Constructor.java:358)
at
org.yaml.snakeyaml.constructor.BaseConstructor.constructObjectNoCheck(BaseConstructor.java:270)
at
org.yaml.snakeyaml.constructor.BaseConstructor.constructObject(BaseConstructor.java:253)
at
org.yaml.snakeyaml.constructor.BaseConstructor.constructDocument(BaseConstructor.java:207)
at
org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseConstructor.java:191)
at org.yaml.snakeyaml.Yaml.loadFromReader(Yaml.java:477)
at org.yaml.snakeyaml.Yaml.loadAs(Yaml.java:470)
at brut.androlib.meta.MetaInfo.load(MetaInfo.java:70)
at brut.androlib.Androlib.readMetaFile(Androlib.java:280)
at brut.androlib.Androlib.build(Androlib.java:294)
at brut.androlib.Androlib.build(Androlib.java:287)
at brut.apktool.Main.cmdBuild(Main.java:263)
at brut.apktool.Main.main(Main.java:82)
Caused by: java.lang.ClassNotFoundException:
org.apache.commons.text.StringEscapeUtils
at
java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
at
java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
... 23 more
The problem is a weird broken symlink "commons-text-1.9.jar":
~ $ ls -l /usr/share/apktool/
total 248
lrwxrwxrwx 1 root root 26 14. Feb 15:32 antlr3-runtime.jar ->
../java/antlr3-runtime.jar
-rw-r--r-- 1 root root 259 14. Feb 15:32 apktool-2.7.0.jar
-rw-r--r-- 1 root root 12849 14. Feb 15:32 apktool-cli.jar
-rw-r--r-- 1 root root 184646 14. Feb 15:32 apktool-lib.jar
lrwxrwxrwx 1 root root 20 14. Feb 15:32 baksmali.jar -> ../java/baksmali.jar
-rw-r--r-- 1 root root 259 14. Feb 15:32 brut.apktool.jar
-rw-r--r-- 1 root root 2207 14. Feb 15:32 brut.j.common.jar
-rw-r--r-- 1 root root 16834 14. Feb 15:32 brut.j.dir.jar
-rw-r--r-- 1 root root 15930 14. Feb 15:32 brut.j.util.jar
lrwxrwxrwx 1 root root 23 14. Feb 15:32 commons-cli.jar ->
../java/commons-cli.jar
lrwxrwxrwx 1 root root 22 14. Feb 15:32 commons-io.jar -> ../java/commons-io.jar
lrwxrwxrwx 1 root root 25 14. Feb 15:32 commons-lang3.jar ->
../java/commons-lang3.jar
lrwxrwxrwx 1 root root 28 14. Feb 15:32 commons-text-1.9.jar ->
../java/commons-text-1.9.jar
lrwxrwxrwx 1 root root 19 14. Feb 15:32 dexlib2.jar -> ../java/dexlib2.jar
lrwxrwxrwx 1 root root 17 14. Feb 15:32 guava.jar -> ../java/guava.jar
lrwxrwxrwx 1 root root 17 14. Feb 15:32 smali.jar -> ../java/smali.jar
lrwxrwxrwx 1 root root 22 14. Feb 15:32 smali-util.jar -> ../java/smali-util.jar
lrwxrwxrwx 1 root root 21 14. Feb 15:32 snakeyaml.jar -> ../java/snakeyaml.jar
lrwxrwxrwx 1 root root 26 14. Feb 15:32 stringtemplate.jar ->
../java/stringtemplate.jar
lrwxrwxrwx 1 root root 19 14. Feb 15:32 xmlunit.jar -> ../java/xmlunit.jar
lrwxrwxrwx 1 root root 16 14. Feb 15:32 xpp3.jar -> ../java/xpp3.jar
~ $ ls -l /usr/share/apktool/../java/commons-text-1.9.jar
ls: cannot access '/usr/share/apktool/../java/commons-text-1.9.jar': No such
file or directory
~ $
-- System Information:
Debian Release: bookworm/sid
APT prefers testing-security
APT policy: (500, 'testing-security'), (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 6.1.0-6-amd64 (SMP w/16 CPU threads; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages apktool depends on:
ii aapt 1:10.0.0+r36-10
ii android-framework-res 1:10.0.0+r36-10
ii default-jre-headless [java8-runtime-headless] 2:1.17-74
ii libantlr3-runtime-java 3.5.3-1
ii libcommons-cli-java 1.5.0-1
ii libcommons-io-java 2.11.0-2
ii libcommons-lang3-java 3.12.0-2
ii libcommons-text-java 1.10.0-1
ii libguava-java 31.1-1
ii libsmali-java 2.5.2.git2771eae-4
ii libstringtemplate-java 3.2.1-3
ii libxmlunit-java 1.6-2
ii libxpp3-java 1.1.4c-3
ii libyaml-snake-java 1.33-2
ii openjdk-17-jre-headless [java8-runtime-headless] 17.0.6+10-1
apktool recommends no packages.
apktool suggests no packages.
-- no debconf information
More information about the Android-tools-devel
mailing list