omcljs / om

ClojureScript interface to Facebook's React
6.65k stars 364 forks source link

Subprocess failed #234

Closed keldLundgaard closed 10 years ago

keldLundgaard commented 10 years ago

Following these steps from the basic guide:

lein new mies-om om-tut cd om-tut lein cljsbuild auto om-tut

Results in the following failure on my Mac OSX system:

Compiling ClojureScript. Exception in thread "main" java.lang.UnsupportedClassVersionError: com/google/javascript/jscomp/CompilerOptions : Unsupported major.minor version 51.0, compiling:(cljs/closure.clj:1:1) at clojure.lang.Compiler.load(Compiler.java:7142) at clojure.lang.RT.loadResourceScript(RT.java:370) at clojure.lang.RT.loadResourceScript(RT.java:361) at clojure.lang.RT.load(RT.java:440) at clojure.lang.RT.load(RT.java:411) at clojure.core$load$fn5066.invoke(core.clj:5641) at clojure.core$load.doInvoke(core.clj:5640) at clojure.lang.RestFn.invoke(RestFn.java:408) at clojure.core$load_one.invoke(core.clj:5446) at clojure.core$load_lib$fn5015.invoke(core.clj:5486) at clojure.core$load_lib.doInvoke(core.clj:5485) at clojure.lang.RestFn.applyTo(RestFn.java:142) at clojure.core$apply.invoke(core.clj:626) at clojure.core$load_libs.doInvoke(core.clj:5524) at clojure.lang.RestFn.applyTo(RestFn.java:137) at clojure.core$apply.invoke(core.clj:628) at clojure.core$use.doInvoke(core.clj:5618) at clojure.lang.RestFn.invoke(RestFn.java:436) at cljsbuild.compiler$eval7$loading4958auto__8.invoke(compiler.clj:1) at cljsbuild.compiler$eval7.invoke(compiler.clj:1) at clojure.lang.Compiler.eval(Compiler.java:6703) at clojure.lang.Compiler.eval(Compiler.java:6692) at clojure.lang.Compiler.load(Compiler.java:7130) at clojure.lang.RT.loadResourceScript(RT.java:370) at clojure.lang.RT.loadResourceScript(RT.java:361) at clojure.lang.RT.load(RT.java:440) at clojure.lang.RT.load(RT.java:411) at clojure.core$load$fn5066.invoke(core.clj:5641) at clojure.core$load.doInvoke(core.clj:5640) at clojure.lang.RestFn.invoke(RestFn.java:408) at clojure.core$load_one.invoke(core.clj:5446) at clojure.core$load_lib$fn__5015.invoke(core.clj:5486) at clojure.core$load_lib.doInvoke(core.clj:5485) at clojure.lang.RestFn.applyTo(RestFn.java:142) at clojure.core$apply.invoke(core.clj:626) at clojure.core$load_libs.doInvoke(core.clj:5524) at clojure.lang.RestFn.applyTo(RestFn.java:137) at clojure.core$apply.invoke(core.clj:626) at clojure.core$require.doInvoke(core.clj:5607) at clojure.lang.RestFn.invoke(RestFn.java:436) at user$eval3.invoke(form-init8417153165274787001.clj:1) at clojure.lang.Compiler.eval(Compiler.java:6703) at clojure.lang.Compiler.eval(Compiler.java:6692) at clojure.lang.Compiler.load(Compiler.java:7130) at clojure.lang.Compiler.loadFile(Compiler.java:7086) at clojure.main$load_script.invoke(main.clj:274) at clojure.main$init_opt.invoke(main.clj:279) at clojure.main$initialize.invoke(main.clj:307) at clojure.main$null_opt.invoke(main.clj:342) at clojure.main$main.doInvoke(main.clj:420) at clojure.lang.RestFn.invoke(RestFn.java:421) at clojure.lang.Var.invoke(Var.java:383) at clojure.lang.AFn.applyToHelper(AFn.java:156) at clojure.lang.Var.applyTo(Var.java:700) at clojure.main.main(main.java:37) Caused by: java.lang.UnsupportedClassVersionError: com/google/javascript/jscomp/CompilerOptions : Unsupported major.minor version 51.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637) at java.lang.ClassLoader.defineClass(ClassLoader.java:621) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) at java.net.URLClassLoader.defineClass(URLClassLoader.java:283) at java.net.URLClassLoader.access$000(URLClassLoader.java:58) at java.net.URLClassLoader$1.run(URLClassLoader.java:197) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:295) at java.lang.ClassLoader.loadClass(ClassLoader.java:295) at java.lang.ClassLoader.loadClass(ClassLoader.java:295) at java.lang.ClassLoader.loadClass(ClassLoader.java:295) at java.lang.ClassLoader.loadClass(ClassLoader.java:295) at java.lang.ClassLoader.loadClass(ClassLoader.java:295) at java.lang.ClassLoader.loadClass(ClassLoader.java:295) at java.lang.ClassLoader.loadClass(ClassLoader.java:295) at java.lang.ClassLoader.loadClass(ClassLoader.java:295) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:171) at cljs.closure$eval109$loading4958auto____110.invoke(closure.clj:9) at cljs.closure$eval109.invoke(closure.clj:9) at clojure.lang.Compiler.eval(Compiler.java:6703) at clojure.lang.Compiler.eval(Compiler.java:6692) at clojure.lang.Compiler.load(Compiler.java:7130) ... 54 more Subprocess failed

I able to compile an empty cljs project fine.

Help is much appreciated, since I am really excited about getting started on Om!

henriklundahl commented 10 years ago

Which JDK version are you using? Looks like Google Closure Compiler is compiled for Java version >= 7.

GetContented commented 10 years ago

I had this issue too you have to update Java... The machine I'm using is running on Yosemite (10.10), so you have to download the latest prerelease Java 8 JDK. H2H

GetContented commented 10 years ago

I should mention that it's best to do some web searches on your error, and to ask on stack overflow before you come here unless you're sure it's a problem in the codebase. This particular problem has a number of stack overflow entries that are answered.

As this isn't a problem with the codebase, would you mind closing your issue?

keldLundgaard commented 10 years ago

Thanks henriklundahl and JulianLeviston.

kylev commented 10 years ago

Note: This will also happen if you're deploying an application to Heroku, which defaults to JDK 1.6 if anything Clojure/Leiningen is detected. They support other versions, and you can add a system.properties file to your repo to tell the Heroku system your preference:

echo "java.runtime.version=1.7" > system.properties

Add that to your repo and push, and you'll be up and running.

keldLundgaard commented 10 years ago

@kylev: Thanks. Good to know!