Coder Social home page Coder Social logo

Comments (7)

joekiller avatar joekiller commented on August 18, 2024

Are you using the latest gemfile?
On May 10, 2015 6:11 AM, "alexphys" [email protected] wrote:

Hi , I have the following error after I have a successful bundle and try
to execute my app

NameError: cannot load Java class kafka.consumer.ConsumerIterator
for_name at org/jruby/javasupport/JavaClass.java:1286
get_proxy_class at org/jruby/javasupport/JavaUtilities.java:34
java_import at
file:/home/user/.rvm/rubies/jruby-1.7.19/lib/jruby.jar!/jruby/java/core_ext/object.rb:27
map at org/jruby/RubyArray.java:2412
java_import at
file:/home/user/.rvm/rubies/jruby-1.7.19/lib/jruby.jar!/jruby/java/core_ext/object.rb:22
Consumer at
/home/user/.rvm/gems/jruby-1.7.19/gems/jruby-kafka-1.4.0-java/lib/jruby-kafka/consumer.rb:6
(root) at
/home/user/.rvm/gems/jruby-1.7.19/gems/jruby-kafka-1.4.0-java/lib/jruby-kafka/consumer.rb:5
require at org/jruby/RubyKernel.java:1071
require at
/home/user/.rvm/rubies/jruby-1.7.19/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:69
(root) at
/home/user/.rvm/gems/jruby-1.7.19/gems/jruby-kafka-1.4.0-java/lib/jruby-kafka.rb:1
require at org/jruby/RubyKernel.java:1071
require at
/home/user/.rvm/rubies/jruby-1.7.19/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:128
require at
/home/user/.rvm/rubies/jruby-1.7.19/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:121
(root) at app.rb:4

Any suggestions?


Reply to this email directly or view it on GitHub
#28.

from jruby-kafka.

alexphys avatar alexphys commented on August 18, 2024

Sorry for the late responce.
In the end it wasn't gem's problem but the way I had jruby installed through rvm.
I went on and uninstalled it and reinstalled jruby specifying the ruby api

rvm install jruby --1.9

and when I bundle installed the gem again it fetched the jars as it should.

from jruby-kafka.

daluu avatar daluu commented on August 18, 2024

I got similar error:

NameError: cannot load Java class kafka.consumer.ConsumerIterator
for_name at org/jruby/javasupport/JavaClass.java:1286
get_proxy_class at org/jruby/javasupport/JavaUtilities.java:34
java_import at file:/Users/daluu/.rvm/rubies/jruby-1.7.19/lib/jruby.jar!/jruby/java/core_ext/object.rb:27
map at org/jruby/RubyArray.java:2412
java_import at file:/Users/daluu/.rvm/rubies/jruby-1.7.19/lib/jruby.jar!/jruby/java/core_ext/object.rb:22
(root) at /Users/daluu/.rvm/gems/jruby-1.7.19/gems/jruby-kafka-0.1.0/lib/jruby-kafka/consumer.rb:4
require at org/jruby/RubyKernel.java:1071
(root) at /Users/daluu/.rvm/rubies/jruby-1.7.19/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:1
require at /Users/daluu/.rvm/rubies/jruby-1.7.19/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:54
require at org/jruby/RubyKernel.java:1071
(root) at /Users/daluu/.rvm/gems/jruby-1.7.19/gems/jruby-kafka-0.1.0/lib/jruby-kafka.rb:1
(root) at kafka_readj.rb:1

Is there a certain sequence of steps involved?

I didn't build from source per Github readme, but just only added the gem in Gemfile for using the RubyGem version, is that not latest or I need to force latest version? It's installed in list of gems

I had jruby installed originally with "rvm install jruby" then I uninstalled with "rvm uninstall jruby" and reinstalled with suggestion here. Still have issue.

I'm connecting to an existing Kafka server remotely (not localhost installation). Do I still need some Java JARs or setting path?

I have Kafka installed locally via brew . Have a bunch of shell scripts under /usr/local/bin. But I don't know where any matching JARs and path are.

Do I need to set path to anything under

/usr/local/Cellar/kafka/0.8.2.1/libexec/bin
/usr/local/Cellar/kafka/0.8.2.1/libexec/clients

from jruby-kafka.

joekiller avatar joekiller commented on August 18, 2024

If you are using rvm do a rvm list and make sure jruby is being used.
Try rvm use jruby and then gem install jruby-kafka
On Jun 15, 2015 5:56 PM, "David Luu" [email protected] wrote:

I got similar error:

NameError: cannot load Java class kafka.consumer.ConsumerIterator
for_name at org/jruby/javasupport/JavaClass.java:1286
get_proxy_class at org/jruby/javasupport/JavaUtilities.java:34
java_import at
file:/Users/daluu/.rvm/rubies/jruby-1.7.19/lib/jruby.jar!/jruby/java/core_ext/object.rb:27
map at org/jruby/RubyArray.java:2412
java_import at
file:/Users/daluu/.rvm/rubies/jruby-1.7.19/lib/jruby.jar!/jruby/java/core_ext/object.rb:22
(root) at
/Users/daluu/.rvm/gems/jruby-1.7.19/gems/jruby-kafka-0.1.0/lib/jruby-kafka/consumer.rb:4
require at org/jruby/RubyKernel.java:1071
(root) at
/Users/daluu/.rvm/rubies/jruby-1.7.19/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:1
require at
/Users/daluu/.rvm/rubies/jruby-1.7.19/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:54
require at org/jruby/RubyKernel.java:1071
(root) at
/Users/daluu/.rvm/gems/jruby-1.7.19/gems/jruby-kafka-0.1.0/lib/jruby-kafka.rb:1
(root) at kafka_readj.rb:1

Is there a certain sequence of steps involved?

I didn't build from source per Github readme, but just only added the gem
in Gemfile for using the RubyGem version, is that not latest or I need to
force latest version? It's installed in list of gems

I had jruby installed originally with "rvm install jruby" then I
uninstalled with "rvm uninstall jruby" and reinstalled with suggestion
here. Still have issue.

I'm connecting to an existing Kafka server remotely (not localhost
installation). Do I still need some Java JARs or setting path?

I have Kafka installed locally via brew . Have a bunch of shell scripts
under /usr/local/bin. But I don't know where any matching JARs and path are.

Do I need to set path to anything under

/usr/local/Cellar/kafka/0.8.2.1/libexec/bin
/usr/local/Cellar/kafka/0.8.2.1/libexec/clients


Reply to this email directly or view it on GitHub
#28 (comment)
.

from jruby-kafka.

joekiller avatar joekiller commented on August 18, 2024

Looks like you are using jruby-kakfa 0.1.0 which is quite old. Install the latest instead.

from jruby-kafka.

daluu avatar daluu commented on August 18, 2024

Can I install latest via rubygems.org or need to build from source? The default install doesn't give you the latest? What's the latest version?

from jruby-kafka.

joekiller avatar joekiller commented on August 18, 2024

Try version 1.4.0. I'm not sure why it does 0.1.0

On Tue, Jun 16, 2015 at 12:10 AM, David Luu [email protected]
wrote:

Can I install latest via rubygems.org or need to build from source? The
default install doesn't give you the latest? What's the latest version?


Reply to this email directly or view it on GitHub
#28 (comment)
.

from jruby-kafka.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.