Hi, thanks for going though so much effort. I tried quickly on my mac and the error repeated, so on ubuntu I went though the process of deleting the previous jruby and reinstalling ruote (you can see rufus- cloche was upgraded) but the error repeated. If fix needs to wait for new version of jruby I understand. It's also funny that the message got printed out 3 times now. I does the same thing on my mac when I run the script with ruby.
pushd ~/realtravel/ext/data_local/jruby/jruby-1.4.0/ bin/ docs/ lib/ samples/ share/ tool/ franci...@ubuntu:~/realtravel/rtsite/realtravel.com/lib/ruote$ pushd ~/ realtravel/ext/data_local/jruby/ ~/realtravel/ext/data_local/jruby ~/realtravel/rtsite/realtravel.com/ lib/ruote franci...@ubuntu:~/realtravel/ext/data_local/jruby$ ls -l total 12252 drwxr-xr-x 8 francisco francisco 4096 2010-03-12 10:16 jruby-1.4.0 -rw-r--r-- 1 francisco francisco 12525478 2010-03-12 10:15 jruby- bin-1.4.0.tar.gz franci...@ubuntu:~/realtravel/ext/data_local/jruby$ rm -rf jruby-1.4.0 franci...@ubuntu:~/realtravel/ext/data_local/jruby$ jruby -version -bash: /home/francisco/realtravel/ext/data_local/jruby/jruby-1.4.0/bin/ jruby: No such file or directory franci...@ubuntu:~/realtravel/ext/data_local/jruby$ tar -zxf jruby- bin-1.4.0.tar.gz franci...@ubuntu:~/realtravel/ext/data_local/jruby$ jruby -version jruby 1.4.0 (ruby 1.8.7 patchlevel 174) (2009-11-02 69fbfa3) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_16) [amd64-java] -e:1: undefined local variable or method `rsion' for main:Object (NameError) franci...@ubuntu:~/realtravel/ext/data_local/jruby$ jruby -S gem ^cfranci...@ubuntu:~/realtravel/ext/data_local/jruby$ ^C franci...@ubuntu:~/realtravel/ext/data_local/jruby$ jruby -S gem install ruote jruby-json JRuby limited openssl loaded. gem install jruby-openssl for full support. http://jruby.kenai.com/pages/JRuby_Builtin_OpenSSL Successfully installed rufus-json-0.2.0 Successfully installed rufus-cloche-0.1.16 Successfully installed rufus-dollar-1.0.2 Successfully installed rufus-lru-1.0.3 Successfully installed rufus-mnemo-1.1.1 Successfully installed rufus-scheduler-2.0.5 Successfully installed sexp_processor-3.0.3 Successfully installed ruby_parser-2.0.4 Successfully installed rufus-treechecker-1.0.3 Successfully installed ruote-2.1.7 ERROR: could not find gem jruby-json locally or in a repository 10 gems installed Installing ri documentation for rufus-json-0.2.0... Installing ri documentation for rufus-cloche-0.1.16... Installing ri documentation for rufus-dollar-1.0.2... Installing ri documentation for rufus-lru-1.0.3... Installing ri documentation for rufus-mnemo-1.1.1... Installing ri documentation for rufus-scheduler-2.0.5... Installing ri documentation for sexp_processor-3.0.3... Installing ri documentation for ruby_parser-2.0.4... Installing ri documentation for rufus-treechecker-1.0.3... Installing ri documentation for ruote-2.1.7... Installing RDoc documentation for rufus-json-0.2.0... Installing RDoc documentation for rufus-cloche-0.1.16... Installing RDoc documentation for rufus-dollar-1.0.2... Installing RDoc documentation for rufus-lru-1.0.3... Installing RDoc documentation for rufus-mnemo-1.1.1... Installing RDoc documentation for rufus-scheduler-2.0.5... Installing RDoc documentation for sexp_processor-3.0.3... Installing RDoc documentation for ruby_parser-2.0.4... Installing RDoc documentation for rufus-treechecker-1.0.3... Installing RDoc documentation for ruote-2.1.7... franci...@ubuntu:~/realtravel/ext/data_local/jruby$ jruby -S gem install json-jruby JRuby limited openssl loaded. gem install jruby-openssl for full support. http://jruby.kenai.com/pages/JRuby_Builtin_OpenSSL Successfully installed json-jruby-1.2.3-universal-java-1.6 1 gem installed Installing ri documentation for json-jruby-1.2.3-universal-java-1.6... Installing RDoc documentation for json-jruby-1.2.3-universal- java-1.6... franci...@ubuntu:~/realtravel/ext/data_local/jruby$ popd ~/realtravel/rtsite/realtravel.com/lib/ruote franci...@ubuntu:~/realtravel/rtsite/realtravel.com/lib/ruote$ cat test_ruote.rb require 'rubygems' require 'ruote' require 'ruote/storage/fs_storage' $engine = Ruote::Engine.new(Ruote::Worker.new(Ruote::FsStorage.new('work'))) $engine.register_participant :alpha do |workitem| workitem.fields['message'] = { 'text' => 'hello !', 'author' => 'Alice' } end $engine.register_participant :bravo do |workitem| puts "I received a message from #{workitem.fields['message'] ['author']}" end $engine.variables['sync_process'] = Ruote.process_definition :name => 'sync_process' do alpha bravo end wfid = $engine.launch($engine.variables['sync_process'], {}) puts "done: #{wfid}" outcome = $engine.wait_for(wfid) puts "result: #{outcome}"franci...@ubuntu:~/realtravel/rtsite/ realtravel.com/lib/ruote$ ruby ./test_ruote.rb done: 20100314-besobohodo I received a message from Alice I received a message from Alice I received a message from Alice result: _rev0put_at2010-03-14 17:02:29.405016 UTCwfid20100314- besobohodo_id16162!70215558061860!2010-03-14!1268586149.404999! 029actionterminatedworkitemparticipant_namebravofields__result__authorAlicetexthello ! messageauthorAlicetexthello !feisub_wfidwfid20100314- besobohodoengine_idengineexpid0_1typemsgsfeisub_wfidwfid20100314- besobohodoengine_idengineexpid0 franci...@ubuntu:~/realtravel/rtsite/realtravel.com/lib/ruote$ jruby - S ./test_ruote.rb Exception in thread "Thread-1" java.lang.NullPointerException at org.jruby.RubyFile.flock(RubyFile.java:297) at org.jruby.RubyFile$i_method_1_0$RUBYINVOKER$flock.call(org/jruby/ RubyFile$i_method_1_0$RUBYINVOKER$flock.gen) at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java: 147) at org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57) at org.jruby.ast.IfNode.interpret(IfNode.java:119) at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104) at org.jruby.ast.RescueNode.executeBody(RescueNode.java:225) at org.jruby.ast.RescueNode.interpretWithJavaExceptions(RescueNode.java: 147) at org.jruby.ast.RescueNode.interpret(RescueNode.java:110) at org.jruby.ast.BeginNode.interpret(BeginNode.java:83) at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104) at org.jruby.ast.BlockNode.interpret(BlockNode.java:71) at org.jruby.ast.EnsureNode.interpret(EnsureNode.java:98) at org.jruby.ast.BeginNode.interpret(BeginNode.java:83) at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104) at org.jruby.runtime.InterpretedBlock.evalBlockBody(InterpretedBlock.java: 317) at org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java: 268) at org.jruby.runtime.Block.yield(Block.java:194) at org.jruby.libraries.ThreadLibrary $Mutex.synchronize(ThreadLibrary.java:167) at org.jruby.libraries.ThreadLibrary$Mutex$i_method_0_0$RUBYINVOKER $synchronize.call(org/jruby/libraries/ThreadLibrary$Mutex $i_method_0_0$RUBYINVOKER$synchronize.gen) at org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java: 116) at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java: 123) at org.jruby.ast.CallNoArgBlockNode.interpret(CallNoArgBlockNode.java: 64) at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104) at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java: 266) at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java: 209) at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java: 360) at org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java: 238) at org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java: 253) at org.jruby.ast.FCallThreeArgBlockNode.interpret(FCallThreeArgBlockNode.java: 36) at org.jruby.ast.LocalAsgnNode.interpret(LocalAsgnNode.java:123) at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104) at org.jruby.ast.BlockNode.interpret(BlockNode.java:71) at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java: 173) at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java: 169) at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java: 310) at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java: 149) at org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57) at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104) at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java: 173) at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java: 169) at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java: 310) at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java: 149) at org.jruby.ast.FCallOneArgNode.interpret(FCallOneArgNode.java:36) at org.jruby.ast.CallNoArgNode.interpret(CallNoArgNode.java:61) at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104) at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java: 173) at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java: 169) at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java: 310) at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java: 149) at org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57) at org.jruby.ast.IfNode.interpret(IfNode.java:111) at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104) at org.jruby.ast.BlockNode.interpret(BlockNode.java:71) at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java: 173) at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java: 169) at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java: 310) at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java: 149) at org.jruby.ast.FCallOneArgNode.interpret(FCallOneArgNode.java:36) at org.jruby.ast.LocalAsgnNode.interpret(LocalAsgnNode.java:123) at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104) at org.jruby.ast.BlockNode.interpret(BlockNode.java:71) at org.jruby.ast.WhileNode.interpret(WhileNode.java:131) at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104) at org.jruby.ast.BlockNode.interpret(BlockNode.java:71) at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java: 136) at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java: 153) at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java: 107) at org.jruby.ast.VCallNode.interpret(VCallNode.java:85) at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104) at org.jruby.ast.WhileNode.interpret(WhileNode.java:131) at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104) at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java: 136) at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java: 153) at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java: 290) at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java: 109) at org.jruby.ast.VCallNode.interpret(VCallNode.java:85) at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104) at org.jruby.runtime.InterpretedBlock.evalBlockBody(InterpretedBlock.java: 317) at org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java: 305) at org.jruby.runtime.BlockBody.call(BlockBody.java:72) at org.jruby.runtime.BlockBody.call(BlockBody.java:78) at org.jruby.runtime.Block.call(Block.java:89) at org.jruby.RubyProc.call(RubyProc.java:221) at org.jruby.RubyProc.call(RubyProc.java:204) at org.jruby.internal.runtime.RubyRunnable.run(RubyRunnable.java:94) at java.lang.Thread.run(Thread.java:619) done: 20100314-bodoshisutsu On Mar 13, 10:27 pm, John Mettraux <[email protected]> wrote: > Hello Kiko, > > sorry for the late reply, I had to install Ubuntu somewhere in order > to reproduce the issue. > > The fix is in rufus-cloche 0.1.16 > (http://rubygems.org/gems/rufus-cloche) and in there : > > http://github.com/jmettraux/ruote/commit/8c6b60dfee7dcce79f553d708517... > > That means that your engine initialization line will have to look like : > > ---8<--- > $engine = Ruote::Engine.new(Ruote::Worker.new(Ruote::FsStorage.new('work', > 'cloche_nolock' => true))) > --->8--- > > That will disable flock for your storage. > > This also implies that having concurrent workers for that storage will > not be possible (same restriction as for Windows). > > I don't know if a later version of JRuby will fix the issue (maybe > it's that onehttp://jira.codehaus.org/browse/JRUBY-4386). We'll see. > > Many thanks for reporting the issue. The fix will be part of the > upcoming ruote 2.1.8 release. > > Best regards, > > -- > John Mettraux - http://jmettraux.wordpress.com -- you received this message because you are subscribed to the "ruote users" group. to post : send email to [email protected] to unsubscribe : send email to [email protected] more options : http://groups.google.com/group/openwferu-users?hl=en
