colinsurprenant/redstorm — Issue #7: (NameError) uninitialized constant Java::BacktypeStorm::Config::CONFIG
Author: stonegao
Created: 2011-12-12 13:06:45+00:00
State: open

Tried redstorm with other extra gems dependencies (Mongoid, Resque), I start topology using the following command:

```RACK_ENV=development redstorm local lib/redstorm-topology/event_topology.rb```

But it throw uninitialized constant Java::BacktypeStorm::Config::CONFIG error. Also I am using Mac OS X but the JRuby stack trace has some weird lines related with WIN32API:

launching java -cp "/Users/stone/code/redstorm-topology/target/classes:/Users/stone/code/redstorm-topology/target/dependency/*" redstorm.TopologyLauncher local lib/redstorm-topology/event_topology.rb
file:/Users/stone/code/redstorm-topology/target/dependency/jruby-complete-1.6.5.jar!/builtin/javasupport/core_ext/object.rb:99 warning: already initialized constant Config
RedStorm v0.2.1 starting topology EventTopology in local environment
1 [main] ERROR org.apache.zookeeper.server.NIOServerCnxn - Thread Thread[main,5,main] died
org.jruby.exceptions.RaiseException: (NameError) uninitialized constant Java::BacktypeStorm::Config::CONFIG
at org.jruby.RubyModule.const_missing(org/jruby/RubyModule.java:2590)
at #.(root)(file:/Users/stone/code/redstorm-topology/target/dependency/jruby-complete-1.6.5.jar!/META-INF/jruby.home/lib/ruby/site_ruby/shared/Win32API.rb:2)
at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1038)
at #.Dir(file:/Users/stone/code/redstorm-topology/target/dependency/jruby-complete-1.6.5.jar!/META-INF/jruby.home/lib/ruby/site_ruby/shared/Win32API.rb:14)
at #.(root)(file:/Users/stone/code/redstorm-topology/target/dependency/jruby-complete-1.6.5.jar!/META-INF/jruby.home/lib/ruby/1.8/tmpdir.rb:9)
at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1038)
at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1038)
at #.(root)(file:/Users/stone/code/redstorm-topology/target/dependency/jruby-complete-1.6.5.jar!/META-INF/jruby.home/lib/ruby/1.8/tmpdir.rb:5)
at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1038)
at #.(root)(/Users/stone/.rvm/gems/jruby-1.6.5/gems/rack-1.2.4/lib/rack/utils.rb:1)
at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1038)
at #.(root)(/Users/stone/.rvm/gems/jruby-1.6.5/gems/rack-1.2.4/lib/rack/request.rb:3)
at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1038)
at #.(root)(/Users/stone/.rvm/gems/jruby-1.6.5/gems/rack-1.2.4/lib/rack/showexceptions.rb:1)
at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1038)
at #.(root)(/Users/stone/.rvm/gems/jruby-1.6.5/gems/sinatra-1.2.7/lib/sinatra/showexceptions.rb:6)
at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1038)
at #.(root)(/Users/stone/.rvm/gems/jruby-1.6.5/gems/sinatra-1.2.7/lib/sinatra/base.rb:1)
at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1038)
at Bundler::Runtime.require(/Users/stone/.rvm/gems/jruby-1.6.5/gems/resque-1.19.0/lib/resque/server.rb:68)
at org.jruby.RubyArray.each(org/jruby/RubyArray.java:1612)
at Bundler::Runtime.require(/Users/stone/.rvm/gems/jruby-1.6.5/gems/bundler-1.0.21/lib/bundler/runtime.rb:66)
at org.jruby.RubyArray.each(org/jruby/RubyArray.java:1612)
at Bundler::Runtime.require(/Users/stone/.rvm/gems/jruby-1.6.5/gems/bundler-1.0.21/lib/bundler/runtime.rb:55)
at #.require(/Users/stone/.rvm/gems/jruby-1.6.5/gems/bundler-1.0.21/lib/bundler.rb:122)
at #.(root)(/Users/stone/code/redstorm-topology/lib/redstorm-topology/boot.rb:17)
at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1038)
at Kernel.require(/Users/stone/code/redstorm-topology/lib/redstorm-topology/boot.rb:55)
at #.(root)(./lib/redstorm-topology/event_topology.rb:4)
at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1038)
at Kernel.require(./lib/redstorm-topology/event_topology.rb:55)
at #.main(/Users/stone/.rvm/gems/jruby-1.6.5/gems/redstorm-0.2.1/lib/red_storm/topology_launcher.rb:42)

BTW: I think it's great if you can create a redstorm starter project to demonstrate the project source code layout, how to manage dependencies and how to using JRuby with Java together to develop storm topologies. (redstorm it's self is a great example, but another one which focus on the usage of redstorm is awesome).

Thanks for your help

Stone