New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error `java.lang.IllegalArgumentException: Must hint overloaded method: toArray` when running wcb #85

Closed
ilangoodman opened this Issue Nov 2, 2018 · 5 comments

Comments

Projects
None yet
2 participants
@ilangoodman

ilangoodman commented Nov 2, 2018

I followed the README instructions to install and run the tool, and I get the error shown below. My system:
MacOS High Sierra (10.13.6)
Clojure 1.9.0
java 11.0.1 2018-10-16 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.1+13-LTS)

Full error and stacktrace

$ cd tool && ./wcb
Exception in thread "main" java.lang.IllegalArgumentException: Must hint overloaded method: toArray, compiling:(flatland/ordered/set.clj:19:1)
	at clojure.lang.Compiler.analyzeSeq(Compiler.java:7010)
	at clojure.lang.Compiler.analyze(Compiler.java:6773)
	at clojure.lang.Compiler.analyze(Compiler.java:6729)
	at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:6100)
	at clojure.lang.Compiler$LetExpr$Parser.parse(Compiler.java:6420)
	at clojure.lang.Compiler.analyzeSeq(Compiler.java:7003)
	at clojure.lang.Compiler.analyze(Compiler.java:6773)
	at clojure.lang.Compiler.analyze(Compiler.java:6729)
	at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:6100)
	at clojure.lang.Compiler$FnMethod.parse(Compiler.java:5460)
	at clojure.lang.Compiler$FnExpr.parse(Compiler.java:4022)
	at clojure.lang.Compiler.analyzeSeq(Compiler.java:7001)
	at clojure.lang.Compiler.analyze(Compiler.java:6773)
	at clojure.lang.Compiler.eval(Compiler.java:7059)
	at clojure.lang.Compiler.load(Compiler.java:7514)
	at clojure.lang.RT.loadResourceScript(RT.java:379)
	at clojure.lang.RT.loadResourceScript(RT.java:370)
	at clojure.lang.RT.load(RT.java:460)
	at clojure.lang.RT.load(RT.java:426)
	at clojure.core$load$fn__6548.invoke(core.clj:6046)
	at clojure.core$load.invokeStatic(core.clj:6045)
	at clojure.core$load.doInvoke(core.clj:6029)
	at clojure.lang.RestFn.invoke(RestFn.java:408)
	at clojure.core$load_one.invokeStatic(core.clj:5848)
	at clojure.core$load_one.invoke(core.clj:5843)
	at clojure.core$load_lib$fn__6493.invoke(core.clj:5888)
	at clojure.core$load_lib.invokeStatic(core.clj:5887)
	at clojure.core$load_lib.doInvoke(core.clj:5868)
	at clojure.lang.RestFn.applyTo(RestFn.java:142)
	at clojure.core$apply.invokeStatic(core.clj:659)
	at clojure.core$load_libs.invokeStatic(core.clj:5925)
	at clojure.core$load_libs.doInvoke(core.clj:5909)
	at clojure.lang.RestFn.applyTo(RestFn.java:137)
	at clojure.core$apply.invokeStatic(core.clj:661)
	at clojure.core$use.invokeStatic(core.clj:6013)
	at clojure.core$use.doInvoke(core.clj:6013)
	at clojure.lang.RestFn.invoke(RestFn.java:436)
	at flatland.ordered.map$eval12444$loading__6434__auto____12445.invoke(map.clj:1)
	at flatland.ordered.map$eval12444.invokeStatic(map.clj:1)
	at flatland.ordered.map$eval12444.invoke(map.clj:1)
	at clojure.lang.Compiler.eval(Compiler.java:7062)
	at clojure.lang.Compiler.eval(Compiler.java:7051)
	at clojure.lang.Compiler.load(Compiler.java:7514)
	at clojure.lang.RT.loadResourceScript(RT.java:379)
	at clojure.lang.RT.loadResourceScript(RT.java:370)
	at clojure.lang.RT.load(RT.java:460)
	at clojure.lang.RT.load(RT.java:426)
	at clojure.core$load$fn__6548.invoke(core.clj:6046)
	at clojure.core$load.invokeStatic(core.clj:6045)
	at clojure.core$load.doInvoke(core.clj:6029)
	at clojure.lang.RestFn.invoke(RestFn.java:408)
	at clojure.core$load_one.invokeStatic(core.clj:5848)
	at clojure.core$load_one.invoke(core.clj:5843)
	at clojure.core$load_lib$fn__6493.invoke(core.clj:5888)
	at clojure.core$load_lib.invokeStatic(core.clj:5887)
	at clojure.core$load_lib.doInvoke(core.clj:5868)
	at clojure.lang.RestFn.applyTo(RestFn.java:142)
	at clojure.core$apply.invokeStatic(core.clj:659)
	at clojure.core$load_libs.invokeStatic(core.clj:5925)
	at clojure.core$load_libs.doInvoke(core.clj:5909)
	at clojure.lang.RestFn.applyTo(RestFn.java:137)
	at clojure.core$apply.invokeStatic(core.clj:659)
	at clojure.core$require.invokeStatic(core.clj:5947)
	at clojure.core$require.doInvoke(core.clj:5947)
	at clojure.lang.RestFn.invoke(RestFn.java:421)
	at clj_yaml.core$eval12438$loading__6434__auto____12439.invoke(core.clj:1)
	at clj_yaml.core$eval12438.invokeStatic(core.clj:1)
	at clj_yaml.core$eval12438.invoke(core.clj:1)
	at clojure.lang.Compiler.eval(Compiler.java:7062)
	at clojure.lang.Compiler.eval(Compiler.java:7051)
	at clojure.lang.Compiler.load(Compiler.java:7514)
	at clojure.lang.RT.loadResourceScript(RT.java:379)
	at clojure.lang.RT.loadResourceScript(RT.java:370)
	at clojure.lang.RT.load(RT.java:460)
	at clojure.lang.RT.load(RT.java:426)
	at clojure.core$load$fn__6548.invoke(core.clj:6046)
	at clojure.core$load.invokeStatic(core.clj:6045)
	at clojure.core$load.doInvoke(core.clj:6029)
	at clojure.lang.RestFn.invoke(RestFn.java:408)
	at clojure.core$load_one.invokeStatic(core.clj:5848)
	at clojure.core$load_one.invoke(core.clj:5843)
	at clojure.core$load_lib$fn__6493.invoke(core.clj:5888)
	at clojure.core$load_lib.invokeStatic(core.clj:5887)
	at clojure.core$load_lib.doInvoke(core.clj:5868)
	at clojure.lang.RestFn.applyTo(RestFn.java:142)
	at clojure.core$apply.invokeStatic(core.clj:659)
	at clojure.core$load_libs.invokeStatic(core.clj:5925)
	at clojure.core$load_libs.doInvoke(core.clj:5909)
	at clojure.lang.RestFn.applyTo(RestFn.java:137)
	at clojure.core$apply.invokeStatic(core.clj:659)
	at clojure.core$require.invokeStatic(core.clj:5947)
	at clojure.core$require.doInvoke(core.clj:5947)
	at clojure.lang.RestFn.invoke(RestFn.java:619)
	at fc4.model$eval12432$loading__6434__auto____12433.invoke(model.clj:1)
	at fc4.model$eval12432.invokeStatic(model.clj:1)
	at fc4.model$eval12432.invoke(model.clj:1)
	at clojure.lang.Compiler.eval(Compiler.java:7062)
	at clojure.lang.Compiler.eval(Compiler.java:7051)
	at clojure.lang.Compiler.load(Compiler.java:7514)
	at clojure.lang.RT.loadResourceScript(RT.java:379)
	at clojure.lang.RT.loadResourceScript(RT.java:370)
	at clojure.lang.RT.load(RT.java:460)
	at clojure.lang.RT.load(RT.java:426)
	at clojure.core$load$fn__6548.invoke(core.clj:6046)
	at clojure.core$load.invokeStatic(core.clj:6045)
	at clojure.core$load.doInvoke(core.clj:6029)
	at clojure.lang.RestFn.invoke(RestFn.java:408)
	at clojure.core$load_one.invokeStatic(core.clj:5848)
	at clojure.core$load_one.invoke(core.clj:5843)
	at clojure.core$load_lib$fn__6493.invoke(core.clj:5888)
	at clojure.core$load_lib.invokeStatic(core.clj:5887)
	at clojure.core$load_lib.doInvoke(core.clj:5868)
	at clojure.lang.RestFn.applyTo(RestFn.java:142)
	at clojure.core$apply.invokeStatic(core.clj:659)
	at clojure.core$load_libs.invokeStatic(core.clj:5925)
	at clojure.core$load_libs.doInvoke(core.clj:5909)
	at clojure.lang.RestFn.applyTo(RestFn.java:137)
	at clojure.core$apply.invokeStatic(core.clj:659)
	at clojure.core$require.invokeStatic(core.clj:5947)
	at clojure.core$require.doInvoke(core.clj:5947)
	at clojure.lang.RestFn.invoke(RestFn.java:551)
	at fc4.integrations.structurizr.express.spec$eval9183$loading__6434__auto____9184.invoke(spec.clj:1)
	at fc4.integrations.structurizr.express.spec$eval9183.invokeStatic(spec.clj:1)
	at fc4.integrations.structurizr.express.spec$eval9183.invoke(spec.clj:1)
	at clojure.lang.Compiler.eval(Compiler.java:7062)
	at clojure.lang.Compiler.eval(Compiler.java:7051)
	at clojure.lang.Compiler.load(Compiler.java:7514)
	at clojure.lang.RT.loadResourceScript(RT.java:379)
	at clojure.lang.RT.loadResourceScript(RT.java:370)
	at clojure.lang.RT.load(RT.java:460)
	at clojure.lang.RT.load(RT.java:426)
	at clojure.core$load$fn__6548.invoke(core.clj:6046)
	at clojure.core$load.invokeStatic(core.clj:6045)
	at clojure.core$load.doInvoke(core.clj:6029)
	at clojure.lang.RestFn.invoke(RestFn.java:408)
	at clojure.core$load_one.invokeStatic(core.clj:5848)
	at clojure.core$load_one.invoke(core.clj:5843)
	at clojure.core$load_lib$fn__6493.invoke(core.clj:5888)
	at clojure.core$load_lib.invokeStatic(core.clj:5887)
	at clojure.core$load_lib.doInvoke(core.clj:5868)
	at clojure.lang.RestFn.applyTo(RestFn.java:142)
	at clojure.core$apply.invokeStatic(core.clj:659)
	at clojure.core$load_libs.invokeStatic(core.clj:5925)
	at clojure.core$load_libs.doInvoke(core.clj:5909)
	at clojure.lang.RestFn.applyTo(RestFn.java:137)
	at clojure.core$apply.invokeStatic(core.clj:659)
	at clojure.core$require.invokeStatic(core.clj:5947)
	at clojure.core$require.doInvoke(core.clj:5947)
	at clojure.lang.RestFn.invoke(RestFn.java:1289)
	at fc4.integrations.structurizr.express.edit$eval9177$loading__6434__auto____9178.invoke(edit.clj:1)
	at fc4.integrations.structurizr.express.edit$eval9177.invokeStatic(edit.clj:1)
	at fc4.integrations.structurizr.express.edit$eval9177.invoke(edit.clj:1)
	at clojure.lang.Compiler.eval(Compiler.java:7062)
	at clojure.lang.Compiler.eval(Compiler.java:7051)
	at clojure.lang.Compiler.load(Compiler.java:7514)
	at clojure.lang.RT.loadResourceScript(RT.java:379)
	at clojure.lang.RT.loadResourceScript(RT.java:370)
	at clojure.lang.RT.load(RT.java:460)
	at clojure.lang.RT.load(RT.java:426)
	at clojure.core$load$fn__6548.invoke(core.clj:6046)
	at clojure.core$load.invokeStatic(core.clj:6045)
	at clojure.core$load.doInvoke(core.clj:6029)
	at clojure.lang.RestFn.invoke(RestFn.java:408)
	at clojure.core$load_one.invokeStatic(core.clj:5848)
	at clojure.core$load_one.invoke(core.clj:5843)
	at clojure.core$load_lib$fn__6493.invoke(core.clj:5888)
	at clojure.core$load_lib.invokeStatic(core.clj:5887)
	at clojure.core$load_lib.doInvoke(core.clj:5868)
	at clojure.lang.RestFn.applyTo(RestFn.java:142)
	at clojure.core$apply.invokeStatic(core.clj:659)
	at clojure.core$load_libs.invokeStatic(core.clj:5925)
	at clojure.core$load_libs.doInvoke(core.clj:5909)
	at clojure.lang.RestFn.applyTo(RestFn.java:137)
	at clojure.core$apply.invokeStatic(core.clj:659)
	at clojure.core$require.invokeStatic(core.clj:5947)
	at clojure.core$require.doInvoke(core.clj:5947)
	at clojure.lang.RestFn.invoke(RestFn.java:421)
	at fc4.integrations.structurizr.express.clipboard$eval155$loading__6434__auto____156.invoke(clipboard.clj:1)
	at fc4.integrations.structurizr.express.clipboard$eval155.invokeStatic(clipboard.clj:1)
	at fc4.integrations.structurizr.express.clipboard$eval155.invoke(clipboard.clj:1)
	at clojure.lang.Compiler.eval(Compiler.java:7062)
	at clojure.lang.Compiler.eval(Compiler.java:7051)
	at clojure.lang.Compiler.load(Compiler.java:7514)
	at clojure.lang.RT.loadResourceScript(RT.java:379)
	at clojure.lang.RT.loadResourceScript(RT.java:370)
	at clojure.lang.RT.load(RT.java:460)
	at clojure.lang.RT.load(RT.java:426)
	at clojure.core$load$fn__6548.invoke(core.clj:6046)
	at clojure.core$load.invokeStatic(core.clj:6045)
	at clojure.core$load.doInvoke(core.clj:6029)
	at clojure.lang.RestFn.invoke(RestFn.java:408)
	at clojure.core$load_one.invokeStatic(core.clj:5848)
	at clojure.core$load_one.invoke(core.clj:5843)
	at clojure.core$load_lib$fn__6493.invoke(core.clj:5888)
	at clojure.core$load_lib.invokeStatic(core.clj:5887)
	at clojure.core$load_lib.doInvoke(core.clj:5868)
	at clojure.lang.RestFn.applyTo(RestFn.java:142)
	at clojure.core$apply.invokeStatic(core.clj:659)
	at clojure.core$load_libs.invokeStatic(core.clj:5925)
	at clojure.core$load_libs.doInvoke(core.clj:5909)
	at clojure.lang.RestFn.applyTo(RestFn.java:137)
	at clojure.core$apply.invokeStatic(core.clj:659)
	at clojure.core$require.invokeStatic(core.clj:5947)
	at clojure.core$require.doInvoke(core.clj:5947)
	at clojure.lang.RestFn.invoke(RestFn.java:421)
	at fc4.cli.wcb$eval149$loading__6434__auto____150.invoke(wcb.clj:1)
	at fc4.cli.wcb$eval149.invokeStatic(wcb.clj:1)
	at fc4.cli.wcb$eval149.invoke(wcb.clj:1)
	at clojure.lang.Compiler.eval(Compiler.java:7062)
	at clojure.lang.Compiler.eval(Compiler.java:7051)
	at clojure.lang.Compiler.load(Compiler.java:7514)
	at clojure.lang.RT.loadResourceScript(RT.java:379)
	at clojure.lang.RT.loadResourceScript(RT.java:370)
	at clojure.lang.RT.load(RT.java:460)
	at clojure.lang.RT.load(RT.java:426)
	at clojure.core$load$fn__6548.invoke(core.clj:6046)
	at clojure.core$load.invokeStatic(core.clj:6045)
	at clojure.core$load.doInvoke(core.clj:6029)
	at clojure.lang.RestFn.invoke(RestFn.java:408)
	at clojure.core$load_one.invokeStatic(core.clj:5848)
	at clojure.core$load_one.invoke(core.clj:5843)
	at clojure.core$load_lib$fn__6493.invoke(core.clj:5888)
	at clojure.core$load_lib.invokeStatic(core.clj:5887)
	at clojure.core$load_lib.doInvoke(core.clj:5868)
	at clojure.lang.RestFn.applyTo(RestFn.java:142)
	at clojure.core$apply.invokeStatic(core.clj:659)
	at clojure.core$load_libs.invokeStatic(core.clj:5925)
	at clojure.core$load_libs.doInvoke(core.clj:5909)
	at clojure.lang.RestFn.applyTo(RestFn.java:137)
	at clojure.core$apply.invokeStatic(core.clj:659)
	at clojure.core$require.invokeStatic(core.clj:5947)
	at clojure.main$main_opt.invokeStatic(main.clj:317)
	at clojure.main$main_opt.invoke(main.clj:313)
	at clojure.main$main.invokeStatic(main.clj:424)
	at clojure.main$main.doInvoke(main.clj:387)
	at clojure.lang.RestFn.applyTo(RestFn.java:137)
	at clojure.lang.Var.applyTo(Var.java:702)
	at clojure.main.main(main.java:37)
Caused by: java.lang.IllegalArgumentException: Must hint overloaded method: toArray
	at clojure.lang.Compiler$NewInstanceMethod.parse(Compiler.java:8375)
	at clojure.lang.Compiler$NewInstanceExpr.build(Compiler.java:7937)
	at clojure.lang.Compiler$NewInstanceExpr$DeftypeParser.parse(Compiler.java:7813)
	at clojure.lang.Compiler.analyzeSeq(Compiler.java:7003)
	... 237 more

@aviflax aviflax self-assigned this Nov 5, 2018

@aviflax aviflax added the bug label Nov 5, 2018

@aviflax

This comment has been minimized.

Contributor

aviflax commented Nov 5, 2018

Thanks for the detailed bug report! I have a pretty good feeling I know what this is, and if I’m right then there are a few different possible workarounds and longer-term fixes. I’m just going to take a few minutes to confirm right now.

aviflax added a commit that referenced this issue Nov 5, 2018

[tool] Add support for creating an AOT-compiled Uberjar
Proximate catalyst is to address #85 wherein the project cannot
(currently) be compiled under Java 11 due to an incompatibility between
Java 11 and one of the project’s indirect dependencies (flatland/ordered
via clj-yaml).

By AOT compiling the project on Java <11 and then packaging up the
compiled code along with its dependencies, the resulting JAR will run
just fine on Java 11. It’s not quite as flexible as running the project
from source using `clojure` -- the “entrypoint” (main class) is
hard-coded -- but for now that’s the only command that’s really
relevant to end-users.

This also makes some progress on
[Enhancement Proposal EP04: Improve the Initial UX of fc4-tool][ep04]
by removing the requirements that end-users clone the project and
install Clojure; now they just need Java and they can download the
packaged JAR and run it.

TODO: eliminate the reflection warnings that are printed out when
running the jar under Java 11.

TODO: move the process of building this JAR and uploading it to GitHub
to CI.

[ep04]: #76
@aviflax

This comment has been minimized.

Contributor

aviflax commented Nov 5, 2018

In a nutshell: this project cannot currently compile on Java 11 due to an incompatibility in a dependency of a dependency.

As a workaround, you could “simply” run the project with Java 8/9/10. (If you want to do so, I recommend brew install jenv adoptopenjdk8 then set up jenv so you can easily switch between JDKs if you wish.)

However, I wouldn’t want users of this tool to have to do this, so I’ve started a branch that adds support for building an ahead of time (AOT) compiled and self-contained uberjar of the tool. This isn’t yet ready to merge, but I’ve also created a release built from this branch from which you can download fc4.jar which should work just fine on Java 11 — at least, it does on my Mac. (java -jar fc4.jar)

Do you want to download that jar file and give it a try, and let me know if it works for you?

@aviflax aviflax added the tool label Nov 5, 2018

aviflax added a commit that referenced this issue Nov 6, 2018

[tool] Add support for creating an AOT-compiled Uberjar
Proximate catalyst is to address #85 wherein the project cannot
(currently) be compiled under Java 11 due to an incompatibility between
Java 11 and one of the project’s indirect dependencies (flatland/ordered
via clj-yaml).

By AOT compiling the project on Java <11 and then packaging up the
compiled code along with its dependencies, the resulting JAR will run
just fine on Java 11. It’s not quite as flexible as running the project
from source using `clojure` -- the “entrypoint” (main class) is
hard-coded -- but for now that’s the only command that’s really
relevant to end-users.

This also makes some progress on
[Enhancement Proposal EP04: Improve the Initial UX of fc4-tool][ep04]
by removing the requirements that end-users clone the project and
install Clojure; now they just need Java and they can download the
packaged JAR and run it.

TODO: eliminate the reflection warnings that are printed out when
running the jar under Java 11.

TODO: move the process of building this JAR and uploading it to GitHub
to CI.

[ep04]: #76
@ilangoodman

This comment has been minimized.

ilangoodman commented Nov 7, 2018

Thanks @aviflax ! I can confirm that the jar file works for me.

@aviflax

This comment has been minimized.

Contributor

aviflax commented Nov 7, 2018

Excellent! My pleasure.

aviflax added a commit that referenced this issue Nov 7, 2018

[tool] Add support for creating an AOT-compiled Uberjar
Proximate catalyst is to address #85 wherein the project cannot
(currently) be compiled under Java 11 due to an incompatibility between
Java 11 and one of the project’s indirect dependencies (flatland/ordered
via clj-yaml).

By AOT compiling the project on Java <11 and then packaging up the
compiled code along with its dependencies, the resulting JAR will run
just fine on Java 11. It’s not quite as flexible as running the project
from source using `clojure` -- the “entrypoint” (main class) is
hard-coded -- but for now that’s the only command that’s really
relevant to end-users.

This also makes some progress on
[Enhancement Proposal EP04: Improve the Initial UX of fc4-tool][ep04]
by removing the requirements that end-users clone the project and
install Clojure; now they just need Java and they can download the
packaged JAR and run it.

TODO: eliminate the reflection warnings that are printed out when
running the jar under Java 11.

TODO: move the process of building this JAR and uploading it to GitHub
to CI.

[ep04]: #76

@aviflax aviflax closed this in #87 Nov 7, 2018

@aviflax

This comment has been minimized.

Contributor

aviflax commented Nov 14, 2018

Just FYI, the release linked above has now been superseded by newer releases — which are more robust, as they’re non-pre-releases, i.e. they’re “final” or “official” releases, and they’re being built by an automated process rather than the manual steps I used to create the pre-release.

As the newer releases now include automated rendering and other improvements, I recommend downloading a newer release and giving it a try.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment