elastic / logstash

Logstash - transport and process your logs, events, or other data
https://www.elastic.co/products/logstash
Other
75 stars 3.5k forks source link

Kafka plugin is requiring Java8 and we still support java 7. #3756

Closed ph closed 9 years ago

ph commented 9 years ago
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 Bundler::InstallError, retrying 1/10
An error occurred while installing jruby-kafka (1.4.0), and Bundler cannot continue.
Show less

Does kafka plugin _require_ java 8?
% java -version
java version "1.7.0_75"
ph commented 9 years ago

We should pin jar-dependencies to a previous version

jordansissel commented 9 years ago

I observed this while doing rake bootstrap plugin:install-default with Java 7 on OSX

java version "1.7.0_75"
Java(TM) SE Runtime Environment (build 1.7.0_75-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.75-b04, mixed mode)
ph commented 9 years ago

This is strange, if you look at http://build-eu-1.elasticsearch.org/view/LS%20Master/job/Logstash_Master_Default_Plugins/lastBuild/console which install all the default plugins its not failing and its running on 1.7.

jruby 1.7.17 (1.9.3p392) 2014-12-09 fafd1a7 on OpenJDK 64-Bit Server VM 1.7.0_55-b14 +jit [linux-amd64]```
suyograo commented 9 years ago

Works for me on master, 1.5

WARNING:  See http://guides.rubygems.org/specification-reference/ for help
  Successfully built RubyGem
  Name: logstash-core
  Version: 2.0.0.dev
  File: logstash-core-2.0.0.dev-java.gem
[plugin:install-local-logstash-core-gem] Installing logstash-core-2.0.0.dev-java.gem
Installing logstash-core
Installation successful
[artifact:tar] building build/logstash-2.0.0.dev.tar.gz
Complete: build/logstash-2.0.0.dev.tar.gz

suyog@machine:~/ws/elastic/logstash (master)$ java -version
java version "1.7.0_60"
Java(TM) SE Runtime Environment (build 1.7.0_60-b19)
Java HotSpot(TM) 64-Bit Server VM (build 24.60-b09, mixed mode)
jordansissel commented 9 years ago

I HAVE NO IDEA COMPUTERS.

Let's keep an eye on this, but given that @suyog, jenkins, and @ph cannot reproduce this, I'm confident that it's not an issue. Further, should only affect plugin installation anyway, and only apparently on my OSX workstation (in Linux it works fine for me)

purbon commented 9 years ago

I tried this same in my dev machine, with java 7 and can not reproduce it.

/cheers

On Thu, Aug 20, 2015 at 1:39 AM Jordan Sissel notifications@github.com wrote:

I HAVE NO IDEA COMPUTERS.

Let's keep an eye on this, but given that @suyog https://github.com/suyog, jenkins, and @ph https://github.com/ph cannot reproduce this, I'm confident that it's not an issue. Further, should only affect plugin installation anyway, and only apparently on my OSX workstation (in Linux it works fine for me)

— Reply to this email directly or view it on GitHub https://github.com/elastic/logstash/issues/3756#issuecomment-132827017.

suyograo commented 9 years ago

Cannot reproduce