boot-clj / boot

Build tooling for Clojure.
https://boot-clj.github.io/
Eclipse Public License 1.0
1.75k stars 182 forks source link

'boot repl' on macOS results in java.lang.IllegalAccessError #588

Closed brentvukmer closed 7 years ago

brentvukmer commented 7 years ago

Here's my terminal session where I install boot via Homebrew and try to start a REPL:

> brew install boot-clj
==> Using the sandbox
==> Downloading https://github.com/boot-clj/boot-bin
==> Downloading from https://github-cloud.s3.amazona
######################################################################## 100.0%
🍺  /usr/local/Cellar/boot-clj/2.5.2: 3 files, 7.7K, built in 3 seconds
> boot repl
Please download latest Boot binary: https://github.com/boot-clj/boot#install
> boot -u
Retrieving boot-2.7.1.jar from https://clojars.org/repo/
#https://github.com/boot-clj/boot
#Sat Feb 11 21:55:15 EST 2017
BOOT_CLOJURE_VERSION=1.7.0
BOOT_VERSION=2.7.1
#App version: 2.3.0
Retrieving pod-2.7.1.jar from https://clojars.org/repo/
Retrieving dynapath-0.2.5.jar from https://repo1.maven.org/maven2/
Retrieving core-2.7.1.jar from https://clojars.org/repo/
Retrieving worker-2.7.1.jar from https://clojars.org/repo/
Retrieving aether-2.7.1.jar from https://clojars.org/repo/
Retrieving fipp-0.6.6.jar from https://clojars.org/repo/
Retrieving puget-1.0.1.jar from https://clojars.org/repo/
Retrieving arrangement-1.1.0.jar from https://clojars.org/repo/
Retrieving pomegranate-0.3.1.jar from https://repo1.maven.org/maven2/
Retrieving commons-logging-1.1.3.jar from https://repo1.maven.org/maven2/
Retrieving wagon-http-2.9.jar from https://repo1.maven.org/maven2/
Retrieving wagon-http-shared-2.9.jar from https://repo1.maven.org/maven2/
Retrieving httpclient-4.3.5.jar from https://repo1.maven.org/maven2/
Retrieving commons-io-2.2.jar from https://repo1.maven.org/maven2/
Retrieving httpcore-4.3.2.jar from https://repo1.maven.org/maven2/
Retrieving core.rrb-vector-0.0.11.jar from https://repo1.maven.org/maven2/
> boot repl
Exception in thread "main" java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at Boot.main(Boot.java:258)
Caused by: java.util.concurrent.ExecutionException: java.lang.IllegalAccessError: tried to access method boot.App.isWindows()Z from class boot.file__init
    at java.util.concurrent.FutureTask.report(FutureTask.java:122)
    at java.util.concurrent.FutureTask.get(FutureTask.java:192)
    at boot.App.runBoot(App.java:248)
    at boot.App.main(App.java:356)
    ... 5 more
Caused by: java.lang.IllegalAccessError: tried to access method boot.App.isWindows()Z from class boot.file__init
    at boot.file__init.load(Unknown Source)
    at boot.file__init.<clinit>(Unknown Source)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:348)
    at clojure.lang.RT.classForName(RT.java:2154)
    at clojure.lang.RT.classForName(RT.java:2163)
    at clojure.lang.RT.loadClassForName(RT.java:2182)
    at clojure.lang.RT.load(RT.java:436)
    at clojure.lang.RT.load(RT.java:412)
    at clojure.core$load$fn__5448.invoke(core.clj:5866)
    at clojure.core$load.doInvoke(core.clj:5865)
    at clojure.lang.RestFn.invoke(RestFn.java:408)
    at clojure.core$load_one.invoke(core.clj:5671)
    at clojure.core$load_lib$fn__5397.invoke(core.clj:5711)
    at clojure.core$load_lib.doInvoke(core.clj:5710)
    at clojure.lang.RestFn.applyTo(RestFn.java:142)
    at clojure.core$apply.invoke(core.clj:632)
    at clojure.core$load_libs.doInvoke(core.clj:5749)
    at clojure.lang.RestFn.applyTo(RestFn.java:137)
    at clojure.core$apply.invoke(core.clj:632)
    at clojure.core$require.doInvoke(core.clj:5832)
    at clojure.lang.RestFn.invoke(RestFn.java:619)
    at boot.util$loading__4958__auto__.invoke(util.clj:1)
    at boot.util__init.load(Unknown Source)
    at boot.util__init.<clinit>(Unknown Source)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:348)
    at clojure.lang.RT.classForName(RT.java:2154)
    at clojure.lang.RT.classForName(RT.java:2163)
    at clojure.lang.RT.loadClassForName(RT.java:2182)
    at clojure.lang.RT.load(RT.java:436)
    at clojure.lang.RT.load(RT.java:412)
    at clojure.core$load$fn__5448.invoke(core.clj:5866)
    at clojure.core$load.doInvoke(core.clj:5865)
    at clojure.lang.RestFn.invoke(RestFn.java:408)
    at clojure.core$load_one.invoke(core.clj:5671)
    at clojure.core$load_lib$fn__5397.invoke(core.clj:5711)
    at clojure.core$load_lib.doInvoke(core.clj:5710)
    at clojure.lang.RestFn.applyTo(RestFn.java:142)
    at clojure.core$apply.invoke(core.clj:632)
    at clojure.core$load_libs.doInvoke(core.clj:5749)
    at clojure.lang.RestFn.applyTo(RestFn.java:137)
    at clojure.core$apply.invoke(core.clj:632)
    at clojure.core$require.doInvoke(core.clj:5832)
    at clojure.lang.RestFn.invoke(RestFn.java:805)
    at boot.pod$loading__4958__auto__.invoke(pod.clj:1)
    at boot.pod__init.load(Unknown Source)
    at boot.pod__init.<clinit>(Unknown Source)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:348)
    at clojure.lang.RT.classForName(RT.java:2154)
    at clojure.lang.RT.classForName(RT.java:2163)
    at clojure.lang.RT.loadClassForName(RT.java:2182)
    at clojure.lang.RT.load(RT.java:436)
    at clojure.lang.RT.load(RT.java:412)
    at clojure.core$load$fn__5448.invoke(core.clj:5866)
    at clojure.core$load.doInvoke(core.clj:5865)
    at clojure.lang.RestFn.invoke(RestFn.java:408)
    at clojure.core$load_one.invoke(core.clj:5671)
    at clojure.core$load_lib$fn__5397.invoke(core.clj:5711)
    at clojure.core$load_lib.doInvoke(core.clj:5710)
    at clojure.lang.RestFn.applyTo(RestFn.java:142)
    at clojure.core$apply.invoke(core.clj:632)
    at clojure.core$load_libs.doInvoke(core.clj:5749)
    at clojure.lang.RestFn.applyTo(RestFn.java:137)
    at clojure.core$apply.invoke(core.clj:632)
    at clojure.core$require.doInvoke(core.clj:5832)
    at clojure.lang.RestFn.invoke(RestFn.java:408)
    at clojure.lang.Var.invoke(Var.java:379)
    at org.projectodd.shimdandy.impl.ClojureRuntimeShimImpl.require(ClojureRuntimeShimImpl.java:78)
    at boot.App.newShim(App.java:162)
    at boot.App$1.call(App.java:223)
    at boot.App$1.call(App.java:221)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
brentvukmer@Brents-MacBook-Pro ~/D/Workspaces> boot repl
Exception in thread "main" java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at Boot.main(Boot.java:258)
Caused by: java.util.concurrent.ExecutionException: java.lang.IllegalAccessError: tried to access method boot.App.isWindows()Z from class boot.file__init
    at java.util.concurrent.FutureTask.report(FutureTask.java:122)
    at java.util.concurrent.FutureTask.get(FutureTask.java:192)
    at boot.App.runBoot(App.java:248)
    at boot.App.main(App.java:356)
    ... 5 more
Caused by: java.lang.IllegalAccessError: tried to access method boot.App.isWindows()Z from class boot.file__init
    at boot.file__init.load(Unknown Source)
    at boot.file__init.<clinit>(Unknown Source)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:348)
    at clojure.lang.RT.classForName(RT.java:2154)
    at clojure.lang.RT.classForName(RT.java:2163)
    at clojure.lang.RT.loadClassForName(RT.java:2182)
    at clojure.lang.RT.load(RT.java:436)
    at clojure.lang.RT.load(RT.java:412)
    at clojure.core$load$fn__5448.invoke(core.clj:5866)
    at clojure.core$load.doInvoke(core.clj:5865)
    at clojure.lang.RestFn.invoke(RestFn.java:408)
    at clojure.core$load_one.invoke(core.clj:5671)
    at clojure.core$load_lib$fn__5397.invoke(core.clj:5711)
    at clojure.core$load_lib.doInvoke(core.clj:5710)
    at clojure.lang.RestFn.applyTo(RestFn.java:142)
    at clojure.core$apply.invoke(core.clj:632)
    at clojure.core$load_libs.doInvoke(core.clj:5749)
    at clojure.lang.RestFn.applyTo(RestFn.java:137)
    at clojure.core$apply.invoke(core.clj:632)
    at clojure.core$require.doInvoke(core.clj:5832)
    at clojure.lang.RestFn.invoke(RestFn.java:619)
    at boot.util$loading__4958__auto__.invoke(util.clj:1)
    at boot.util__init.load(Unknown Source)
    at boot.util__init.<clinit>(Unknown Source)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:348)
    at clojure.lang.RT.classForName(RT.java:2154)
    at clojure.lang.RT.classForName(RT.java:2163)
    at clojure.lang.RT.loadClassForName(RT.java:2182)
    at clojure.lang.RT.load(RT.java:436)
    at clojure.lang.RT.load(RT.java:412)
    at clojure.core$load$fn__5448.invoke(core.clj:5866)
    at clojure.core$load.doInvoke(core.clj:5865)
    at clojure.lang.RestFn.invoke(RestFn.java:408)
    at clojure.core$load_one.invoke(core.clj:5671)
    at clojure.core$load_lib$fn__5397.invoke(core.clj:5711)
    at clojure.core$load_lib.doInvoke(core.clj:5710)
    at clojure.lang.RestFn.applyTo(RestFn.java:142)
    at clojure.core$apply.invoke(core.clj:632)
    at clojure.core$load_libs.doInvoke(core.clj:5749)
    at clojure.lang.RestFn.applyTo(RestFn.java:137)
    at clojure.core$apply.invoke(core.clj:632)
    at clojure.core$require.doInvoke(core.clj:5832)
    at clojure.lang.RestFn.invoke(RestFn.java:805)
    at boot.pod$loading__4958__auto__.invoke(pod.clj:1)
    at boot.pod__init.load(Unknown Source)
    at boot.pod__init.<clinit>(Unknown Source)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:348)
    at clojure.lang.RT.classForName(RT.java:2154)
    at clojure.lang.RT.classForName(RT.java:2163)
    at clojure.lang.RT.loadClassForName(RT.java:2182)
    at clojure.lang.RT.load(RT.java:436)
    at clojure.lang.RT.load(RT.java:412)
    at clojure.core$load$fn__5448.invoke(core.clj:5866)
    at clojure.core$load.doInvoke(core.clj:5865)
    at clojure.lang.RestFn.invoke(RestFn.java:408)
    at clojure.core$load_one.invoke(core.clj:5671)
    at clojure.core$load_lib$fn__5397.invoke(core.clj:5711)
    at clojure.core$load_lib.doInvoke(core.clj:5710)
    at clojure.lang.RestFn.applyTo(RestFn.java:142)
    at clojure.core$apply.invoke(core.clj:632)
    at clojure.core$load_libs.doInvoke(core.clj:5749)
    at clojure.lang.RestFn.applyTo(RestFn.java:137)
    at clojure.core$apply.invoke(core.clj:632)
    at clojure.core$require.doInvoke(core.clj:5832)
    at clojure.lang.RestFn.invoke(RestFn.java:408)
    at clojure.lang.Var.invoke(Var.java:379)
    at org.projectodd.shimdandy.impl.ClojureRuntimeShimImpl.require(ClojureRuntimeShimImpl.java:78)
    at boot.App.newShim(App.java:162)
    at boot.App$1.call(App.java:223)
    at boot.App$1.call(App.java:221)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
RadicalZephyr commented 7 years ago

I can't reproduce this @brentvukmer. And the output from your terminal session looks a little off to me. version

It would be helpful if you could include a few things in your bug report:

brentvukmer commented 7 years ago

Thanks for taking a look, @RadicalZephyr.

"About This Mac":

screen shot 2017-02-12 at 8 13 29 am

BOOT_JAVA_VERSION is not set.

Java version is:

java version "1.8.0_60"
Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)

ASCII portion of boot:

#!/usr/bin/env bash
declare -a "options=($BOOT_JVM_OPTIONS)"
self="${BASH_SOURCE[0]}"
selfdir="$(cd "$(dirname "${self}")" ; pwd)"
selfpath="$selfdir/$(basename "$self")"
exec ${BOOT_JAVA_COMMAND:-java} "${options[@]}" -Dboot.app.path="$selfpath" -jar "$0" "$@"
RadicalZephyr commented 7 years ago

Hmm, all that looks to be in order. That stack trace, and the commented line from when you ran boot -u seems to indicate that somehow you're using version 2.3.0 of boot.App, but you're getting later versions (2.7.1) for the rest of boot.

My advice would be to clear out your boot cache directory rm -rf ~/.boot/cache or ${BOOT_HOME}/cache if you have BOOT_HOME set. Then try running a repl or doing a boot upgrade boot -u again.

brentvukmer commented 7 years ago

Huzzah! Thanks for bearing with me, that was the culprit.