Skip to content
This repository has been archived by the owner on Jun 28, 2022. It is now read-only.

Cannot run stream2es with java 1.6 anymore on mac #9

Open
brwe opened this issue Jun 19, 2013 · 7 comments
Open

Cannot run stream2es with java 1.6 anymore on mac #9

brwe opened this issue Jun 19, 2013 · 7 comments

Comments

@brwe
Copy link

brwe commented Jun 19, 2013

When running stream2es with java version "1.6.0_51" on mac (OS X 10.8.4), I get the call stack below. Works fine with 1.7 for me.

To reproduce, run

  export JAVA_HOME=$(/usr/libexec/java_home -v 1.6)

,to set the java version to 6 (mine says: java version "1.6.0_51" afterwards) an then

  echo '{"foo":1}' | stream2es

Message is:

Exception in thread "main" java.lang.ExceptionInInitializerError
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:249)
at clojure.lang.RT.loadClassForName(RT.java:2098)
at clojure.lang.RT.load(RT.java:430)
at clojure.lang.RT.load(RT.java:411)
at clojure.core$load$fn__5018.invoke(core.clj:5530)
at clojure.core$load.doInvoke(core.clj:5529)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invoke(core.clj:5336)
at clojure.core$load_lib$fn__4967.invoke(core.clj:5375)
at clojure.core$load_lib.doInvoke(core.clj:5374)
at clojure.lang.RestFn.applyTo(RestFn.java:142)
at clojure.core$apply.invoke(core.clj:619)
at clojure.core$load_libs.doInvoke(core.clj:5413)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invoke(core.clj:619)
at clojure.core$require.doInvoke(core.clj:5496)
at clojure.lang.RestFn.invoke(RestFn.java:551)
at stream2es.auth$loading__4910__auto__.invoke(auth.clj:1)
at stream2es.auth__init.load(Unknown Source)
at stream2es.auth__init.(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:249)
at clojure.lang.RT.loadClassForName(RT.java:2098)
at clojure.lang.RT.load(RT.java:430)
at clojure.lang.RT.load(RT.java:411)
at clojure.core$load$fn__5018.invoke(core.clj:5530)
at clojure.core$load.doInvoke(core.clj:5529)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invoke(core.clj:5336)
at clojure.core$load_lib$fn__4967.invoke(core.clj:5375)
at clojure.core$load_lib.doInvoke(core.clj:5374)
at clojure.lang.RestFn.applyTo(RestFn.java:142)
at clojure.core$apply.invoke(core.clj:619)
at clojure.core$load_libs.doInvoke(core.clj:5413)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invoke(core.clj:619)
at clojure.core$require.doInvoke(core.clj:5496)
at clojure.lang.RestFn.invoke(RestFn.java:482)
at stream2es.stream.twitter$loading__4910__auto__.invoke(twitter.clj:1)
at stream2es.stream.twitter__init.load(Unknown Source)
at stream2es.stream.twitter__init.(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:249)
at clojure.lang.RT.loadClassForName(RT.java:2098)
at clojure.lang.RT.load(RT.java:430)
at clojure.lang.RT.load(RT.java:411)
at clojure.core$load$fn__5018.invoke(core.clj:5530)
at clojure.core$load.doInvoke(core.clj:5529)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invoke(core.clj:5336)
at clojure.core$load_lib$fn__4967.invoke(core.clj:5375)
at clojure.core$load_lib.doInvoke(core.clj:5374)
at clojure.lang.RestFn.applyTo(RestFn.java:142)
at clojure.core$apply.invoke(core.clj:619)
at clojure.core$load_libs.doInvoke(core.clj:5413)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invoke(core.clj:619)
at clojure.core$require.doInvoke(core.clj:5496)
at clojure.lang.RestFn.invoke(RestFn.java:436)
at stream2es.main$loading__4910__auto__.invoke(main.clj:1)
at stream2es.main__init.load(Unknown Source)
at stream2es.main__init.(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:249)
at clojure.lang.RT.loadClassForName(RT.java:2098)
at clojure.lang.RT.load(RT.java:430)
at clojure.lang.RT.load(RT.java:411)
at clojure.core$load$fn__5018.invoke(core.clj:5530)
at clojure.core$load.doInvoke(core.clj:5529)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.lang.Var.invoke(Var.java:415)
at stream2es.main.(Unknown Source)
Caused by: java.lang.ClassNotFoundException: java/nio/file/attribute/PosixFilePermission
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:171)
at stream2es.util.io$loading__4910__auto__.invoke(io.clj:1)
at stream2es.util.io__init.load(Unknown Source)
at stream2es.util.io__init.(Unknown Source)
... 73 more

@drewr
Copy link
Contributor

drewr commented Jun 21, 2013

While building a 1.6 version I realized I started using a class from java.nio.* that isn't compatible. Perhaps we simple need to document that we support 1.7+? I can't think of a reason anyone would be stuck with 1.6 for this application.

@timhaines
Copy link

I just tried downloading Java 1.7 from java.com in order to run this, and the installation failed for me.

@brwe
Copy link
Author

brwe commented Jun 21, 2013

@drewr I think a note in the documentation would suffice.

@s1monw
Copy link
Contributor

s1monw commented Jun 21, 2013

@timhaines what OS are you trying here? I mean google should take you far here, what's the error?

@timhaines
Copy link

@s1monw OSX Mountain Lion. Just got it resolved. For some reason I was missing a /Library/PreferencePanes folder, so the Java installer was dying because of that. After I created that folder, the installer worked. Then I had to manually update ~/.bash_login to change JAVA_HOME from the 1.6 location to 1.7. Ugh. I'm excited to get back into hammertime now it's resolved.

@s1monw
Copy link
Contributor

s1monw commented Jun 21, 2013

@drewr I mean this is just because you use the FilePermissions that are new in Java 7 can't we use File.setReadable(boolean, boolean) etc. if those classes are not available ie. detecte / fallback to java 6 and do best effort?

@s1monw
Copy link
Contributor

s1monw commented Jun 21, 2013

@timhaines cool stuff 👍

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

No branches or pull requests

4 participants