History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: JRUBY-887
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Ola Bini
Reporter: Morten Christensen
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
JRuby

YAML omap parse problem

Created: 25/Apr/07 02:03 PM   Updated: 21/May/07 12:30 PM
Component/s: None
Affects Version/s: JRuby 0.9.9
Fix Version/s: JRuby 1.0.0RC1

Time Tracking:
Not Specified

Environment: Windows XP + JRuby 0.9.9 + JDK 1.6 + Rails 1.2.3


 Description  « Hide
As reported on the mailing list I get the following problem during a data migration:

rake aborted!
a YAML error occurred parsing ./db/migrate/data/clazzes.yml. Please note that YA
ML must be consistently indented using spaces. Tabs are not allowed. Please have
a look at http://www.yaml.org/faq.html
The exact error was:
NativeException: org.jvyamlb.ConstructorException: ConstructorException null w
e had this expected a mapping node, but found org.jvyamlb.nodes.SequenceNode
C:/javalibs/jruby-0.9.9/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_re
cord/fixtures.rb:308:in `read_fixture_files'
C:/javalibs/jruby-0.9.9/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_re
cord/fixtures.rb:281:in `initialize'
C:/javalibs/jruby-0.9.9/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_re
cord/fixtures.rb:251:in `new'
C:/javalibs/jruby-0.9.9/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_re
cord/fixtures.rb:251:in `create_fixtures'
./db/migrate//005_populate_lookup_data.rb:12:in `map'
C:/javalibs/jruby-0.9.9/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_re
cord/fixtures.rb:252:in `create_fixtures'
./db/migrate//005_populate_lookup_data.rb:12:in `silence'
C:/javalibs/jruby-0.9.9/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_re
cord/fixtures.rb:268:in `create_fixtures'
./db/migrate//005_populate_lookup_data.rb:12:in `up'
C:/javalibs/jruby-0.9.9/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_re
cord/migration.rb:211:in `send'
C:/javalibs/jruby-0.9.9/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_re
cord/migration.rb:211:in `migrate'
C:/javalibs/jruby-0.9.9/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_re
cord/migration.rb:335:in `measure'
C:/javalibs/jruby-0.9.9/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_re
cord/migration.rb:213:in `migrate'
C:/javalibs/jruby-0.9.9/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_re
cord/migration.rb:335:in `migrate'
C:/javalibs/jruby-0.9.9/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_re
cord/migration.rb:297:in `each'
C:/javalibs/jruby-0.9.9/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_re
cord/migration.rb:337:in `migrate'
C:/javalibs/jruby-0.9.9/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_re
cord/migration.rb:297:in `up'
C:/javalibs/jruby-0.9.9/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_re
cord/migration.rb:288:in `migrate'
C:/javalibs/jruby-0.9.9/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/tasks/databases.r
ake:4
C:/javalibs/jruby-0.9.9/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/tasks/rails.rb:3:
in `call'
C:/javalibs/jruby-0.9.9/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:391:in `ex
ecute'
C:/javalibs/jruby-0.9.9/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:362:in `ea
ch'
C:/javalibs/jruby-0.9.9/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:392:in `ex
ecute'
C:/javalibs/jruby-0.9.9/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:362:in `in
voke'
C:/javalibs/jruby-0.9.9/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1738:in `s
ynchronize'
C:/javalibs/jruby-0.9.9/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:363:in `in
voke'
C:/javalibs/jruby-0.9.9/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1738:in `t
op_level'
C:/javalibs/jruby-0.9.9/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1711:in `e
ach'
C:/javalibs/jruby-0.9.9/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1739:in `t
op_level'
C:/javalibs/jruby-0.9.9/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1711:in `s
tandard_exception_handling'
C:/javalibs/jruby-0.9.9/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1741:in `t
op_level'
C:/javalibs/jruby-0.9.9/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1711:in `r
un'
C:/javalibs/jruby-0.9.9/lib/ruby/gems/1.8/gems/rake-0.7.3/bin/rake:7:in `standar
d_exception_handling'
C:/javalibs/jruby-0.9.9/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1712:in `r
un'
C:/javalibs/jruby-0.9.9/lib/ruby/gems/1.8/gems/rake-0.7.3/bin/rake:7
C:/javalibs/jruby-0.9.9/bin/rake:16:in `load'
C:/javalibs/jruby-0.9.9/bin/rake:16"



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Morten Christensen - 25/Apr/07 02:11 PM
For reference the clazzes.yml file looks like this:

"
— !omap

  1. — Top level — :
  • genre:
    id: &genre_id 1
    name: Genre
    updated_at: 2007-03-25 00:00:00
    created_at: 2007-03-25 00:00:00
  1. — categories — :
  • subg:
    id: &sf_id 2
    name: Subgenre
    parent_id: *genre_id
  1. ..."

Ola Bini - 28/Apr/07 03:11 AM
All YAML errors should be fixed for 1.0, since YAML is quite central to many systems.

Ola Bini - 28/Apr/07 03:43 AM
Fixed by implementing Omap handling correctly.

Charles Oliver Nutter - 06/May/07 09:49 PM
Closing for 1.0RC1

Morten Christensen - 21/May/07 12:30 PM
Yes this is indeed fixed. I have tried my yaml example and it works fine now in RC2 now!