question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Premature removal of --java11-test-mode

See original GitHub issue

@jtorkkola When I was using the January 10 buck build, version 2019.01.10.01, and using the --java11-test-mode option, my build was working fine.

On the latest master HEAD version of buck:

buck version e1fec3196532dc58cf06461ac0f3020f63f570bc

I get the build failure message:

You're using Java 11, but Buck requires Java 8.

I am on MacOS X 10.14.3, and my environment is as such:

> java -version
java version "11.0.2" 2019-01-15 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.2+9-LTS)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.2+9-LTS, mixed mode)
> buck --version
buck version e1fec3196532dc58cf06461ac0f3020f63f570bc

Build output:

Unable to connect to Buck daemon, restarting it...
Not using buckd because daemon failed to start.
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.Error: java.lang.ClassNotFoundException: com.facebook.buck.cli.bootstrapper.filesystem.BuckFileSystemProvider
	at java.base/java.nio.file.FileSystems$DefaultFileSystemHolder.getDefaultProvider(FileSystems.java:141)
	at java.base/java.nio.file.FileSystems$DefaultFileSystemHolder$1.run(FileSystems.java:111)
	at java.base/java.nio.file.FileSystems$DefaultFileSystemHolder$1.run(FileSystems.java:109)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.nio.file.FileSystems$DefaultFileSystemHolder.defaultFileSystem(FileSystems.java:109)
	at java.base/java.nio.file.FileSystems$DefaultFileSystemHolder.<clinit>(FileSystems.java:103)
	at java.base/java.nio.file.FileSystems.getDefault(FileSystems.java:190)
	at java.base/java.io.File.toPath(File.java:2290)
	at java.base/java.util.zip.ZipFile$Source.get(ZipFile.java:1222)
	at java.base/java.util.zip.ZipFile$CleanableResource.<init>(ZipFile.java:726)
	at java.base/java.util.zip.ZipFile$CleanableResource.get(ZipFile.java:843)
	at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:246)
	at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:176)
	at java.base/java.util.jar.JarFile.<init>(JarFile.java:346)
	at java.base/jdk.internal.loader.URLClassPath$JarLoader.getJarFile(URLClassPath.java:813)
	at java.base/jdk.internal.loader.URLClassPath$JarLoader$1.run(URLClassPath.java:758)
	at java.base/jdk.internal.loader.URLClassPath$JarLoader$1.run(URLClassPath.java:751)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/jdk.internal.loader.URLClassPath$JarLoader.ensureOpen(URLClassPath.java:750)
	at java.base/jdk.internal.loader.URLClassPath$JarLoader.<init>(URLClassPath.java:725)
	at java.base/jdk.internal.loader.URLClassPath$3.run(URLClassPath.java:493)
	at java.base/jdk.internal.loader.URLClassPath$3.run(URLClassPath.java:476)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/jdk.internal.loader.URLClassPath.getLoader(URLClassPath.java:475)
	at java.base/jdk.internal.loader.URLClassPath.getLoader(URLClassPath.java:444)
	at java.base/jdk.internal.loader.URLClassPath.getResource(URLClassPath.java:313)
	at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:697)
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:623)
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
	at java.base/java.lang.Class.forName0(Native Method)
	at java.base/java.lang.Class.forName(Class.java:398)
	at java.base/sun.launcher.LauncherHelper.loadMainClass(LauncherHelper.java:760)
	at java.base/sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:655)
Caused by: java.lang.ClassNotFoundException: com.facebook.buck.cli.bootstrapper.filesystem.BuckFileSystemProvider
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
	at java.base/java.lang.Class.forName0(Native Method)
	at java.base/java.lang.Class.forName(Class.java:398)
	at java.base/java.nio.file.FileSystems$DefaultFileSystemHolder.getDefaultProvider(FileSystems.java:131)
	... 34 more
You're using Java 11, but Buck requires Java 8.
Please follow https://buckbuild.com/setup/getting_started.html to properly setup your local environment and avoid build issues.

When I built buck on the commit immediately prior to the removal commit (fadef0fe2051e3533e111638a2f68989431154ba), I do not see the failure above. When I built buck on the commit immediately after the removal commit (99641972d9b9da9226cabdb9eb76db58524ce97a), then the error returns.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
jtorkkolacommented, Apr 4, 2019

There have been numerous breaking changes (interface, structural, behavioral) between Java 8 and 11, rendering running Java 8 Buck on Java 11 impossible. Buck is particularly badly affected since it reaches into compiler internals for some aspects of Java compilation.

0reactions
jtorkkolacommented, Apr 17, 2019

@styurin Agreed that this may be useful in the future. I don’t plan on doing this for Java 8.

Read more comments on GitHub >

github_iconTop Results From Across the Web

RELEASE AND WAIVER (Premature Removal of Appliances)
I further understand that, by executing this Release and Waiver and said Doctor's agreement to remove my appliances at my request and such...
Read more >
Is it possible to get braces removed early? - Sabka Dentist
How Long Will It Take to Remove the Braces? Learn more about when braces can be removed early and when they need to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found