Closed
Bug 1472814
Opened 6 years ago
Closed 3 years ago
./mach bootstrap for android fail to install package: android package manager incompatible with openjdk-11
Categories
(Firefox Build System :: Bootstrap Configuration, defect)
Firefox Build System
Bootstrap Configuration
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 1724480
People
(Reporter: jya, Assigned: KWierso)
Details
Attachments
(1 obsolete file)
Running on ubuntu 18.04
./mach bootstrap
select option 4 for android
this fails with:
We are now installing the following Android packages:
platform-tools
build-tools;26.0.2
platforms;android-26
extras;android;m2repository
extras;google;m2repository
emulator
You may be prompted to agree to the Android license. You may see some of
output as packages are downloaded and installed.
Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema
at com.android.repository.api.SchemaModule$SchemaModuleVersion.<init>(SchemaModule.java:156)
at com.android.repository.api.SchemaModule.<init>(SchemaModule.java:75)
at com.android.sdklib.repository.AndroidSdkHandler.<clinit>(AndroidSdkHandler.java:81)
at com.android.sdklib.tool.SdkManagerCli.main(SdkManagerCli.java:117)
at com.android.sdklib.tool.SdkManagerCli.main(SdkManagerCli.java:93)
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.annotation.XmlSchema
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:190)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:499)
... 5 more
Error running mach:
['bootstrap']
The error occurred in code that was called by the mach command. This is either
a bug in the called code itself or in the way that mach is calling it.
You should consider filing a bug for this issue.
If filing a bug, please include the full output of mach, including this error
message.
The details of the failure are as follows:
CalledProcessError: Command '['/home/jyavenard/.mozbuild/android-sdk-linux/tools/bin/sdkmanager', '--package_file=/home/jyavenard/Work/Mozilla/mozilla-central/python/mozboot/mozboot/android-packages.txt']' returned non-zero exit status 1
File "/home/jyavenard/Work/Mozilla/mozilla-central/python/mozboot/mozboot/mach_commands.py", line 32, in bootstrap
bootstrapper.bootstrap()
File "/home/jyavenard/Work/Mozilla/mozilla-central/python/mozboot/mozboot/bootstrap.py", line 281, in bootstrap
getattr(self.instance, 'install_%s_packages' % application)()
File "/home/jyavenard/Work/Mozilla/mozilla-central/python/mozboot/mozboot/debian.py", line 127, in install_mobile_android_packages
self.ensure_mobile_android_packages()
File "/home/jyavenard/Work/Mozilla/mozilla-central/python/mozboot/mozboot/debian.py", line 154, in ensure_mobile_android_packages
no_interactive=self.no_interactive)
File "/home/jyavenard/Work/Mozilla/mozilla-central/python/mozboot/mozboot/android.py", line 191, in ensure_android
ensure_android_packages(sdkmanager_tool=sdkmanager_tool, no_interactive=no_interactive)
File "/home/jyavenard/Work/Mozilla/mozilla-central/python/mozboot/mozboot/android.py", line 247, in ensure_android_packages
subprocess.check_call(args)
File "/usr/lib/python2.7/subprocess.py", line 190, in check_call
raise CalledProcessError(retcode, cmd)
manually running:
/home/jyavenard/.mozbuild/android-sdk-linux/tools/bin/sdkmanager --package_file=/home/jyavenard/Work/Mozilla/mozilla-central/python/mozboot/mozboot/android-packages.txt
gives me:
Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema
at com.android.repository.api.SchemaModule$SchemaModuleVersion.<init>(SchemaModule.java:156)
at com.android.repository.api.SchemaModule.<init>(SchemaModule.java:75)
at com.android.sdklib.repository.AndroidSdkHandler.<clinit>(AndroidSdkHandler.java:81)
at com.android.sdklib.tool.SdkManagerCli.main(SdkManagerCli.java:117)
at com.android.sdklib.tool.SdkManagerCli.main(SdkManagerCli.java:93)
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.annotation.XmlSchema
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:190)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:499)
... 5 more
Reporter | ||
Comment 1•6 years ago
|
||
so mach bootstrap for android install openjdk-11
with that the sdkmanager fails to run
removing the openjdk-11 and instead using openjdk-8, it works (asking to accept the license etc)
so to get going what I did was:
run ./mach bootstrap
select 4 for android
wait until it fails running sdkmanager
manually uninstall openjdk-11-jre
run ~/.mozbuild/android-sdk-linux/tools/bin/sdkmanager --package_file=~/PATH_TO/mozilla-central/python/mozboot/mozboot/android-packages.txt
Reporter | ||
Comment 2•6 years ago
|
||
solution |
I ran;
sudo update-alternatives --config java
and select openjdk-8
all fine after that..
bootstrap shouldn't use openjdk-11
Summary: ./mach bootstrap for android fail to install package → ./mach bootstrap for android fail to install package: android package manager incompatible with openjdk-11
Assignee | ||
Updated•6 years ago
|
Assignee: nobody → wkocher
Assignee | ||
Comment 4•6 years ago
|
||
Assignee | ||
Comment 5•6 years ago
|
||
Comment on attachment 9016511 [details]
Bug 1472814 - Work around openjdk11 incompatibility issue
No rush on this review. I'm not super thrilled with this patch, but it does let me get through bootstrap once I switch to openjdk8 as prompted.
Happy to change any of the wording or do some other workaround/fix.
Attachment #9016511 -
Flags: review?(gps)
Comment 6•6 years ago
|
||
Comment on attachment 9016511 [details]
Bug 1472814 - Work around openjdk11 incompatibility issue
I reviewed this on Phabricator.
Attachment #9016511 -
Flags: review?(gps)
Updated•5 years ago
|
Attachment #9016511 -
Attachment is obsolete: true
Updated•3 years ago
|
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•