Skip to content
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

kitchensink build fails under Java 9 #79

Closed
tobias opened this issue Nov 22, 2016 · 1 comment
Closed

kitchensink build fails under Java 9 #79

tobias opened this issue Nov 22, 2016 · 1 comment

Comments

@tobias
Copy link
Contributor

tobias commented Nov 22, 2016

I'm trying to prep us all for Java 9, and took a look at kitchensink because it uses dynapath (there is a Java 9 issue with dynapath < 0.2.4 - I'll send a PR to update that shortly). Even with the newer dynapath, the kitchensink build fails with:

ERROR in (with-additional-classpath-entries-test) (Reflector.java:272)
Uncaught exception, not in assertion.
expected: nil
  actual: java.lang.IllegalArgumentException: No matching field found: getURLs for class jdk.internal.loader.ClassLoaders$AppClassLoader
 at clojure.lang.Reflector.getInstanceField (Reflector.java:272)
    clojure.lang.Reflector.invokeNoArgInstanceMember (Reflector.java:315)
    puppetlabs.kitchensink.classpath_test$fn__353$get_urls__354.invoke (classpath_test.clj:9)
    puppetlabs.kitchensink.classpath_test$fn__353.invokeStatic (classpath_test.clj:17)
    puppetlabs.kitchensink.classpath_test/fn (classpath_test.clj:6)
    clojure.test$test_var$fn__7983.invoke (test.clj:716)
    clojure.test$test_var.invokeStatic (test.clj:716)
    clojure.test$test_var.invoke (test.clj:707)
    clojure.test$test_vars$fn__8005$fn__8010.invoke (test.clj:734)
    clojure.test$default_fixture.invokeStatic (test.clj:686)
    clojure.test$default_fixture.invoke (test.clj:682)
    clojure.test$test_vars$fn__8005.invoke (test.clj:734)
    clojure.test$default_fixture.invokeStatic (test.clj:686)
    clojure.test$default_fixture.invoke (test.clj:682)
    clojure.test$test_vars.invokeStatic (test.clj:730)
    clojure.test$test_all_vars.invokeStatic (test.clj:736)
    clojure.test$test_ns.invokeStatic (test.clj:757)
    clojure.test$test_ns.invoke (test.clj:742)
    user$eval85$fn__136.invoke (form-init3789164235670503091.clj:1)
    clojure.lang.AFn.applyToHelper (AFn.java:156)
    clojure.lang.AFn.applyTo (AFn.java:144)
    clojure.core$apply.invokeStatic (core.clj:648)
    clojure.core$apply.invoke (core.clj:641)
    leiningen.core.injected$compose_hooks$fn__19.doInvoke (form-init3789164235670503091.clj:1)
    clojure.lang.RestFn.applyTo (RestFn.java:137)
    clojure.core$apply.invokeStatic (core.clj:646)
    clojure.core$apply.invoke (core.clj:641)
    leiningen.core.injected$run_hooks.invokeStatic (form-init3789164235670503091.clj:1)
    leiningen.core.injected$run_hooks.invoke (form-init3789164235670503091.clj:1)
    leiningen.core.injected$prepare_for_hooks$fn__24$fn__25.doInvoke (form-init3789164235670503091.clj:1)
    clojure.lang.RestFn.applyTo (RestFn.java:137)
    clojure.lang.AFunction$1.doInvoke (AFunction.java:29)
    clojure.lang.RestFn.invoke (RestFn.java:408)
    clojure.core$map$fn__4785.invoke (core.clj:2646)
    clojure.lang.LazySeq.sval (LazySeq.java:40)
    clojure.lang.LazySeq.seq (LazySeq.java:49)
    clojure.lang.Cons.next (Cons.java:39)
    clojure.lang.RT.boundedLength (RT.java:1749)
    clojure.lang.RestFn.applyTo (RestFn.java:130)
    clojure.core$apply.invokeStatic (core.clj:648)
    clojure.test$run_tests.invokeStatic (test.clj:767)
    clojure.test$run_tests.doInvoke (test.clj:767)
    clojure.lang.RestFn.applyTo (RestFn.java:137)
    clojure.core$apply.invokeStatic (core.clj:646)
    clojure.core$apply.invoke (core.clj:641)
    user$eval85$fn__148$fn__179.invoke (form-init3789164235670503091.clj:1)
    user$eval85$fn__148$fn__149.invoke (form-init3789164235670503091.clj:1)
    user$eval85$fn__148.invoke (form-init3789164235670503091.clj:1)
    user$eval85.invokeStatic (form-init3789164235670503091.clj:1)
    user$eval85.invoke (form-init3789164235670503091.clj:1)
    clojure.lang.Compiler.eval (Compiler.java:6927)
    clojure.lang.Compiler.eval (Compiler.java:6917)
    clojure.lang.Compiler.load (Compiler.java:7379)
    clojure.lang.Compiler.loadFile (Compiler.java:7317)
    clojure.main$load_script.invokeStatic (main.clj:275)
    clojure.main$init_opt.invokeStatic (main.clj:277)
    clojure.main$init_opt.invoke (main.clj:277)
    clojure.main$initialize.invokeStatic (main.clj:308)
    clojure.main$null_opt.invokeStatic (main.clj:342)
    clojure.main$null_opt.invoke (main.clj:339)
    clojure.main$main.invokeStatic (main.clj:421)
    clojure.main$main.doInvoke (main.clj:384)
    clojure.lang.RestFn.invoke (RestFn.java:421)
    clojure.lang.Var.invoke (Var.java:383)
    clojure.lang.AFn.applyToHelper (AFn.java:156)
    clojure.lang.Var.applyTo (Var.java:700)
    clojure.main.main (main.java:37)

This is because the AppClassLoader is no longer a URLClassLoader under Java 9 - see tobias/clojure-java-9#3

Just wanted to make you aware so you have time to fix it before the Java 9 release (currently July of next year).

tobias added a commit to tobias/clj-kitchensink that referenced this issue Nov 22, 2016
This allows kitchensink to at least load under Java 9.

Related to puppetlabs#79
@cprice404
Copy link

@tobias thanks a bunch for the heads-up!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants