Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: JRuby 1.6RC3
-
Fix Version/s: JRuby 1.6.2
-
Component/s: Standard Library
-
Labels:None
-
Environment:Mac OS X 10.6
-
Number of attachments :0
Description
jruby -v
jruby 1.6.0.RC3 (ruby 1.8.7 patchlevel 330) (2011-03-11 a8e5382) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_22) [darwin-x86_64-java]
rvm -v
rvm 1.2.8 by Wayne E. Seguin (wayneeseguin@gmail.com) http://rvm.beginrescueend.com/
gem install -r gnuplot -v 2.3.5
Successfully installed gnuplot-2.3.5
1 gem installed
gem install -r gnuplot -v 2.3.6
System.java:-2:in `arraycopy': java.lang.ArrayIndexOutOfBoundsException
from DefaultResolver.java:111:in `makeTime'
from DefaultResolver.java:277:in `create'
from DefaultResolver.java:317:in `handleScalar'
from DefaultResolver.java:435:in `orgHandler'
from DefaultResolver.java:455:in `node_import'
from DefaultResolver$s$1$0$node_import.gen:65535:in `call'
from CachingCallSite.java:137:in `call'
from RubyLoadHandler.java:40:in `handle'
from Parser.java:300:in `addNode'
from DefaultYAMLParser.java:676:in `yyparse'
from Parser.java:290:in `yechtparse'
from Parser.java:284:in `parse'
from YParser.java:152:in `load'
from YParser$s$0$1$load.gen:65535:in `call'
from JavaMethod.java:630:in `call'
from DynamicMethod.java:205:in `call'
from CachingCallSite.java:282:in `cacheAndCall'
from CachingCallSite.java:139:in `call'
from CallOneArgNode.java:57:in `interpret'
from LocalAsgnNode.java:123:in `interpret'
from NewlineNode.java:103:in `interpret'
from ASTInterpreter.java:74:in `INTERPRET_METHOD'
from InterpretedMethod.java:190:in `call'
from DefaultMethod.java:179:in `call'
from CachingCallSite.java:282:in `cacheAndCall'
from CachingCallSite.java:139:in `call'
from CallOneArgNode.java:57:in `interpret'
from LocalAsgnNode.java:123:in `interpret'
from NewlineNode.java:103:in `interpret'
from BlockNode.java:71:in `interpret'
from ASTInterpreter.java:74:in `INTERPRET_METHOD'
from InterpretedMethod.java:190:in `call'
from DefaultMethod.java:179:in `call'
from CachingCallSite.java:282:in `cacheAndCall'
from CachingCallSite.java:139:in `call'
from CallOneArgNode.java:57:in `interpret'
from NewlineNode.java:103:in `interpret'
from RescueNode.java:216:in `executeBody'
from RescueNode.java:120:in `interpretWithJavaExceptions'
from RescueNode.java:110:in `interpret'
from ASTInterpreter.java:74:in `INTERPRET_METHOD'
from InterpretedMethod.java:190:in `call'
from DefaultMethod.java:179:in `call'
from CachingCallSite.java:282:in `cacheAndCall'
from CachingCallSite.java:139:in `call'
from FCallOneArgNode.java:36:in `interpret'
from InstAsgnNode.java:95:in `interpret'
from NewlineNode.java:103:in `interpret'
from BlockNode.java:71:in `interpret'
from EnsureNode.java:96:in `interpret'
from BeginNode.java:83:in `interpret'
from NewlineNode.java:103:in `interpret'
from WhenOneArgNode.java:36:in `whenSlowTest'
from WhenOneArgNode.java:46:in `when'
from CaseNode.java:133:in `interpret'
from NewlineNode.java:103:in `interpret'
from ASTInterpreter.java:111:in `INTERPRET_BLOCK'
from InterpretedBlock.java:374:in `evalBlockBody'
from InterpretedBlock.java:347:in `yield'
from InterpretedBlock.java:304:in `yield'
from Block.java:130:in `yield'
from YieldNode.java:112:in `interpret'
from NewlineNode.java:103:in `interpret'
from BlockNode.java:71:in `interpret'
from ASTInterpreter.java:111:in `INTERPRET_BLOCK'
from InterpretedBlock.java:374:in `evalBlockBody'
from InterpretedBlock.java:295:in `yield'
from InterpretedBlock.java:229:in `yieldSpecific'
from Block.java:99:in `yieldSpecific'
from RubyKernel.java:1417:in `loop'
from RubyKernel$s$0$0$loop.gen:65535:in `call'
from CachingCallSite.java:272:in `cacheAndCall'
from CachingCallSite.java:114:in `callBlock'
from CachingCallSite.java:123:in `callIter'
from FCallNoArgBlockNode.java:32:in `interpret'
from NewlineNode.java:103:in `interpret'
from ASTInterpreter.java:74:in `INTERPRET_METHOD'
from InterpretedMethod.java:169:in `call'
from DefaultMethod.java:171:in `call'
from CachingCallSite.java:272:in `cacheAndCall'
from CachingCallSite.java:114:in `callBlock'
from CachingCallSite.java:123:in `callIter'
from CallNoArgBlockNode.java:64:in `interpret'
from NewlineNode.java:103:in `interpret'
from BlockNode.java:71:in `interpret'
from ASTInterpreter.java:74:in `INTERPRET_METHOD'
from InterpretedMethod.java:255:in `call'
from DefaultMethod.java:203:in `call'
from CachingCallSite.java:312:in `cacheAndCall'
from CachingCallSite.java:182:in `callBlock'
from CachingCallSite.java:186:in `call'
from RubyClass.java:806:in `newInstance'
from RubyClass$i$newInstance.gen:65535:in `call'
from JavaMethod.java:283:in `call'
from WrapperMethod.java:62:in `call'
from CachingCallSite.java:302:in `cacheAndCall'
from CachingCallSite.java:173:in `call'
from FCallTwoArgNode.java:38:in `interpret'
from LocalAsgnNode.java:123:in `interpret'
from NewlineNode.java:103:in `interpret'
from BlockNode.java:71:in `interpret'
from EnsureNode.java:96:in `interpret'
from ASTInterpreter.java:74:in `INTERPRET_METHOD'
from InterpretedMethod.java:255:in `call'
from DefaultMethod.java:203:in `call'
from CachingCallSite.java:312:in `cacheAndCall'
from CachingCallSite.java:182:in `callBlock'
from CachingCallSite.java:186:in `call'
from CallTwoArgBlockPassNode.java:62:in `interpret'
from NewlineNode.java:103:in `interpret'
from BlockNode.java:71:in `interpret'
from ASTInterpreter.java:74:in `INTERPRET_METHOD'
from InterpretedMethod.java:298:in `call'
from DefaultMethod.java:219:in `call'
from CachingCallSite.java:332:in `cacheAndCall'
from CachingCallSite.java:216:in `callBlock'
from CachingCallSite.java:225:in `callIter'
from CallThreeArgBlockNode.java:64:in `interpret'
from NewlineNode.java:103:in `interpret'
from BlockNode.java:71:in `interpret'
from ASTInterpreter.java:74:in `INTERPRET_METHOD'
from InterpretedMethod.java:276:in `call'
from DefaultMethod.java:211:in `call'
from CachingCallSite.java:322:in `cacheAndCall'
from CachingCallSite.java:207:in `call'
from FCallThreeArgNode.java:40:in `interpret'
from NewlineNode.java:103:in `interpret'
from ASTInterpreter.java:111:in `INTERPRET_BLOCK'
from InterpretedBlock.java:374:in `evalBlockBody'
from InterpretedBlock.java:347:in `yield'
from InterpretedBlock.java:304:in `yield'
from Block.java:130:in `yield'
from RubyIO.java:1120:in `open'
from RubyKernel.java:298:in `open'
from RubyKernel$s$0$2$open.gen:65535:in `call'
from DynamicMethod.java:217:in `call'
from CachingCallSite.java:312:in `cacheAndCall'
from CachingCallSite.java:182:in `callBlock'
from CachingCallSite.java:191:in `callIter'
from FCallTwoArgBlockNode.java:34:in `interpret'
from NewlineNode.java:103:in `interpret'
from RescueNode.java:216:in `executeBody'
from RescueNode.java:120:in `interpretWithJavaExceptions'
from RescueNode.java:110:in `interpret'
from BeginNode.java:83:in `interpret'
from NewlineNode.java:103:in `interpret'
from IfNode.java:119:in `interpret'
from IfNode.java:119:in `interpret'
from NewlineNode.java:103:in `interpret'
from BlockNode.java:71:in `interpret'
from ASTInterpreter.java:74:in `INTERPRET_METHOD'
from InterpretedMethod.java:233:in `call'
from DefaultMethod.java:195:in `call'
from CachingCallSite.java:302:in `cacheAndCall'
from CachingCallSite.java:173:in `call'
from CallTwoArgNode.java:59:in `interpret'
from InstAsgnNode.java:95:in `interpret'
from NewlineNode.java:103:in `interpret'
from RescueNode.java:216:in `executeBody'
from RescueNode.java:120:in `interpretWithJavaExceptions'
from RescueNode.java:110:in `interpret'
from BeginNode.java:83:in `interpret'
from NewlineNode.java:103:in `interpret'
from ASTInterpreter.java:74:in `INTERPRET_METHOD'
from InterpretedMethod.java:147:in `call'
from DefaultMethod.java:163:in `call'
from CachingCallSite.java:262:in `cacheAndCall'
from CachingCallSite.java:105:in `call'
from VCallNode.java:85:in `interpret'
from NewlineNode.java:103:in `interpret'
from BlockNode.java:71:in `interpret'
from ASTInterpreter.java:74:in `INTERPRET_METHOD'
from InterpretedMethod.java:255:in `call'
from DefaultMethod.java:203:in `call'
from CachingCallSite.java:312:in `cacheAndCall'
from CachingCallSite.java:182:in `callBlock'
from CachingCallSite.java:186:in `call'
from RubyClass.java:806:in `newInstance'
from RubyClass$i$newInstance.gen:65535:in `call'
from JavaMethod.java:283:in `call'
from CachingCallSite.java:302:in `cacheAndCall'
from CachingCallSite.java:173:in `call'
from CallTwoArgNode.java:59:in `interpret'
from DAsgnNode.java:110:in `interpret'
from NewlineNode.java:103:in `interpret'
from BlockNode.java:71:in `interpret'
from ASTInterpreter.java:111:in `INTERPRET_BLOCK'
from InterpretedBlock.java:374:in `evalBlockBody'
from InterpretedBlock.java:347:in `yield'
from InterpretedBlock.java:304:in `yield'
from Block.java:130:in `yield'
from RubyArray.java:1565:in `eachCommon'
from RubyArray.java:1572:in `each'
from RubyArray$i$0$0$each.gen:65535:in `call'
from CachingCallSite.java:272:in `cacheAndCall'
from CachingCallSite.java:114:in `callBlock'
from CachingCallSite.java:123:in `callIter'
from CallNoArgBlockNode.java:64:in `interpret'
from NewlineNode.java:103:in `interpret'
from BlockNode.java:71:in `interpret'
from ASTInterpreter.java:74:in `INTERPRET_METHOD'
from InterpretedMethod.java:233:in `call'
from DefaultMethod.java:195:in `call'
from CachingCallSite.java:302:in `cacheAndCall'
from CachingCallSite.java:173:in `call'
from CallTwoArgNode.java:59:in `interpret'
from NewlineNode.java:103:in `interpret'
from BlockNode.java:71:in `interpret'
from RescueNode.java:216:in `executeBody'
from RescueNode.java:120:in `interpretWithJavaExceptions'
from RescueNode.java:110:in `interpret'
from BeginNode.java:83:in `interpret'
from NewlineNode.java:103:in `interpret'
from ASTInterpreter.java:111:in `INTERPRET_BLOCK'
from InterpretedBlock.java:374:in `evalBlockBody'
from InterpretedBlock.java:347:in `yield'
from InterpretedBlock.java:304:in `yield'
from Block.java:130:in `yield'
from RubyArray.java:1565:in `eachCommon'
from RubyArray.java:1572:in `each'
from RubyArray$i$0$0$each.gen:65535:in `call'
from CachingCallSite.java:272:in `cacheAndCall'
from CachingCallSite.java:114:in `callBlock'
from CachingCallSite.java:123:in `callIter'
from CallNoArgBlockNode.java:64:in `interpret'
from NewlineNode.java:103:in `interpret'
from BlockNode.java:71:in `interpret'
from ASTInterpreter.java:74:in `INTERPRET_METHOD'
from InterpretedMethod.java:147:in `call'
from DefaultMethod.java:163:in `call'
from CachingCallSite.java:262:in `cacheAndCall'
from CachingCallSite.java:105:in `call'
from VCallNode.java:85:in `interpret'
from NewlineNode.java:103:in `interpret'
from IfNode.java:119:in `interpret'
from IfNode.java:119:in `interpret'
from NewlineNode.java:103:in `interpret'
from BlockNode.java:71:in `interpret'
from ASTInterpreter.java:74:in `INTERPRET_METHOD'
from InterpretedMethod.java:120:in `call'
from InterpretedMethod.java:134:in `call'
from DefaultMethod.java:154:in `call'
from CachingCallSite.java:252:in `cacheAndCall'
from CachingCallSite.java:71:in `call'
from CallSpecialArgNode.java:73:in `interpret'
from NewlineNode.java:103:in `interpret'
from BlockNode.java:71:in `interpret'
from CaseNode.java:138:in `interpret'
from NewlineNode.java:103:in `interpret'
from BlockNode.java:71:in `interpret'
from ASTInterpreter.java:74:in `INTERPRET_METHOD'
from InterpretedMethod.java:190:in `call'
from DefaultMethod.java:179:in `call'
from CachingCallSite.java:282:in `cacheAndCall'
from CachingCallSite.java:139:in `call'
from FCallOneArgNode.java:36:in `interpret'
from NewlineNode.java:103:in `interpret'
from RescueNode.java:216:in `executeBody'
from RescueNode.java:120:in `interpretWithJavaExceptions'
from RescueNode.java:110:in `interpret'
from ASTInterpreter.java:74:in `INTERPRET_METHOD'
from InterpretedMethod.java:190:in `call'
from DefaultMethod.java:179:in `call'
from CachingCallSite.java:282:in `cacheAndCall'
from CachingCallSite.java:139:in `call'
from CallOneArgNode.java:57:in `interpret'
from NewlineNode.java:103:in `interpret'
from BlockNode.java:71:in `interpret'
from ASTInterpreter.java:74:in `INTERPRET_METHOD'
from InterpretedMethod.java:190:in `call'
from DefaultMethod.java:179:in `call'
from CachingCallSite.java:282:in `cacheAndCall'
from CachingCallSite.java:139:in `call'
from /Users/hg/.rvm/rubies/jruby-head/bin/gem:25:in `chained_0_rescue_1$RUBY$SYNTHETIC_file_'
from /Users/hg/.rvm/rubies/jruby-head/bin/gem:24:in `_file_'
from /Users/hg/.rvm/rubies/jruby-head/bin/gem:-1:in `load'
from Ruby.java:670:in `runScript'
from Ruby.java:574:in `runNormally'
from Ruby.java:423:in `runFromMain'
from Main.java:278:in `doRunFromMain'
from Main.java:198:in `internalRun'
from Main.java:164:in `run'
from Main.java:148:in `run'
from Main.java:128:in `main'
Issue Links
- is duplicated by
-
JRUBY-5652
ArrayIndexOutOfBoundsException when installing aws gem
-
Activity
I am unable to reproduce against master. Can you try this again with current master or 1.6 final?
Also, if you add -X+C flag to JRuby we could see where this is happening. It's definitely during YAML parsing, but I don't know what YAML...
jruby -X+C -S gem install ...
jruby -v
jruby 1.6.0.RC3 (ruby 1.8.7 patchlevel 330) (2011-03-13 74b7a65) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_22) [darwin-x86_64-java]
jruby -X+C -S gem install -r gnuplot
System.java:-2:in `arraycopy': java.lang.ArrayIndexOutOfBoundsException
from DefaultResolver.java:111:in `makeTime'
from DefaultResolver.java:277:in `create'
from DefaultResolver.java:317:in `handleScalar'
from DefaultResolver.java:435:in `orgHandler'
from DefaultResolver.java:455:in `node_import'
from DefaultResolver$s$1$0$node_import.gen:65535:in `call'
from CachingCallSite.java:137:in `call'
from RubyLoadHandler.java:40:in `handle'
from Parser.java:300:in `addNode'
from DefaultYAMLParser.java:676:in `yyparse'
from Parser.java:290:in `yechtparse'
from Parser.java:284:in `parse'
from YParser.java:152:in `load'
from YParser$s$0$1$load.gen:65535:in `call'
from JavaMethod.java:630:in `call'
from DynamicMethod.java:205:in `call'
from CachingCallSite.java:137:in `call'
from /Users/hg/.rvm/rubies/jruby-head/lib/ruby/1.8/yaml.rb:134:in `method__6$RUBY$load'
from Users$hg$$dot_rvm$rubies$jruby_minus_head$lib$ruby$$1_dot_8$yaml#method_6$RUBY$load:65535:in `call'
from Users$hg$$dot_rvm$rubies$jruby_minus_head$lib$ruby$$1_dot_8$yaml#method_6$RUBY$load:65535:in `call'
from CachingCallSite.java:282:in `cacheAndCall'
from CachingCallSite.java:139:in `call'
from /Users/hg/.rvm/rubies/jruby-head/lib/ruby/site_ruby/1.8/rubygems/specification.rb:480:in `method__27$RUBY$from_yaml'
from Users$hg$$dot_rvm$rubies$jruby_minus_head$lib$ruby$site_ruby$$1_dot_8$rubygems$specification#method_27$RUBY$from_yaml:65535:in `call'
from Users$hg$$dot_rvm$rubies$jruby_minus_head$lib$ruby$site_ruby$$1_dot_8$rubygems$specification#method_27$RUBY$from_yaml:65535:in `call'
from CachingCallSite.java:282:in `cacheAndCall'
from CachingCallSite.java:139:in `call'
from /Users/hg/.rvm/rubies/jruby-head/lib/ruby/site_ruby/1.8/rubygems/package/tar_input.rb:190:in `method__14$RUBY$load_gemspec'
from Users$hg$$dot_rvm$rubies$jruby_minus_head$lib$ruby$site_ruby$$1_dot_8$rubygems$package$tar_input#method_14$RUBY$load_gemspec:65535:in `call'
from Users$hg$$dot_rvm$rubies$jruby_minus_head$lib$ruby$site_ruby$$1_dot_8$rubygems$package$tar_input#method_14$RUBY$load_gemspec:65535:in `call'
from CachingCallSite.java:282:in `cacheAndCall'
from CachingCallSite.java:139:in `call'
from /Users/hg/.rvm/rubies/jruby-head/lib/ruby/site_ruby/1.8/rubygems/package/tar_input.rb:54:in `chained_4_ensure_2$RUBY$_ensure_'
from /Users/hg/.rvm/rubies/jruby-head/lib/ruby/site_ruby/1.8/rubygems/package/tar_input.rb:41:in `block_0$RUBY$initialize'
from Users$hg$$_dot_rvm$rubies$jruby_minus_head$lib$ruby$site_ruby$$1_dot_8$rubygems$package$tar_input#block_0$RUBY$initialize:65535:in `call'
from CompiledBlock.java:112:in `yield'
from CompiledBlock.java:95:in `yield'
from Block.java:130:in `yield'
from /Users/hg/.rvm/rubies/jruby-head/lib/ruby/site_ruby/1.8/rubygems/package/tar_reader.rb:64:in `block_0$RUBY$each'
from Users$hg$$_dot_rvm$rubies$jruby_minus_head$lib$ruby$site_ruby$$1_dot_8$rubygems$package$tar_reader#block_0$RUBY$each:65535:in `call'
from CompiledBlock.java:112:in `yield'
from CompiledBlock.java:95:in `yield'
from CompiledBlock.java:75:in `yieldSpecific'
from Block.java:99:in `yieldSpecific'
from RubyKernel.java:1417:in `loop'
from RubyKernel$s$0$0$loop.gen:65535:in `call'
from CachingCallSite.java:272:in `cacheAndCall'
from CachingCallSite.java:114:in `callBlock'
from CachingCallSite.java:123:in `callIter'
from /Users/hg/.rvm/rubies/jruby-head/lib/ruby/site_ruby/1.8/rubygems/package/tar_reader.rb:55:in `method__6$RUBY$each'
from Users$hg$$dot_rvm$rubies$jruby_minus_head$lib$ruby$site_ruby$$1_dot_8$rubygems$package$tar_reader#method_6$RUBY$each:65535:in `call'
from CachingCallSite.java:272:in `cacheAndCall'
from CachingCallSite.java:114:in `callBlock'
from CachingCallSite.java:123:in `callIter'
from /Users/hg/.rvm/rubies/jruby-head/lib/ruby/site_ruby/1.8/rubygems/package/tar_input.rb:35:in `method__3$RUBY$initialize'
from Users$hg$$dot_rvm$rubies$jruby_minus_head$lib$ruby$site_ruby$$1_dot_8$rubygems$package$tar_input#method_3$RUBY$initialize:65535:in `call'
from DynamicMethod.java:217:in `call'
from CachingCallSite.java:312:in `cacheAndCall'
from CachingCallSite.java:182:in `callBlock'
from CachingCallSite.java:186:in `call'
from RubyClass.java:806:in `newInstance'
from RubyClass$i$newInstance.gen:65535:in `call'
from JavaMethod.java:283:in `call'
from WrapperMethod.java:62:in `call'
from CachingCallSite.java:302:in `cacheAndCall'
from CachingCallSite.java:173:in `call'
from /Users/hg/.rvm/rubies/jruby-head/lib/ruby/site_ruby/1.8/rubygems/package/tar_input.rb:20:in `chained_2_ensure_1$RUBY$_ensure_'
from /Users/hg/.rvm/rubies/jruby-head/lib/ruby/site_ruby/1.8/rubygems/package/tar_input.rb:-1:in `method__1$RUBY$open'
from Users$hg$$dot_rvm$rubies$jruby_minus_head$lib$ruby$site_ruby$$1_dot_8$rubygems$package$tar_input#method_1$RUBY$open:65535:in `call'
from DynamicMethod.java:217:in `call'
from CachingCallSite.java:312:in `cacheAndCall'
from CachingCallSite.java:182:in `callBlock'
from CachingCallSite.java:186:in `call'
from /Users/hg/.rvm/rubies/jruby-head/lib/ruby/site_ruby/1.8/rubygems/package.rb:68:in `method__12$RUBY$open'
from Users$hg$$dot_rvm$rubies$jruby_minus_head$lib$ruby$site_ruby$$1_dot_8$rubygems$package#method_12$RUBY$open:65535:in `call'
from DynamicMethod.java:225:in `call'
from CachingCallSite.java:332:in `cacheAndCall'
from CachingCallSite.java:216:in `callBlock'
from CachingCallSite.java:225:in `callIter'
from /Users/hg/.rvm/rubies/jruby-head/lib/ruby/site_ruby/1.8/rubygems/format.rb:62:in `method__5$RUBY$from_io'
from Users$hg$$dot_rvm$rubies$jruby_minus_head$lib$ruby$site_ruby$$1_dot_8$rubygems$format#method_5$RUBY$from_io:65535:in `call'
from DynamicMethod.java:225:in `call'
from CompiledMethod.java:270:in `call'
from CachingCallSite.java:322:in `cacheAndCall'
from CachingCallSite.java:207:in `call'
from /Users/hg/.rvm/rubies/jruby-head/lib/ruby/site_ruby/1.8/rubygems/format.rb:46:in `block_0$RUBY$from_file_by_path'
from Users$hg$$_dot_rvm$rubies$jruby_minus_head$lib$ruby$site_ruby$$1_dot_8$rubygems$format#block_0$RUBY$from_file_by_path:65535:in `call'
from CompiledBlock.java:112:in `yield'
from CompiledBlock.java:95:in `yield'
from Block.java:130:in `yield'
from RubyIO.java:1120:in `open'
from RubyKernel.java:298:in `open'
from RubyKernel$s$0$2$open.gen:65535:in `call'
from DynamicMethod.java:217:in `call'
from CachingCallSite.java:312:in `cacheAndCall'
from CachingCallSite.java:182:in `callBlock'
from CachingCallSite.java:191:in `callIter'
from /Users/hg/.rvm/rubies/jruby-head/lib/ruby/site_ruby/1.8/rubygems/format.rb:45:in `chained_3_rescue_1$RUBY$SYNTHETICfrom_file_by_path'
from /Users/hg/.rvm/rubies/jruby-head/lib/ruby/site_ruby/1.8/rubygems/format.rb:44:in `method__2$RUBY$from_file_by_path'
from Users$hg$$dot_rvm$rubies$jruby_minus_head$lib$ruby$site_ruby$$1_dot_8$rubygems$format#method_2$RUBY$from_file_by_path:65535:in `call'
from DynamicMethod.java:217:in `call'
from CompiledMethod.java:265:in `call'
from CachingCallSite.java:302:in `cacheAndCall'
from CachingCallSite.java:173:in `call'
from /Users/hg/.rvm/rubies/jruby-head/lib/ruby/site_ruby/1.8/rubygems/installer.rb:409:in `chained_20_rescue_1$RUBY$SYNTHETICload_gem_file'
from /Users/hg/.rvm/rubies/jruby-head/lib/ruby/site_ruby/1.8/rubygems/installer.rb:408:in `method__19$RUBY$load_gem_file'
from Users$hg$$dot_rvm$rubies$jruby_minus_head$lib$ruby$site_ruby$$1_dot_8$rubygems$installer#method19$RUBY$load_gemfile:65535:in `call'
from Users$hg$$dot_rvm$rubies$jruby_minus_head$lib$ruby$site_ruby$$1_dot_8$rubygems$installer#method19$RUBY$load_gemfile:65535:in `call'
from CachingCallSite.java:262:in `cacheAndCall'
from CachingCallSite.java:105:in `call'
from /Users/hg/.rvm/rubies/jruby-head/lib/ruby/site_ruby/1.8/rubygems/installer.rb:103:in `method__4$RUBY$initialize'
from Users$hg$$dot_rvm$rubies$jruby_minus_head$lib$ruby$site_ruby$$1_dot_8$rubygems$installer#method_4$RUBY$initialize:65535:in `call'
from DynamicMethod.java:217:in `call'
from CachingCallSite.java:312:in `cacheAndCall'
from CachingCallSite.java:182:in `callBlock'
from CachingCallSite.java:186:in `call'
from RubyClass.java:806:in `newInstance'
from RubyClass$i$newInstance.gen:65535:in `call'
from JavaMethod.java:283:in `call'
from CachingCallSite.java:302:in `cacheAndCall'
from CachingCallSite.java:173:in `call'
from /Users/hg/.rvm/rubies/jruby-head/lib/ruby/site_ruby/1.8/rubygems/dependency_installer.rb:271:in `block_10$RUBY$install'
from Users$hg$$_dot_rvm$rubies$jruby_minus_head$lib$ruby$site_ruby$$1_dot_8$rubygems$dependency_installer#block_10$RUBY$install:65535:in `call'
from CompiledBlock.java:112:in `yield'
from CompiledBlock.java:95:in `yield'
from Block.java:130:in `yield'
from RubyArray.java:1565:in `eachCommon'
from RubyArray.java:1572:in `each'
from RubyArray$i$0$0$each.gen:65535:in `call'
from CachingCallSite.java:272:in `cacheAndCall'
from CachingCallSite.java:114:in `callBlock'
from CachingCallSite.java:123:in `callIter'
from /Users/hg/.rvm/rubies/jruby-head/lib/ruby/site_ruby/1.8/rubygems/dependency_installer.rb:254:in `method__10$RUBY$install'
from Users$hg$$dot_rvm$rubies$jruby_minus_head$lib$ruby$site_ruby$$1_dot_8$rubygems$dependency_installer#method_10$RUBY$install:65535:in `call'
from DynamicMethod.java:217:in `call'
from CompiledMethod.java:265:in `call'
from CachingCallSite.java:302:in `cacheAndCall'
from CachingCallSite.java:173:in `call'
from /Users/hg/.rvm/rubies/jruby-head/lib/ruby/site_ruby/1.8/rubygems/commands/install_command.rb:120:in `chained_7_rescue_1$RUBY$SYNTHETICexecute'
from /Users/hg/.rvm/rubies/jruby-head/lib/ruby/site_ruby/1.8/rubygems/commands/install_command.rb:116:in `block_0$RUBY$execute'
from Users$hg$$_dot_rvm$rubies$jruby_minus_head$lib$ruby$site_ruby$$1_dot_8$rubygems$commands$install_command#block_0$RUBY$execute:65535:in `call'
from CompiledBlock.java:112:in `yield'
from CompiledBlock.java:95:in `yield'
from Block.java:130:in `yield'
from RubyArray.java:1565:in `eachCommon'
from RubyArray.java:1572:in `each'
from RubyArray$i$0$0$each.gen:65535:in `call'
from CachingCallSite.java:272:in `cacheAndCall'
from CachingCallSite.java:114:in `callBlock'
from CachingCallSite.java:123:in `callIter'
from /Users/hg/.rvm/rubies/jruby-head/lib/ruby/site_ruby/1.8/rubygems/commands/install_command.rb:115:in `method__6$RUBY$execute'
from Users$hg$$dot_rvm$rubies$jruby_minus_head$lib$ruby$site_ruby$$1_dot_8$rubygems$commands$install_command#method_6$RUBY$execute:65535:in `call'
from Users$hg$$dot_rvm$rubies$jruby_minus_head$lib$ruby$site_ruby$$1_dot_8$rubygems$commands$install_command#method_6$RUBY$execute:65535:in `call'
from CachingCallSite.java:262:in `cacheAndCall'
from CachingCallSite.java:105:in `call'
from /Users/hg/.rvm/rubies/jruby-head/lib/ruby/site_ruby/1.8/rubygems/command.rb:278:in `method__22$RUBY$invoke'
from Users$hg$$dot_rvm$rubies$jruby_minus_head$lib$ruby$site_ruby$$1_dot_8$rubygems$command#method_22$RUBY$invoke:65535:in `call'
from DynamicMethod.java:179:in `call'
from CachingCallSite.java:252:in `cacheAndCall'
from CachingCallSite.java:71:in `call'
from /Users/hg/.rvm/rubies/jruby-head/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:133:in `method__7$RUBY$process_args'
from Users$hg$$dot_rvm$rubies$jruby_minus_head$lib$ruby$site_ruby$$1_dot_8$rubygems$command_manager#method_7$RUBY$process_args:65535:in `call'
from Users$hg$$dot_rvm$rubies$jruby_minus_head$lib$ruby$site_ruby$$1_dot_8$rubygems$command_manager#method_7$RUBY$process_args:65535:in `call'
from CachingCallSite.java:282:in `cacheAndCall'
from CachingCallSite.java:139:in `call'
from /Users/hg/.rvm/rubies/jruby-head/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:103:in `method__6$RUBY$run'
from Users$hg$$dot_rvm$rubies$jruby_minus_head$lib$ruby$site_ruby$$1_dot_8$rubygems$command_manager#method_6$RUBY$run:65535:in `call'
from Users$hg$$dot_rvm$rubies$jruby_minus_head$lib$ruby$site_ruby$$1_dot_8$rubygems$command_manager#method_6$RUBY$run:65535:in `call'
from CachingCallSite.java:282:in `cacheAndCall'
from CachingCallSite.java:139:in `call'
from /Users/hg/.rvm/rubies/jruby-head/lib/ruby/site_ruby/1.8/rubygems/gem_runner.rb:63:in `method__3$RUBY$run'
from Users$hg$$dot_rvm$rubies$jruby_minus_head$lib$ruby$site_ruby$$1_dot_8$rubygems$gem_runner#method_3$RUBY$run:65535:in `call'
from Users$hg$$dot_rvm$rubies$jruby_minus_head$lib$ruby$site_ruby$$1_dot_8$rubygems$gem_runner#method_3$RUBY$run:65535:in `call'
from CachingCallSite.java:282:in `cacheAndCall'
from CachingCallSite.java:139:in `call'
from /Users/hg/.rvm/rubies/jruby-head/bin/gem:25:in `chained_0_rescue_1$RUBY$SYNTHETIC_file_'
from /Users/hg/.rvm/rubies/jruby-head/bin/gem:24:in `_file_'
from /Users/hg/.rvm/rubies/jruby-head/bin/gem:-1:in `load'
from Ruby.java:670:in `runScript'
from Ruby.java:574:in `runNormally'
from Ruby.java:423:in `runFromMain'
from Main.java:278:in `doRunFromMain'
from Main.java:198:in `internalRun'
from Main.java:164:in `run'
from Main.java:148:in `run'
from Main.java:128:in `main'
Here's the reduced YAML that will cause the bug. It's inside Yecht, our Syck port:
"---\ndate: 2011-03-03 00:00:00.000000000 -07:00"
It does appear to work fine in 1.9 mode, which uses a different YAML engine (SnakeYAML, a port of libyaml).
Another gem which demonstrates this problem is rspec 1.3.2. I see it on both JRuby 1.5.6 and 1.6.1.
amqp gem (0.8.0.rc1) struggles from the same issue. Switching to 1.9 mode works as a workaround.
Here is one example of YAML input that JRuby 1.6.0 fails to load: https://gist.github.com/925027
Changing date: value to "2011-04-17 00:00:00.000000000" (without timezone) makes the issue go away.
I also hit this bug running:
jruby 1.6.1 (ruby-1.8.7-p330) (2011-04-12 85838f6) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_24) [darwin-x86_64-java]
using bundle install
Installing rails (2.3.11)
System.java:-2:in `arraycopy': java.lang.ArrayIndexOutOfBoundsException
from DefaultResolver.java:111:in `makeTime'
from DefaultResolver.java:277:in `create'
from DefaultResolver.java:317:in `handleScalar'
$ jruby -X+C -S bundle install Fetching source index for http://rubygems.org/ Using rake (0.8.7) Using RedCloth (4.1.9) Using aasm (2.0.7) Using activesupport (2.3.11) Using rack (1.1.2) Using actionpack (2.3.11) Using actionmailer (2.3.11) Using activerecord (2.3.11) Using activerecord-jdbc-adapter (1.1.1) Using jdbc-mysql (5.1.13) Using activerecord-jdbcmysql-adapter (1.1.1) Using activeresource (2.3.11) Using acts-as-taggable-on (2.0.6) Using ar-extensions (0.9.3) from git://github.com/ghazel/ar-extensions.git (at master) Using arrayfields (4.7.4) Using bouncy-castle-java (1.5.0145.2) Using builder (3.0.0) Using highline (1.6.1) Using net-ssh (2.1.4) Using net-scp (1.0.4) Using net-sftp (2.0.2) Using net-ssh-gateway (1.0.1) Using capistrano (2.5.21) Using capistrano-ext (1.2.1) Using celerity (0.8.9) Using culerity (0.2.15) Using mime-types (1.16) Using weakling (0.0.4) Using nokogiri (1.4.4) Using rack-test (0.5.7) Using ffi (1.0.7) Using childprocess (0.1.8) Using json_pure (1.5.1) Using rubyzip (0.9.4) Using selenium-webdriver (0.1.4) Using xpath (0.1.3) Using capybara (0.4.1.2) Using chronic (0.3.0) Using ci_reporter (1.6.4) Using columnize (0.3.2) Using haml (3.0.25) Using compass (0.8.17) Using configuration (1.2.0) Using diff-lcs (1.1.2) Using json (1.5.1) Using gherkin (2.3.5) Using term-ansicolor (1.0.5) Using cucumber (0.10.2) Using cucumber-rails (0.3.2) Using database_cleaner (0.6.6) Using delorean (1.0.0) Using email_spec (0.3.5) Using factory_girl (1.2.3) Using fakeweb (1.2.8) Using fastercsv (1.5.0) Using gem_plugin (0.2.3) Using grit (2.0.0) Using hirb (0.4.3) Using hpricot (0.6.164) Using httpclient (2.1.5.2) Using jnlp (0.6.2) Using jruby-openssl (0.7.3) Using launchy (0.4.0) Using syntax (1.0.0) Using maruku (0.6.0) Using mongrel (1.1.5) Using open4 (0.9.6) Using paperclip (2.3.11) Using prawn-layout (0.8.4) Using prawn (0.4.1) Using prawn-format (0.1.1) Using rails (2.3.11) System.java:-2:in `arraycopy': java.lang.ArrayIndexOutOfBoundsException from DefaultResolver.java:111:in `makeTime' from DefaultResolver.java:277:in `create' from DefaultResolver.java:317:in `handleScalar' from DefaultResolver.java:435:in `orgHandler' from DefaultResolver.java:455:in `node_import' from DefaultResolver$s$1$0$node_import.gen:65535:in `call' from CachingCallSite.java:137:in `call' from RubyLoadHandler.java:40:in `handle' from Parser.java:300:in `addNode' from DefaultYAMLParser.java:676:in `yyparse' from Parser.java:290:in `yechtparse' from Parser.java:284:in `parse' from YParser.java:152:in `load' from YParser$s$0$1$load.gen:65535:in `call' from JavaMethod.java:630:in `call' from DynamicMethod.java:205:in `call' from CachingCallSite.java:137:in `call' from /Users/stephen/.rvm/rubies/jruby-1.6.1/lib/ruby/1.8/yaml.rb:134:in `method__6$RUBY$load' from Users$stephen$$_dot_rvm$rubies$jruby_minus_1_dot_6_dot_1$lib$ruby$$1_dot_8$yaml$method__6$RUBY$load:65535:in `call' from Users$stephen$$_dot_rvm$rubies$jruby_minus_1_dot_6_dot_1$lib$ruby$$1_dot_8$yaml$method__6$RUBY$load:65535:in `call' from CachingCallSite.java:137:in `call' from /Users/stephen/.rvm/rubies/jruby-1.6.1/lib/ruby/site_ruby/1.8/rubygems/specification.rb:480:in `method__27$RUBY$from_yaml' from Users$stephen$$_dot_rvm$rubies$jruby_minus_1_dot_6_dot_1$lib$ruby$site_ruby$$1_dot_8$rubygems$specification$method__27$RUBY$from_yaml:65535:in `call' from Users$stephen$$_dot_rvm$rubies$jruby_minus_1_dot_6_dot_1$lib$ruby$site_ruby$$1_dot_8$rubygems$specification$method__27$RUBY$from_yaml:65535:in `call' from CachingCallSite.java:137:in `call' from /Users/stephen/.rvm/rubies/jruby-1.6.1/lib/ruby/site_ruby/1.8/rubygems/package/tar_input.rb:190:in `method__14$RUBY$load_gemspec' from Users$stephen$$_dot_rvm$rubies$jruby_minus_1_dot_6_dot_1$lib$ruby$site_ruby$$1_dot_8$rubygems$package$tar_input$method__14$RUBY$load_gemspec:65535:in `call' from Users$stephen$$_dot_rvm$rubies$jruby_minus_1_dot_6_dot_1$lib$ruby$site_ruby$$1_dot_8$rubygems$package$tar_input$method__14$RUBY$load_gemspec:65535:in `call' from CachingCallSite.java:137:in `call' from /Users/stephen/.rvm/rubies/jruby-1.6.1/lib/ruby/site_ruby/1.8/rubygems/package/tar_input.rb:54:in `chained_4_ensure_2$RUBY$__ensure__' from /Users/stephen/.rvm/rubies/jruby-1.6.1/lib/ruby/site_ruby/1.8/rubygems/package/tar_input.rb:41:in `block_0$RUBY$initialize' from Users$stephen$$_dot_rvm$rubies$jruby_minus_1_dot_6_dot_1$lib$ruby$site_ruby$$1_dot_8$rubygems$package$tar_input$block_0$RUBY$initialize:65535:in `call' from CompiledBlock.java:112:in `yield' from CompiledBlock.java:95:in `yield' from Block.java:130:in `yield' from /Users/stephen/.rvm/rubies/jruby-1.6.1/lib/ruby/site_ruby/1.8/rubygems/package/tar_reader.rb:64:in `block_0$RUBY$each' from Users$stephen$$_dot_rvm$rubies$jruby_minus_1_dot_6_dot_1$lib$ruby$site_ruby$$1_dot_8$rubygems$package$tar_reader$block_0$RUBY$each:65535:in `call' from CompiledBlock.java:112:in `yield' from CompiledBlock.java:95:in `yield' from CompiledBlock.java:75:in `yieldSpecific' from Block.java:99:in `yieldSpecific' from RubyKernel.java:1418:in `loop' from RubyKernel$s$0$0$loop.gen:65535:in `call' from CachingCallSite.java:112:in `callBlock' from CachingCallSite.java:123:in `callIter' from /Users/stephen/.rvm/rubies/jruby-1.6.1/lib/ruby/site_ruby/1.8/rubygems/package/tar_reader.rb:55:in `method__6$RUBY$each' from Users$stephen$$_dot_rvm$rubies$jruby_minus_1_dot_6_dot_1$lib$ruby$site_ruby$$1_dot_8$rubygems$package$tar_reader$method__6$RUBY$each:65535:in `call' from CachingCallSite.java:112:in `callBlock' from CachingCallSite.java:123:in `callIter' from /Users/stephen/.rvm/rubies/jruby-1.6.1/lib/ruby/site_ruby/1.8/rubygems/package/tar_input.rb:35:in `method__3$RUBY$initialize' from Users$stephen$$_dot_rvm$rubies$jruby_minus_1_dot_6_dot_1$lib$ruby$site_ruby$$1_dot_8$rubygems$package$tar_input$method__3$RUBY$initialize:65535:in `call' from DynamicMethod.java:217:in `call' from CachingCallSite.java:180:in `callBlock' from CachingCallSite.java:186:in `call' from RubyClass.java:806:in `newInstance' from RubyClass$i$newInstance.gen:65535:in `call' from JavaMethod.java:283:in `call' from WrapperMethod.java:62:in `call' from CachingCallSite.java:171:in `call' from /Users/stephen/.rvm/rubies/jruby-1.6.1/lib/ruby/site_ruby/1.8/rubygems/package/tar_input.rb:20:in `chained_2_ensure_1$RUBY$__ensure__' from /Users/stephen/.rvm/rubies/jruby-1.6.1/lib/ruby/site_ruby/1.8/rubygems/package/tar_input.rb:-1:in `method__1$RUBY$open' from Users$stephen$$_dot_rvm$rubies$jruby_minus_1_dot_6_dot_1$lib$ruby$site_ruby$$1_dot_8$rubygems$package$tar_input$method__1$RUBY$open:65535:in `call' from DynamicMethod.java:217:in `call' from CachingCallSite.java:180:in `callBlock' from CachingCallSite.java:186:in `call' from /Users/stephen/.rvm/rubies/jruby-1.6.1/lib/ruby/site_ruby/1.8/rubygems/package.rb:68:in `method__12$RUBY$open' from Users$stephen$$_dot_rvm$rubies$jruby_minus_1_dot_6_dot_1$lib$ruby$site_ruby$$1_dot_8$rubygems$package$method__12$RUBY$open:65535:in `call' from DynamicMethod.java:225:in `call' from CachingCallSite.java:214:in `callBlock' from CachingCallSite.java:225:in `callIter' from /Users/stephen/.rvm/rubies/jruby-1.6.1/lib/ruby/site_ruby/1.8/rubygems/format.rb:62:in `method__5$RUBY$from_io' from Users$stephen$$_dot_rvm$rubies$jruby_minus_1_dot_6_dot_1$lib$ruby$site_ruby$$1_dot_8$rubygems$format$method__5$RUBY$from_io:65535:in `call' from DynamicMethod.java:225:in `call' from CompiledMethod.java:270:in `call' from CachingCallSite.java:205:in `call' from /Users/stephen/.rvm/rubies/jruby-1.6.1/lib/ruby/site_ruby/1.8/rubygems/format.rb:46:in `block_0$RUBY$from_file_by_path' from Users$stephen$$_dot_rvm$rubies$jruby_minus_1_dot_6_dot_1$lib$ruby$site_ruby$$1_dot_8$rubygems$format$block_0$RUBY$from_file_by_path:65535:in `call' from CompiledBlock.java:112:in `yield' from CompiledBlock.java:95:in `yield' from Block.java:130:in `yield' from RubyIO.java:1121:in `open' from RubyKernel.java:298:in `open' from RubyKernel$s$0$2$open.gen:65535:in `call' from AliasMethod.java:101:in `call' from CachingCallSite.java:78:in `callBlock' from CachingCallSite.java:84:in `call' from /Users/stephen/.rvm/rubies/jruby-1.6.1/lib/ruby/1.8/open-uri.rb:32:in `method__1$RUBY$open' from Users$stephen$$_dot_rvm$rubies$jruby_minus_1_dot_6_dot_1$lib$ruby$$1_dot_8$open_minus_uri$method__1$RUBY$open:65535:in `call' from DynamicMethod.java:217:in `call' from CachingCallSite.java:180:in `callBlock' from CachingCallSite.java:191:in `callIter' from /Users/stephen/.rvm/rubies/jruby-1.6.1/lib/ruby/site_ruby/1.8/rubygems/format.rb:45:in `chained_3_rescue_1$RUBY$SYNTHETICfrom_file_by_path' from /Users/stephen/.rvm/rubies/jruby-1.6.1/lib/ruby/site_ruby/1.8/rubygems/format.rb:44:in `method__2$RUBY$from_file_by_path' from Users$stephen$$_dot_rvm$rubies$jruby_minus_1_dot_6_dot_1$lib$ruby$site_ruby$$1_dot_8$rubygems$format$method__2$RUBY$from_file_by_path:65535:in `call' from DynamicMethod.java:209:in `call' from CompiledMethod.java:260:in `call' from CachingCallSite.java:137:in `call' from /Users/stephen/.rvm/gems/jruby-1.6.1@xproject/gems/bundler-1.0.12/lib/bundler/source.rb:73:in `method__13$RUBY$fetch' from Users$stephen$$_dot_rvm$gems$jruby_minus_1_dot_6_dot_1_40_xproject$gems$bundler_minus_1_dot_0_dot_12$lib$bundler$source$method__13$RUBY$fetch:65535:in `call' from Users$stephen$$_dot_rvm$gems$jruby_minus_1_dot_6_dot_1_40_xproject$gems$bundler_minus_1_dot_0_dot_12$lib$bundler$source$method__13$RUBY$fetch:65535:in `call' from CachingCallSite.java:137:in `call' from /Users/stephen/.rvm/gems/jruby-1.6.1@xproject/gems/bundler-1.0.12/lib/bundler/installer.rb:45:in `block_0$RUBY$run' from Users$stephen$$_dot_rvm$gems$jruby_minus_1_dot_6_dot_1_40_xproject$gems$bundler_minus_1_dot_0_dot_12$lib$bundler$installer$block_0$RUBY$run:65535:in `call' from CompiledBlock.java:112:in `yield' from CompiledBlock.java:95:in `yield' from Block.java:130:in `yield' from /Users/stephen/.rvm/gems/jruby-1.6.1@xproject/gems/bundler-1.0.12/lib/bundler/spec_set.rb:12:in `block_1$RUBY$each' from Users$stephen$$_dot_rvm$gems$jruby_minus_1_dot_6_dot_1_40_xproject$gems$bundler_minus_1_dot_0_dot_12$lib$bundler$spec_set$block_1$RUBY$each:65535:in `call' from CompiledBlock.java:112:in `yield' from CompiledBlock.java:95:in `yield' from Block.java:130:in `yield' from RubyArray.java:1595:in `eachCommon' from RubyArray.java:1602:in `each' from RubyArray$i$0$0$each.gen:65535:in `call' from CachingCallSite.java:112:in `callBlock' from CachingCallSite.java:123:in `callIter' from /Users/stephen/.rvm/gems/jruby-1.6.1@xproject/gems/bundler-1.0.12/lib/bundler/spec_set.rb:12:in `method__3$RUBY$each' from Users$stephen$$_dot_rvm$gems$jruby_minus_1_dot_6_dot_1_40_xproject$gems$bundler_minus_1_dot_0_dot_12$lib$bundler$spec_set$method__3$RUBY$each:65535:in `call' from CachingCallSite.java:272:in `cacheAndCall' from CachingCallSite.java:114:in `callBlock' from CachingCallSite.java:123:in `callIter' from /Users/stephen/.rvm/gems/jruby-1.6.1@xproject/gems/bundler-1.0.12/lib/bundler/installer.rb:44:in `method__3$RUBY$run' from Users$stephen$$_dot_rvm$gems$jruby_minus_1_dot_6_dot_1_40_xproject$gems$bundler_minus_1_dot_0_dot_12$lib$bundler$installer$method__3$RUBY$run:65535:in `call' from Users$stephen$$_dot_rvm$gems$jruby_minus_1_dot_6_dot_1_40_xproject$gems$bundler_minus_1_dot_0_dot_12$lib$bundler$installer$method__3$RUBY$run:65535:in `call' from CachingCallSite.java:282:in `cacheAndCall' from CachingCallSite.java:139:in `call' from /Users/stephen/.rvm/gems/jruby-1.6.1@xproject/gems/bundler-1.0.12/lib/bundler/installer.rb:8:in `method__2$RUBY$install' from Users$stephen$$_dot_rvm$gems$jruby_minus_1_dot_6_dot_1_40_xproject$gems$bundler_minus_1_dot_0_dot_12$lib$bundler$installer$method__2$RUBY$install:65535:in `call' from DynamicMethod.java:225:in `call' from CompiledMethod.java:270:in `call' from CachingCallSite.java:322:in `cacheAndCall' from CachingCallSite.java:207:in `call' from /Users/stephen/.rvm/gems/jruby-1.6.1@xproject/gems/bundler-1.0.12/lib/bundler/cli.rb:225:in `method__8$RUBY$install' from Users$stephen$$_dot_rvm$gems$jruby_minus_1_dot_6_dot_1_40_xproject$gems$bundler_minus_1_dot_0_dot_12$lib$bundler$cli$method__8$RUBY$install:65535:in `call' from RubyClass.java:543:in `finvoke' from RubyBasicObject.java:2770:in `send' from RubyKernel.java:2064:in `send' from RubyKernel$s$send.gen:65535:in `call' from DynamicMethod.java:179:in `call' from CachingCallSite.java:252:in `cacheAndCall' from CachingCallSite.java:71:in `call' from /Users/stephen/.rvm/gems/jruby-1.6.1@xproject/gems/bundler-1.0.12/lib/bundler/vendor/thor/task.rb:21:in `method__5$RUBY$run' from Users$stephen$$_dot_rvm$gems$jruby_minus_1_dot_6_dot_1_40_xproject$gems$bundler_minus_1_dot_0_dot_12$lib$bundler$vendor$thor$task$method__5$RUBY$run:65535:in `call' from DynamicMethod.java:179:in `call' from CachingCallSite.java:252:in `cacheAndCall' from CachingCallSite.java:71:in `call' from /Users/stephen/.rvm/gems/jruby-1.6.1@xproject/gems/bundler-1.0.12/lib/bundler/vendor/thor/invocation.rb:118:in `method__7$RUBY$invoke_task' from Users$stephen$$_dot_rvm$gems$jruby_minus_1_dot_6_dot_1_40_xproject$gems$bundler_minus_1_dot_0_dot_12$lib$bundler$vendor$thor$invocation$method__7$RUBY$invoke_task:65535:in `call' from DynamicMethod.java:217:in `call' from CompiledMethod.java:265:in `call' from CachingCallSite.java:302:in `cacheAndCall' from CachingCallSite.java:173:in `call' from /Users/stephen/.rvm/gems/jruby-1.6.1@xproject/gems/bundler-1.0.12/lib/bundler/vendor/thor.rb:246:in `method__15$RUBY$dispatch' from Users$stephen$$_dot_rvm$gems$jruby_minus_1_dot_6_dot_1_40_xproject$gems$bundler_minus_1_dot_0_dot_12$lib$bundler$vendor$thor$method__15$RUBY$dispatch:65535:in `call' from DynamicMethod.java:179:in `call' from CachingCallSite.java:252:in `cacheAndCall' from CachingCallSite.java:71:in `call' from /Users/stephen/.rvm/gems/jruby-1.6.1@xproject/gems/bundler-1.0.12/lib/bundler/vendor/thor/base.rb:389:in `method__28$RUBY$start' from Users$stephen$$_dot_rvm$gems$jruby_minus_1_dot_6_dot_1_40_xproject$gems$bundler_minus_1_dot_0_dot_12$lib$bundler$vendor$thor$base$method__28$RUBY$start:65535:in `call' from DynamicMethod.java:201:in `call' from CompiledMethod.java:255:in `call' from CachingCallSite.java:262:in `cacheAndCall' from CachingCallSite.java:105:in `call' from /Users/stephen/.rvm/gems/jruby-1.6.1@xproject/gems/bundler-1.0.12/bin/bundle:13:in `chained_0_rescue_1$RUBY$SYNTHETIC__file__' from /Users/stephen/.rvm/gems/jruby-1.6.1@xproject/gems/bundler-1.0.12/bin/bundle:12:in `__file__' from /Users/stephen/.rvm/gems/jruby-1.6.1@xproject/gems/bundler-1.0.12/bin/bundle:-1:in `load' from Ruby.java:671:in `runScript' from Ruby.java:2495:in `compileAndLoadFile' from ExternalScript.java:54:in `load' from LoadService.java:272:in `load' from RubyKernel.java:1081:in `loadCommon' from RubyKernel.java:1063:in `load' from RubyKernel$s$0$1$load.gen:65535:in `call' from DynamicMethod.java:209:in `call' from DynamicMethod.java:205:in `call' from CachingCallSite.java:282:in `cacheAndCall' from CachingCallSite.java:139:in `call' from /Users/stephen/.rvm/gems/jruby-1.6.1@xproject/bin/bundle:19:in `__file__' from /Users/stephen/.rvm/gems/jruby-1.6.1@xproject/bin/bundle:-1:in `load' from Ruby.java:671:in `runScript' from Ruby.java:575:in `runNormally' from Ruby.java:424:in `runFromMain' from Main.java:278:in `doRunFromMain' from Main.java:198:in `internalRun' from Main.java:164:in `run' from Main.java:148:in `run' from Main.java:128:in `main'
I'm using JRuby 1.6.1 and am not generating an error parsing the yaml Charles listed above.
>> JRUBY_VERSION => "1.6.1" >> JRUBY_REVISION => "85838f6" >> puts YAML.parse("---\ndate: 2011-03-03 00:00:00.000000000 -07:00").to_yaml --- !ruby/object:YAML::Yecht::Map kind: :map style: type_id: value: ? !ruby/object:YAML::Yecht::Scalar kind: :scalar style: :plain type_id: tag:yaml.org,2002:str value: date : !ruby/object:YAML::Yecht::Scalar kind: :scalar style: :plain type_id: tag:yaml.org,2002:timestamp#spaced value: "2011-03-03 00:00:00.000000000 -07:00"
Also saving the amqp gemspec that Rhett locally and parsing that doesn't generate an error either:
puts YAML.parse(File.read("amqp-gemspec.yaml")).to_yaml
Clearing the custom gemset and running bundle install --verbose results in the same error:
Installing rails (2.3.11) from /Users/stephen/.rvm/gems/jruby-1.6.1@xproject/specifications/rails-2.3.11.gemspec System.java:-2:in `arraycopy': java.lang.ArrayIndexOutOfBoundsException from DefaultResolver.java:111:in `makeTime' from DefaultResolver.java:277:in `create'
But opening irb and parsing the rails gemspec directly works without error.
puts YAML.parse(File.read("/Users/stephen/.rvm/gems/jruby-1.6.1@xproject/specifications/rails-2.3.11.gemspec")).to_yaml
The code for the rails app I am using is open source and available – but it's large.
However if you want to duplicate this issue directly:
rvm install jruby git clone git://github.com/stepheneb/rigse.git xproject cd xproject rvm use jruby-1.6.1 rvm gemset create xproject echo "rvm use jruby-1.6.1@xproject" > .rvmrc cd ..; cd - jruby -X+C -S bundle install --verbose
MacOSX 10.6.6
JRuby 1.6.1 (installed via rvm).
Gems version 1.7.2.
java --version
java version "1.6.0_24"
Java(TM) SE Runtime Environment (build 1.6.0_24-b07-334-10M3326)
Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02-334, mixed mode)
Attempting to install the mysql2 gem using
jruby -X+C -S gem install mysql2
also throws the same exception:
System.java:-2:in `arraycopy': java.lang.ArrayIndexOutOfBoundsException
from DefaultResolver.java:111:in `makeTime'
from DefaultResolver.java:277:in `create'
from DefaultResolver.java:317:in `handleScalar'
from DefaultResolver.java:435:in `orgHandler'
from DefaultResolver.java:455:in `node_import'
from DefaultResolver$s$1$0$node_import.gen:65535:in `call'
from CachingCallSite.java:137:in `call'
from RubyLoadHandler.java:40:in `handle'
from Parser.java:300:in `addNode'
from DefaultYAMLParser.java:676:in `yyparse'
from Parser.java:290:in `yechtparse'
from Parser.java:284:in `parse' [119/1938]
from YParser.java:152:in `load'
from YParser$s$0$1$load.gen:65535:in `call'
from JavaMethod.java:630:in `call'
from DynamicMethod.java:205:in `call'
from CachingCallSite.java:137:in `call'
from /Users/vhodges/.rvm/rubies/jruby-1.6.1/lib/ruby/1.8/yaml.rb:134:in `method__6$RUBY$load'
from Users$vhodges$$dot_rvm$rubies$jruby_minus_1_dot_6_dot_1$lib$ruby$$1_dot_8$yaml$method_6$RUBY$load:65535:in `call'
from Users$vhodges$$dot_rvm$rubies$jruby_minus_1_dot_6_dot_1$lib$ruby$$1_dot_8$yaml$method_6$RUBY$load:65535:in `call'
from CachingCallSite.java:282:in `cacheAndCall'
from CachingCallSite.java:139:in `call'
from /Users/vhodges/.rvm/rubies/jruby-1.6.1/lib/ruby/site_ruby/1.8/rubygems/specification.rb:391:in `method__21$RUBY$from_yaml'
from Users$vhodges$$dot_rvm$rubies$jruby_minus_1_dot_6_dot_1$lib$ruby$site_ruby$$1_dot_8$rubygems$specification$method_21$RUBY$from_yaml:65535:in `call'
from Users$vhodges$$dot_rvm$rubies$jruby_minus_1_dot_6_dot_1$lib$ruby$site_ruby$$1_dot_8$rubygems$specification$method_21$RUBY$from_yaml:65535:in `call'
from CachingCallSite.java:282:in `cacheAndCall'
from CachingCallSite.java:139:in `call'
from /Users/vhodges/.rvm/rubies/jruby-1.6.1/lib/ruby/site_ruby/1.8/rubygems/package/tar_input.rb:191:in `method__14$RUBY$load_gemspec'
from Users$vhodges$$dot_rvm$rubies$jruby_minus_1_dot_6_dot_1$lib$ruby$site_ruby$$1_dot_8$rubygems$package$tar_input$method_14$RUBY$load_gemspec:65535:in `call'
from Users$vhodges$$dot_rvm$rubies$jruby_minus_1_dot_6_dot_1$lib$ruby$site_ruby$$1_dot_8$rubygems$package$tar_input$method_14$RUBY$load_gemspec:65535:in `call'
from CachingCallSite.java:282:in `cacheAndCall'
from CachingCallSite.java:139:in `call'
from /Users/vhodges/.rvm/rubies/jruby-1.6.1/lib/ruby/site_ruby/1.8/rubygems/package/tar_input.rb:55:in `chained_4_ensure_2$RUBY$_ensure_'
from /Users/vhodges/.rvm/rubies/jruby-1.6.1/lib/ruby/site_ruby/1.8/rubygems/package/tar_input.rb:41:in `block_0$RUBY$initialize'
from Users$vhodges$$_dot_rvm$rubies$jruby_minus_1_dot_6_dot_1$lib$ruby$site_ruby$$1_dot_8$rubygems$package$tar_input$block_0$RUBY$initialize:65535:in `call'
from CompiledBlock.java:112:in `yield'
from CompiledBlock.java:95:in `yield'
from Block.java:130:in `yield'
from /Users/vhodges/.rvm/rubies/jruby-1.6.1/lib/ruby/site_ruby/1.8/rubygems/package/tar_reader.rb:64:in `block_0$RUBY$each'
from Users$vhodges$$_dot_rvm$rubies$jruby_minus_1_dot_6_dot_1$lib$ruby$site_ruby$$1_dot_8$rubygems$package$tar_reader$block_0$RUBY$each:65535:in `call'
from CompiledBlock.java:112:in `yield'
from CompiledBlock.java:95:in `yield'
from CompiledBlock.java:75:in `yieldSpecific'
from Block.java:99:in `yieldSpecific'
from RubyKernel.java:1418:in `loop'
from RubyKernel$s$0$0$loop.gen:65535:in `call'
from CachingCallSite.java:272:in `cacheAndCall'
from CachingCallSite.java:114:in `callBlock'
from CachingCallSite.java:123:in `callIter'
from /Users/vhodges/.rvm/rubies/jruby-1.6.1/lib/ruby/site_ruby/1.8/rubygems/package/tar_reader.rb:55:in `method__6$RUBY$each'
from Users$vhodges$$dot_rvm$rubies$jruby_minus_1_dot_6_dot_1$lib$ruby$site_ruby$$1_dot_8$rubygems$package$tar_reader$method_6$RUBY$each:65535:in `call'
from CachingCallSite.java:272:in `cacheAndCall'
from CachingCallSite.java:114:in `callBlock'
from CachingCallSite.java:123:in `callIter'
from /Users/vhodges/.rvm/rubies/jruby-1.6.1/lib/ruby/site_ruby/1.8/rubygems/package/tar_input.rb:35:in `method__3$RUBY$initialize'
from Users$vhodges$$dot_rvm$rubies$jruby_minus_1_dot_6_dot_1$lib$ruby$site_ruby$$1_dot_8$rubygems$package$tar_input$method_3$RUBY$initialize:65535:in `call'
from DynamicMethod.java:217:in `call'
from CachingCallSite.java:312:in `cacheAndCall'
from CachingCallSite.java:182:in `callBlock'
from CachingCallSite.java:186:in `call'
from RubyClass.java:806:in `newInstance'
from RubyClass$i$newInstance.gen:65535:in `call'
from JavaMethod.java:283:in `call'
from WrapperMethod.java:62:in `call'
from CachingCallSite.java:302:in `cacheAndCall'
from CachingCallSite.java:173:in `call'
from /Users/vhodges/.rvm/rubies/jruby-1.6.1/lib/ruby/site_ruby/1.8/rubygems/package/tar_input.rb:20:in `chained_2_ensure_1$RUBY$_ensure_'
from /Users/vhodges/.rvm/rubies/jruby-1.6.1/lib/ruby/site_ruby/1.8/rubygems/package/tar_input.rb:-1:in `method__1$RUBY$open'
from Users$vhodges$$dot_rvm$rubies$jruby_minus_1_dot_6_dot_1$lib$ruby$site_ruby$$1_dot_8$rubygems$package$tar_input$method_1$RUBY$open:65535:in `call'
from DynamicMethod.java:217:in `call'
from CachingCallSite.java:182:in `callBlock' [59/1938]
from CachingCallSite.java:186:in `call'
from /Users/vhodges/.rvm/rubies/jruby-1.6.1/lib/ruby/site_ruby/1.8/rubygems/package.rb:68:in `method__12$RUBY$open'
from Users$vhodges$$dot_rvm$rubies$jruby_minus_1_dot_6_dot_1$lib$ruby$site_ruby$$1_dot_8$rubygems$package$method_12$RUBY$open:65535:in `call'
from DynamicMethod.java:225:in `call'
from CachingCallSite.java:332:in `cacheAndCall'
from CachingCallSite.java:216:in `callBlock'
from CachingCallSite.java:225:in `callIter'
from /Users/vhodges/.rvm/rubies/jruby-1.6.1/lib/ruby/site_ruby/1.8/rubygems/format.rb:62:in `method__5$RUBY$from_io'
from Users$vhodges$$dot_rvm$rubies$jruby_minus_1_dot_6_dot_1$lib$ruby$site_ruby$$1_dot_8$rubygems$format$method_5$RUBY$from_io:65535:in `call'
from DynamicMethod.java:225:in `call'
from CompiledMethod.java:270:in `call'
from CachingCallSite.java:322:in `cacheAndCall'
from CachingCallSite.java:207:in `call'
from /Users/vhodges/.rvm/rubies/jruby-1.6.1/lib/ruby/site_ruby/1.8/rubygems/format.rb:46:in `block_0$RUBY$from_file_by_path'
from Users$vhodges$$_dot_rvm$rubies$jruby_minus_1_dot_6_dot_1$lib$ruby$site_ruby$$1_dot_8$rubygems$format$block_0$RUBY$from_file_by_path:65535:in `call'
from CompiledBlock.java:112:in `yield'
from CompiledBlock.java:95:in `yield'
from Block.java:130:in `yield'
from RubyIO.java:1121:in `open'
from RubyKernel.java:298:in `open'
from RubyKernel$s$0$2$open.gen:65535:in `call'
from DynamicMethod.java:217:in `call'
from CachingCallSite.java:312:in `cacheAndCall'
from CachingCallSite.java:182:in `callBlock'
from CachingCallSite.java:191:in `callIter'
from /Users/vhodges/.rvm/rubies/jruby-1.6.1/lib/ruby/site_ruby/1.8/rubygems/format.rb:45:in `chained_3_rescue_1$RUBY$SYNTHETICfrom_file_by_path'
from /Users/vhodges/.rvm/rubies/jruby-1.6.1/lib/ruby/site_ruby/1.8/rubygems/format.rb:44:in `method__2$RUBY$from_file_by_path'
from Users$vhodges$$dot_rvm$rubies$jruby_minus_1_dot_6_dot_1$lib$ruby$site_ruby$$1_dot_8$rubygems$format$method_2$RUBY$from_file_by_path:65535:in `call'
from DynamicMethod.java:217:in `call'
from CompiledMethod.java:265:in `call'
from CachingCallSite.java:302:in `cacheAndCall'
from CachingCallSite.java:173:in `call'
from /Users/vhodges/.rvm/rubies/jruby-1.6.1/lib/ruby/site_ruby/1.8/rubygems/installer.rb:413:in `chained_20_rescue_1$RUBY$SYNTHETICload_gem_file'
from /Users/vhodges/.rvm/rubies/jruby-1.6.1/lib/ruby/site_ruby/1.8/rubygems/installer.rb:412:in `method__19$RUBY$load_gem_file'
from Users$vhodges$$dot_rvm$rubies$jruby_minus_1_dot_6_dot_1$lib$ruby$site_ruby$$1_dot_8$rubygems$installer$method19$RUBY$load_gemfile:65535:in `call'
from Users$vhodges$$dot_rvm$rubies$jruby_minus_1_dot_6_dot_1$lib$ruby$site_ruby$$1_dot_8$rubygems$installer$method19$RUBY$load_gemfile:65535:in `call'
from CachingCallSite.java:262:in `cacheAndCall'
from CachingCallSite.java:105:in `call'
from /Users/vhodges/.rvm/rubies/jruby-1.6.1/lib/ruby/site_ruby/1.8/rubygems/installer.rb:103:in `method__4$RUBY$initialize'
from Users$vhodges$$dot_rvm$rubies$jruby_minus_1_dot_6_dot_1$lib$ruby$site_ruby$$1_dot_8$rubygems$installer$method_4$RUBY$initialize:65535:in `call'
from DynamicMethod.java:217:in `call'
from CachingCallSite.java:312:in `cacheAndCall'
from CachingCallSite.java:182:in `callBlock'
from CachingCallSite.java:186:in `call'
from RubyClass.java:806:in `newInstance'
from RubyClass$i$newInstance.gen:65535:in `call'
from JavaMethod.java:283:in `call'
from CachingCallSite.java:302:in `cacheAndCall'
from CachingCallSite.java:173:in `call'
from /Users/vhodges/.rvm/rubies/jruby-1.6.1/lib/ruby/site_ruby/1.8/rubygems/dependency_installer.rb:286:in `block_15$RUBY$install'
from Users$vhodges$$_dot_rvm$rubies$jruby_minus_1_dot_6_dot_1$lib$ruby$site_ruby$$1_dot_8$rubygems$dependency_installer$block_15$RUBY$install:65535:in `call'
from CompiledBlock.java:112:in `yield'
from CompiledBlock.java:95:in `yield'
from Block.java:130:in `yield'
from RubyArray.java:1595:in `eachCommon'
from RubyArray.java:1602:in `each'
from RubyArray$i$0$0$each.gen:65535:in `call'
from CachingCallSite.java:272:in `cacheAndCall'
from CachingCallSite.java:114:in `callBlock'
from CachingCallSite.java:123:in `callIter'
from /Users/vhodges/.rvm/rubies/jruby-1.6.1/lib/ruby/site_ruby/1.8/rubygems/dependency_installer.rb:270:in `method__10$RUBY$install'
from Users$vhodges$$dot_rvm$rubies$jruby_minus_1_dot_6_dot_1$lib$ruby$site_ruby$$1_dot_8$rubygems$dependency_installer$method_10$RUBY$install:65535:in `call'
from DynamicMethod.java:217:in `call'
from CompiledMethod.java:265:in `call'
from CachingCallSite.java:302:in `cacheAndCall'
from CachingCallSite.java:173:in `call'
from /Users/vhodges/.rvm/rubies/jruby-1.6.1/lib/ruby/site_ruby/1.8/rubygems/commands/install_command.rb:120:in `chained_7_rescue_1$RUBY$SYNTHETICexecute'
from /Users/vhodges/.rvm/rubies/jruby-1.6.1/lib/ruby/site_ruby/1.8/rubygems/commands/install_command.rb:116:in `block_0$RUBY$execute'
from Users$vhodges$$_dot_rvm$rubies$jruby_minus_1_dot_6_dot_1$lib$ruby$site_ruby$$1_dot_8$rubygems$commands$install_command$block_0$RUBY$execute:65535:in `call'
from CompiledBlock.java:112:in `yield'
from CompiledBlock.java:95:in `yield'
from Block.java:130:in `yield'
from RubyArray.java:1595:in `eachCommon'
from RubyArray.java:1602:in `each'
from RubyArray$i$0$0$each.gen:65535:in `call'
from CachingCallSite.java:272:in `cacheAndCall'
from CachingCallSite.java:114:in `callBlock'
from CachingCallSite.java:123:in `callIter'
from /Users/vhodges/.rvm/rubies/jruby-1.6.1/lib/ruby/site_ruby/1.8/rubygems/commands/install_command.rb:115:in `method__6$RUBY$execute'
from Users$vhodges$$dot_rvm$rubies$jruby_minus_1_dot_6_dot_1$lib$ruby$site_ruby$$1_dot_8$rubygems$commands$install_command$method_6$RUBY$execute:65535:in `call'
from Users$vhodges$$dot_rvm$rubies$jruby_minus_1_dot_6_dot_1$lib$ruby$site_ruby$$1_dot_8$rubygems$commands$install_command$method_6$RUBY$execute:65535:in `call'
from CachingCallSite.java:262:in `cacheAndCall'
from CachingCallSite.java:105:in `call'
from /Users/vhodges/.rvm/rubies/jruby-1.6.1/lib/ruby/site_ruby/1.8/rubygems/command.rb:278:in `method__22$RUBY$invoke'
from Users$vhodges$$dot_rvm$rubies$jruby_minus_1_dot_6_dot_1$lib$ruby$site_ruby$$1_dot_8$rubygems$command$method_22$RUBY$invoke:65535:in `call'
from DynamicMethod.java:179:in `call'
from CachingCallSite.java:252:in `cacheAndCall'
from CachingCallSite.java:71:in `call'
from /Users/vhodges/.rvm/rubies/jruby-1.6.1/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:133:in `method__7$RUBY$process_args'
from Users$vhodges$$dot_rvm$rubies$jruby_minus_1_dot_6_dot_1$lib$ruby$site_ruby$$1_dot_8$rubygems$command_manager$method_7$RUBY$process_args:65535:in `call'
from Users$vhodges$$dot_rvm$rubies$jruby_minus_1_dot_6_dot_1$lib$ruby$site_ruby$$1_dot_8$rubygems$command_manager$method_7$RUBY$process_args:65535:in `call'
from CachingCallSite.java:282:in `cacheAndCall'
from CachingCallSite.java:139:in `call'
from /Users/vhodges/.rvm/rubies/jruby-1.6.1/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:103:in `method__6$RUBY$run'
from Users$vhodges$$dot_rvm$rubies$jruby_minus_1_dot_6_dot_1$lib$ruby$site_ruby$$1_dot_8$rubygems$command_manager$method_6$RUBY$run:65535:in `call'
from Users$vhodges$$dot_rvm$rubies$jruby_minus_1_dot_6_dot_1$lib$ruby$site_ruby$$1_dot_8$rubygems$command_manager$method_6$RUBY$run:65535:in `call'
from CachingCallSite.java:282:in `cacheAndCall'
from CachingCallSite.java:139:in `call'
from /Users/vhodges/.rvm/rubies/jruby-1.6.1/lib/ruby/site_ruby/1.8/rubygems/gem_runner.rb:64:in `method__3$RUBY$run'
from Users$vhodges$$dot_rvm$rubies$jruby_minus_1_dot_6_dot_1$lib$ruby$site_ruby$$1_dot_8$rubygems$gem_runner$method_3$RUBY$run:65535:in `call'
from Users$vhodges$$dot_rvm$rubies$jruby_minus_1_dot_6_dot_1$lib$ruby$site_ruby$$1_dot_8$rubygems$gem_runner$method_3$RUBY$run:65535:in `call'
from CachingCallSite.java:282:in `cacheAndCall'
from CachingCallSite.java:139:in `call'
from /Users/vhodges/.rvm/rubies/jruby-1.6.1/bin/gem:21:in `chained_0_rescue_1$RUBY$SYNTHETIC_file_'
from /Users/vhodges/.rvm/rubies/jruby-1.6.1/bin/gem:20:in `_file_'
from /Users/vhodges/.rvm/rubies/jruby-1.6.1/bin/gem:-1:in `load'
from Ruby.java:671:in `runScript'
from Ruby.java:575:in `runNormally'
from Ruby.java:424:in `runFromMain'
from Main.java:278:in `doRunFromMain'
from Main.java:198:in `internalRun'
from Main.java:164:in `run'
from Main.java:148:in `run'
from Main.java:128:in `main'
Interesting that Charlie's minimal test case causes an error parsed with YAML.load but not with YAML.parse:
>> YAML.load("---\ndate: 2011-03-03 00:00:00.000000000 -07:00")
Java::JavaLang::ArrayIndexOutOfBoundsException:
from java.lang.System.arraycopy(Native Method)
from org.yecht.ruby.DefaultResolver.makeTime(DefaultResolver.java:111)
from org.yecht.ruby.DefaultResolver$13.create(DefaultResolver.java:277)
from org.yecht.ruby.DefaultResolver.handleScalar(DefaultResolver.java:317)
from org.yecht.ruby.DefaultResolver.orgHandler(DefaultResolver.java:435)
from org.yecht.ruby.DefaultResolver.node_import(DefaultResolver.java:455)
from org.yecht.ruby.DefaultResolver$s$1$0$node_import.call(DefaultResolver$s$1$0$node_import.gen:65535)
from org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:137)
from org.yecht.ruby.RubyLoadHandler.handle(RubyLoadHandler.java:40)
from org.yecht.Parser.addNode(Parser.java:300)
from org.yecht.DefaultYAMLParser.yyparse(DefaultYAMLParser.java:676)
from org.yecht.Parser.yechtparse(Parser.java:290)
from org.yecht.Parser.parse(Parser.java:284)
from org.yecht.ruby.YParser.load(YParser.java:152)
from org.yecht.ruby.YParser$s$0$1$load.call(YParser$s$0$1$load.gen:65535)
from org.jruby.internal.runtime.methods.JavaMethod$JavaMethodN.call(JavaMethod.java:630)
... 139 levels...
from org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
from org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74)
from org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:190)
from org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:179)
from org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:282)
from org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:139)
from Users.stephen.$_dot_rvm.rubies.jruby_minus_1_dot_6_dot_1.bin.irb.__file__(/Users/stephen/.rvm/rubies/jruby-1.6.1/bin/irb:17)
from Users.stephen.$_dot_rvm.rubies.jruby_minus_1_dot_6_dot_1.bin.irb.load(/Users/stephen/.rvm/rubies/jruby-1.6.1/bin/irb)
from org.jruby.Ruby.runScript(Ruby.java:671)
from org.jruby.Ruby.runNormally(Ruby.java:575)
from org.jruby.Ruby.runFromMain(Ruby.java:424)
from org.jruby.Main.doRunFromMain(Main.java:278)
from org.jruby.Main.internalRun(Main.java:198)
from org.jruby.Main.run(Main.java:164)
from org.jruby.Main.run(Main.java:148)
from org.jruby.Main.main(Main.java:128)>>
>> YAML.parse("---\ndate: 2011-03-03 00:00:00.000000000 -07:00")
=> #<YAML::Yecht::Map:0x5b13cf49 @style=nil, @kind=:map, @value={#<YAML::Yecht::Scalar:0x61735602 @style=:plain, @kind=:scalar, @value="date", @type_id="tag:yaml.org,2002:str">=>#<YAML::Yecht::Scalar:0x2abb5859 @style=:plain, @kind=:scalar, @value="2011-03-03 00:00:00.000000000 -07:00", @type_id="tag:yaml.org,2002:timestamp#spaced">}, @type_id=nil>
I just created this issue in yecht's github issue tracker:
YAML.load("---\ndate: 2011-03-03 00:00:00.000000000 -07:00") fails
I looked but didn't figure out how to run the yecht tests.
running bundle install with an rvm install of jruby-head now works for me
This fix might be a good reason to roll out a 1.6.2 release soon.
Cherry-picked to 1.6:
commit dd1d9382a72af181e9d3998f2680154ebf1e651c
Author: Ola Bini <ola.bini@gmail.com>
Date: Wed Apr 20 16:00:28 2011 -0500
Fix JRUBY-5581 by updating the Yecht version
Just ran into this too, I believe. How am I to install the rspec 2.6 gem?
$ jruby -S gem install rspec-2.6.0.gem
System.java:-2:in `arraycopy': java.lang.ArrayIndexOutOfBoundsException
from DefaultResolver.java:111:in `makeTime'
from DefaultResolver.java:277:in `create'
from DefaultResolver.java:317:in `handleScalar'
...
Just ran into this too, I believe. How am I to install the rspec 2.6 gem?
In this case, the problem occurs when installing rspec-core 2.6.1. You can work around it by manually installing rspec-core 2.6.0 before installing the rspec metapackage:
$ gem install rspec-core -v 2.6.0 Successfully installed rspec-core-2.6.0 1 gem installed $ gem install rspec Successfully installed rspec-expectations-2.6.0 Successfully installed rspec-mocks-2.6.0 Successfully installed rspec-2.6.0 3 gems installed
In general there isn't a workaround — you just have to find a version of the gem that is not affected by this bug.
Count me in as someone who got bitten. Would love to see this addressed in 1.6.2 earlier rather than later. ![]()
This looks like something blowing up in YAML.