Closed jakubzak88 closed 8 years ago
I too am facing this error :/
Execute this and send me print out:
/usr/libexec/java_home
/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
First of all you need to install latest jdk.
http://www.oracle.com/technetwork/java/javase/downloads/index.html
Then set your env variable to:
export JAVA_HOME = "/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home"
Then when you run:
java -version
You should see something like this:
java version "1.8.0_51" Java(TM) SE Runtime Environment (build 1.8.0_51-b16) Java HotSpot(TM) 64-Bit Server VM (build 25.51-b03, mixed mode)
If all this is set give it a go again and let me know if it helped.
Also I would recommend to take a look at these, also very helpful Kafka gems:
https://github.com/bpot/poseidon https://github.com/mthssdrbrg/heller
And for best support of all functionality I would personally go with JS node module:
https://github.com/SOHU-Co/kafka-node
Node module provided best error handling, speed and covers most of the Kafka features.
Hey thanks @Jukeboxino your solution is spot on :)
Happy to help ;)
@Jukeboxino is spot on. Use java 8
jruby-kafka git:(master) ✗ gem install jruby-kafka -v '1.4.0' jar dependencies for jruby-kafka-1.4.0-java.gemspec . . . Exception in thread "main" java.lang.UnsupportedClassVersionError: org/apache/maven/cli/MavenCli : 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 org.codehaus.plexus.classworlds.realm.ClassRealm.loadClassFromSelf(ClassRealm.java:401) at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:42) at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271) at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:254) at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239) at org.codehaus.plexus.classworlds.launcher.Launcher.getMainClass(Launcher.java:144) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:266) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356) ERROR: While executing gem ... (Errno::ENOENT) No such file or directory - /Users/jza01/.rvm/gems/jruby-1.7.19/gems/jruby-kafka-1.4.0-java/deps.lst