null pointer exceiption in IO operation for Gherkin/Cucumber
------------------------------------------------------------

                 Key: JRUBY-5489
                 URL: http://jira.codehaus.org/browse/JRUBY-5489
             Project: JRuby
          Issue Type: Bug
          Components: Interpreter
    Affects Versions: JRuby 1.5.6
         Environment: ubuntu 10.10  with rvm 1.2.6
            Reporter: Jed Schneider


to replicate:
rvm with jruby 1.5.6
install rails on a new gemset
install bundler on a new gemset
create a new rails project
add cucumber-rails, jdbc-sqlite, rspec-rails, capybara to Gemfile
bundle install
rails g cucumber:install --capybara --rspec
run: cucumber features -f json

stacktrace:

java.lang.NullPointerException: null
Error creating formatter: json_pretty (NativeException)
java/io/Writer.java:88:in `<init>'
java/io/OutputStreamWriter.java:97:in `<init>'
gherkin/formatter/JSONFormatter.java:22:in `<init>'
sun/reflect/NativeConstructorAccessorImpl.java:-2:in `newInstance0'
sun/reflect/NativeConstructorAccessorImpl.java:57:in `newInstance'
sun/reflect/DelegatingConstructorAccessorImpl.java:45:in `newInstance'
java/lang/reflect/Constructor.java:532:in `newInstance'
org/jruby/javasupport/JavaConstructor.java:275:in `newInstanceDirect'
/home/garyjed/.rvm/gems/jruby-1.5.6@bmtest/gems/gherkin-2.3.3-java/lib/gherkin/native/java.rb:17:in
 `new_proxy'
/home/garyjed/.rvm/gems/jruby-1.5.6@bmtest/gems/gherkin-2.3.3-java/lib/gherkin/native/java.rb:30:in
 `new'
/var/rvm/garyjed/gems/jruby-1.5.6@bmtest/gems/cucumber-0.10.0/bin/../lib/cucumber/formatter/json.rb:15:in
 `initialize'
/var/rvm/garyjed/gems/jruby-1.5.6@bmtest/gems/cucumber-0.10.0/bin/../lib/cucumber/cli/configuration.rb:168:in
 `new'
/var/rvm/garyjed/gems/jruby-1.5.6@bmtest/gems/cucumber-0.10.0/bin/../lib/cucumber/cli/configuration.rb:168:in
 `formatters'
/var/rvm/garyjed/gems/jruby-1.5.6@bmtest/gems/cucumber-0.10.0/bin/../lib/cucumber/cli/configuration.rb:163:in
 `map'
/var/rvm/garyjed/gems/jruby-1.5.6@bmtest/gems/cucumber-0.10.0/bin/../lib/cucumber/cli/configuration.rb:163:in
 `formatters'
/var/rvm/garyjed/gems/jruby-1.5.6@bmtest/gems/cucumber-0.10.0/bin/../lib/cucumber/cli/configuration.rb:68:in
 `build_tree_walker'
/var/rvm/garyjed/gems/jruby-1.5.6@bmtest/gems/cucumber-0.10.0/bin/../lib/cucumber/runtime.rb:42:in
 `run!'
/var/rvm/garyjed/gems/jruby-1.5.6@bmtest/gems/cucumber-0.10.0/bin/../lib/cucumber/cli/main.rb:43:in
 `execute!'
/var/rvm/garyjed/gems/jruby-1.5.6@bmtest/gems/cucumber-0.10.0/bin/../lib/cucumber/cli/main.rb:20:in
 `execute'
/var/rvm/garyjed/gems/jruby-1.5.6@bmtest/gems/cucumber-0.10.0/bin/cucumber:14
/var/rvm/garyjed/gems/jruby-1.5.6@bmtest/gems/cucumber-0.10.0/bin/cucumber:19:in
 `load'
/home/garyjed/.rvm/gems/jruby-1.5.6@bmtest/bin/cucumber:19

rvm info:
jruby-1.5.6:

  system:
    uname:       "Linux garyjed-E6610 2.6.35-25-generic #44-Ubuntu SMP Fri Jan 
21 17:40:48 UTC 2011 i686 GNU/Linux"
    bash:        "/bin/bash => GNU bash, version 4.1.5(1)-release 
(i686-pc-linux-gnu)"
    zsh:         " => not installed"

  rvm:
    version:      "rvm 1.2.6 by Wayne E. Seguin (wayneeseg...@gmail.com) 
[http://rvm.beginrescueend.com/]";

  ruby:
    interpreter:  "jruby"
    version:      "1.5.6"
    date:         "2010-12-03"
    platform:     "i386-java"
    patchlevel:   "OpenJDK Server VM 1.6.0_20"
    full_version: "jruby 1.5.6 (ruby 1.8.7 patchlevel 249) (2010-12-03 9cf97c3) 
(OpenJDK Server VM 1.6.0_20) [i386-java]"

  homes:
    gem:          "/home/garyjed/.rvm/gems/jruby-1.5.6"
    ruby:         "/home/garyjed/.rvm/rubies/jruby-1.5.6"

  binaries:
    ruby:         "/home/garyjed/.rvm/rubies/jruby-1.5.6/bin/ruby"
    irb:          "/home/garyjed/.rvm/rubies/jruby-1.5.6/bin/irb"
    gem:          "/home/garyjed/.rvm/rubies/jruby-1.5.6/bin/gem"
    rake:         "/home/garyjed/.rvm/gems/jruby-1.5.6/bin/rake"

  environment:
    PATH:         
"/home/garyjed/.rvm/gems/jruby-1.5.6/bin:/home/garyjed/.rvm/gems/jruby-1.5.6@global/bin:/home/garyjed/.rvm/rubies/jruby-1.5.6/bin:/home/garyjed/.rvm/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
    GEM_HOME:     "/home/garyjed/.rvm/gems/jruby-1.5.6"
    GEM_PATH:     
"/home/garyjed/.rvm/gems/jruby-1.5.6:/home/garyjed/.rvm/gems/jruby-1.5.6@global"
    MY_RUBY_HOME: "/home/garyjed/.rvm/rubies/jruby-1.5.6"
    IRBRC:        "/home/garyjed/.rvm/rubies/jruby-1.5.6/.irbrc"
    RUBYOPT:      ""
    gemset:       ""



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to