You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Also, the database is in a corrupt state after the error.
Failure:
jruby-1.6.3 :001 > require 'rubygems'
=> true
jruby-1.6.3 :002 > require 'neo4j'
=> true
jruby-1.6.3 :003 > inserter = Neo4j::Batch::Inserter.new
=> #<Neo4j::Batch::Inserter:0xd713fe @rule_inserter=#<Neo4j::Batch::RuleInserter:0x4936f3 @inserter=#<Neo4j::Batch::Inserter:0xd713fe ...>>, @batch_inserter=#<Java::OrgNeo4jKernelImplBatchinsert::BatchInserterImpl:0x118abfe>>
jruby-1.6.3 :004 > node_a = inserter.create_node('name' => 'andreas')
=> 1
jruby-1.6.3 :005 > node_c = inserter.create_node('name' => 'craig')
=> 2
jruby-1.6.3 :006 > inserter.create_rel(:friends, node_a, node_c, :since => '2009') # NOTE: using symbol :since
NativeException: java.lang.ClassCastException: org.jruby.RubySymbol cannot be cast to java.lang.String
from org/neo4j/kernel/impl/batchinsert/BatchInserterImpl.java:419:in `createPropertyChain'
from org/neo4j/kernel/impl/batchinsert/BatchInserterImpl.java:198:in `createRelationship'
from /home/martin/.rvm/gems/jruby-1.6.3@neo/gems/neo4j-1.1.4-java/lib/neo4j/batch/inserter.rb:71:in `create_rel'
from (irb):6:in `evaluate'
from org/jruby/RubyKernel.java:1088:in `eval'
from /home/martin/.rvm/rubies/jruby-1.6.3/lib/ruby/1.8/irb.rb:158:in `eval_input'
from /home/martin/.rvm/rubies/jruby-1.6.3/lib/ruby/1.8/irb.rb:271:in `signal_status'
from /home/martin/.rvm/rubies/jruby-1.6.3/lib/ruby/1.8/irb.rb:155:in `eval_input'
from org/jruby/RubyKernel.java:1419:in `loop'
from org/jruby/RubyKernel.java:1191:in `catch'
from /home/martin/.rvm/rubies/jruby-1.6.3/lib/ruby/1.8/irb.rb:154:in `eval_input'
from /home/martin/.rvm/rubies/jruby-1.6.3/lib/ruby/1.8/irb.rb:71:in `start'
from org/jruby/RubyKernel.java:1191:in `catch'
from /home/martin/.rvm/rubies/jruby-1.6.3/lib/ruby/1.8/irb.rb:70:in `start'
from /home/martin/.rvm/rubies/jruby-1.6.3/bin/jirb:17:in `(root)'
jruby-1.6.3 :007 > inserter.create_rel(:friends, node_a, node_c, 'since' => '2009') # changed from using a symbol to using a string
NativeException: org.neo4j.kernel.impl.nioneo.store.InvalidRecordException: Record[0] not in use
from org/neo4j/kernel/impl/nioneo/store/RelationshipStore.java:229:in `getRecord'
from org/neo4j/kernel/impl/nioneo/store/RelationshipStore.java:96:in `getRecord'
from org/neo4j/kernel/impl/batchinsert/BatchInserterImpl.java:210:in `connectRelationship'
from org/neo4j/kernel/impl/batchinsert/BatchInserterImpl.java:195:in `createRelationship'
from /home/martin/.rvm/gems/jruby-1.6.3@neo/gems/neo4j-1.1.4-java/lib/neo4j/batch/inserter.rb:71:in `create_rel'
from (irb):7:in `evaluate'
from org/jruby/RubyKernel.java:1088:in `eval'
from /home/martin/.rvm/rubies/jruby-1.6.3/lib/ruby/1.8/irb.rb:158:in `eval_input'
from /home/martin/.rvm/rubies/jruby-1.6.3/lib/ruby/1.8/irb.rb:271:in `signal_status'
from /home/martin/.rvm/rubies/jruby-1.6.3/lib/ruby/1.8/irb.rb:155:in `eval_input'
from org/jruby/RubyKernel.java:1419:in `loop'
from org/jruby/RubyKernel.java:1191:in `catch'
from /home/martin/.rvm/rubies/jruby-1.6.3/lib/ruby/1.8/irb.rb:154:in `eval_input'
from /home/martin/.rvm/rubies/jruby-1.6.3/lib/ruby/1.8/irb.rb:71:in `start'
from org/jruby/RubyKernel.java:1191:in `catch'
from /home/martin/.rvm/rubies/jruby-1.6.3/lib/ruby/1.8/irb.rb:70:in `start'
from /home/martin/.rvm/rubies/jruby-1.6.3/bin/jirb:17:in `(root)'
August 11th, 2011 @ 08:18 PM
BTW, in both examples this is starting from a completely blank database (I deleted the Neo4j database directory before each irb session.
Also, the database is in a corrupt state after the error.
Failure:
Success:
http://neo4j.lighthouseapp.com/projects/15548/tickets/178-batchimporter-does-not-alllow-symbol-for-keys-on-relationships
The text was updated successfully, but these errors were encountered: