From rjb-users at rubyforge.org Sat Nov 10 07:27:11 2007 From: rjb-users at rubyforge.org (rjb-users at rubyforge.org) Date: Sat, 10 Nov 2007 13:27:11 +0100 Subject: [rjb-users] can't create Java VM Message-ID: <857ffc970711100427q742f9919n14d462f76fdb992b@mail.gmail.com> Hi, I have the following code: require 'rjb' Rjb::load('lib/itext-2.0.6.jar') When I run it under Windows, it works fine. But when I run it on my production Linux box, a get the error: can't create Java VM I did some searching on Google and it turns out, I have to set JAVA_HOME and LD_LIBRARY_PATH. I have set both variables in Linux and in my environment.rb file. But it still doesn't work. I'm using Litespeed as my webserver (so no Mongrel). Hope somebody can tell me what is wrong. Thanks. Kind regards, Nick From rjb-users at rubyforge.org Sat Nov 10 08:52:29 2007 From: rjb-users at rubyforge.org (rjb-users at rubyforge.org) Date: Sat, 10 Nov 2007 22:52:29 +0900 Subject: [rjb-users] can't create Java VM In-Reply-To: <857ffc970711100427q742f9919n14d462f76fdb992b@mail.gmail.com> References: <857ffc970711100427q742f9919n14d462f76fdb992b@mail.gmail.com> Message-ID: <20071110224136.E026.ARTON@e07.itscom.net> Hi, Does Litespeed run in your permission ? In other words, it's launched in /etc/init.d when the box is booting up ? If so, you have to set JAVA_HOME and LD_LIBRAY_PATH in your startup shell (/etc/init.d/litespeed etc, I don't know exact name). If it's not the correct answer, please get the log after setting $DEBUG = true on the first line of your config/environment.rb. And get the exception information please. Regards On Sat, 10 Nov 2007 13:27:11 +0100 rjb-users at rubyforge.orgさん wrote: > Hi, > > I have the following code: > > require 'rjb' > Rjb::load('lib/itext-2.0.6.jar') > > When I run it under Windows, it works fine. But when I run it on my > production Linux box, a get the error: > > can't create Java VM > > I did some searching on Google and it turns out, I have to set > JAVA_HOME and LD_LIBRARY_PATH. I have set both variables in Linux and > in my environment.rb file. But it still doesn't work. I'm using > Litespeed as my webserver (so no Mongrel). Hope somebody can tell me > what is wrong. Thanks. > > Kind regards, > > Nick > _______________________________________________ > rjb-users mailing list > rjb-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rjb-users -- arton From rjb-users at rubyforge.org Sat Nov 10 15:08:59 2007 From: rjb-users at rubyforge.org (rjb-users at rubyforge.org) Date: Sat, 10 Nov 2007 21:08:59 +0100 Subject: [rjb-users] can't create Java VM In-Reply-To: <20071110224136.E026.ARTON@e07.itscom.net> References: <857ffc970711100427q742f9919n14d462f76fdb992b@mail.gmail.com> <20071110224136.E026.ARTON@e07.itscom.net> Message-ID: <857ffc970711101208m68c92866i50b410a80526c9d6@mail.gmail.com> Hi, it didn't work. Litespeed is launched when mye server starts up. So I have added JAVA_HOME and LD_LIBRARY_PATH to the startup script of Litespeed. After that I have restarted Litespeed. It didn't work. So I added $DEBUG = true to environment.rb. That didn't work, my application didn't work anymore. So I added DEBUG = true (which probably isn't correct). BTW I'm using Rails 1.1.6. Below is the error message: RuntimeError (can't create Java VM): .//app/models/pdf.rb:2:in `load' .//app/models/pdf.rb:2 /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:in `require' /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:65:in `require_or_load' /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:30:in `depend_on' /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:85:in `require_dependency' /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:98:in `const_missing' /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:131:in `const_missing' /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:133:in `const_missing' .//app/controllers/order_controller.rb:247:in `create_factuur' .//app/controllers/order_controller.rb:210:in `process_order' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:941:in `perform_action_without_filters' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/filters.rb:368:in `perform_action_without_benchmark' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/benchmarking.rb:69:in `perform_action_without_rescue' /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/benchmarking.rb:69:in `perform_action_without_rescue' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/rescue.rb:82:in `perform_action' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:408:in `process_without_filters' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/filters.rb:377:in `process_without_session_management_support' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/session_management.rb:117:in `process' /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/dispatcher.rb:38:in `dispatch' /usr/local/lsws/fcgi-bin/RailsRunner.rb:24 Line 2 equals Rjb::load('lib/itext-2.0.6.jar'). Don't know where to get the log of the debug. Hope this tells you something more. Thanks. Kind regards, Nick On Nov 10, 2007 2:52 PM, wrote: > Hi, > > Does Litespeed run in your permission ? In other words, it's launched in > /etc/init.d when the box is booting up ? > If so, you have to set JAVA_HOME and LD_LIBRAY_PATH in your startup > shell (/etc/init.d/litespeed etc, I don't know exact name). > If it's not the correct answer, please get the log after setting > $DEBUG = true > on the first line of your config/environment.rb. And get the exception > information please. > > Regards > > > On Sat, 10 Nov 2007 13:27:11 +0100 > rjb-users at rubyforge.orgさん wrote: > > > Hi, > > > > I have the following code: > > > > require 'rjb' > > Rjb::load('lib/itext-2.0.6.jar') > > > > When I run it under Windows, it works fine. But when I run it on my > > production Linux box, a get the error: > > > > can't create Java VM > > > > I did some searching on Google and it turns out, I have to set > > JAVA_HOME and LD_LIBRARY_PATH. I have set both variables in Linux and > > in my environment.rb file. But it still doesn't work. I'm using > > Litespeed as my webserver (so no Mongrel). Hope somebody can tell me > > what is wrong. Thanks. > > > > Kind regards, > > > > Nick > > _______________________________________________ > > rjb-users mailing list > > rjb-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/rjb-users > > -- > arton > > > _______________________________________________ > rjb-users mailing list > rjb-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rjb-users > > From rjb-users at rubyforge.org Sat Nov 10 17:18:53 2007 From: rjb-users at rubyforge.org (rjb-users at rubyforge.org) Date: Sat, 10 Nov 2007 14:18:53 -0800 (PST) Subject: [rjb-users] can't create Java VM In-Reply-To: <857ffc970711101208m68c92866i50b410a80526c9d6@mail.gmail.com> Message-ID: <796948.21707.qm@web34201.mail.mud.yahoo.com> Hello Nick, By any chance, do you have an AMD64 box? If so, you also need to set LD_PRELOAD: http://arton.no-ip.info/collabo/backyard/?RubyJavaBridge Cheers, Rich --- rjb-users at rubyforge.org wrote: > Hi, > > it didn't work. Litespeed is launched when mye > server starts up. So I > have added JAVA_HOME and LD_LIBRARY_PATH to the > startup script of > Litespeed. After that I have restarted Litespeed. It > didn't work. > > So I added $DEBUG = true to environment.rb. That > didn't work, my > application didn't work anymore. So I added DEBUG = > true (which > probably isn't correct). BTW I'm using Rails 1.1.6. > Below is the error > message: > > RuntimeError (can't create Java VM): > .//app/models/pdf.rb:2:in `load' > .//app/models/pdf.rb:2 > > /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in > `require' > > /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:in > `require' > > /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:65:in > `require_or_load' > > /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:30:in > `depend_on' > > /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:85:in > `require_dependency' > > /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:98:in > `const_missing' > > /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:131:in > `const_missing' > > /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:133:in > `const_missing' > .//app/controllers/order_controller.rb:247:in > `create_factuur' > .//app/controllers/order_controller.rb:210:in > `process_order' > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:941:in > `perform_action_without_filters' > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/filters.rb:368:in > `perform_action_without_benchmark' > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/benchmarking.rb:69:in > `perform_action_without_rescue' > /usr/local/lib/ruby/1.8/benchmark.rb:293:in > `measure' > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/benchmarking.rb:69:in > `perform_action_without_rescue' > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/rescue.rb:82:in > `perform_action' > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:408:in > `process_without_filters' > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/filters.rb:377:in > `process_without_session_management_support' > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/session_management.rb:117:in > `process' > > /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/dispatcher.rb:38:in > `dispatch' > /usr/local/lsws/fcgi-bin/RailsRunner.rb:24 > > Line 2 equals Rjb::load('lib/itext-2.0.6.jar'). > Don't know where to > get the log of the debug. Hope this tells you > something more. Thanks. > > Kind regards, > > Nick > > On Nov 10, 2007 2:52 PM, > wrote: > > Hi, > > > > Does Litespeed run in your permission ? In other > words, it's launched in > > /etc/init.d when the box is booting up ? > > If so, you have to set JAVA_HOME and > LD_LIBRAY_PATH in your startup > > shell (/etc/init.d/litespeed etc, I don't know > exact name). > > If it's not the correct answer, please get the log > after setting > > $DEBUG = true > > on the first line of your config/environment.rb. > And get the exception > > information please. > > > > Regards > > > > > > On Sat, 10 Nov 2007 13:27:11 +0100 > > rjb-users at rubyforge.org???? wrote: > > > > > Hi, > > > > > > I have the following code: > > > > > > require 'rjb' > > > Rjb::load('lib/itext-2.0.6.jar') > > > > > > When I run it under Windows, it works fine. But > when I run it on my > > > production Linux box, a get the error: > > > > > > can't create Java VM > > > > > > I did some searching on Google and it turns out, > I have to set > > > JAVA_HOME and LD_LIBRARY_PATH. I have set both > variables in Linux and > > > in my environment.rb file. But it still doesn't > work. I'm using > > > Litespeed as my webserver (so no Mongrel). Hope > somebody can tell me > > > what is wrong. Thanks. > > > > > > Kind regards, > > > > > > Nick > > > _______________________________________________ > > > rjb-users mailing list > > > rjb-users at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/rjb-users > > > > -- > > arton > > > > > > _______________________________________________ > > rjb-users mailing list > > rjb-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/rjb-users > > > > > > _______________________________________________ > rjb-users mailing list > rjb-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rjb-users > ___________________________________ Richard L. Apodaca http://depth-first.com Blog http://metamolecular.com Company From rjb-users at rubyforge.org Sat Nov 10 20:17:17 2007 From: rjb-users at rubyforge.org (rjb-users at rubyforge.org) Date: Sun, 11 Nov 2007 10:17:17 +0900 Subject: [rjb-users] can't create Java VM In-Reply-To: <796948.21707.qm@web34201.mail.mud.yahoo.com> References: <857ffc970711101208m68c92866i50b410a80526c9d6@mail.gmail.com> <796948.21707.qm@web34201.mail.mud.yahoo.com> Message-ID: <20071111100826.E02B.ARTON@e07.itscom.net> Hi, Thanks Rich for your advice. I've forgotten it and it's possible. BTW, please create and run the reproductive small script or interractive console. For example, entering your application's directory and hit script/console -- script/console start to prompt, then hit $DEBUG=true --- and hit (or before enter the code, you need to enter require 'rjb') Rjb::load('lib/... It must show the some stack traces or the exception information to the console, then copy and paste to you mail. Best regards. On Sat, 10 Nov 2007 14:18:53 -0800 (PST) rjb-users at rubyforge.orgさん wrote: > Hello Nick, > > By any chance, do you have an AMD64 box? If so, you > also need to set LD_PRELOAD: > > http://arton.no-ip.info/collabo/backyard/?RubyJavaBridge > > Cheers, > Rich > > --- rjb-users at rubyforge.org wrote: > > > Hi, > > > > it didn't work. Litespeed is launched when mye > > server starts up. So I > > have added JAVA_HOME and LD_LIBRARY_PATH to the > > startup script of > > Litespeed. After that I have restarted Litespeed. It > > didn't work. > > > > So I added $DEBUG = true to environment.rb. That > > didn't work, my > > application didn't work anymore. So I added DEBUG = > > true (which > > probably isn't correct). BTW I'm using Rails 1.1.6. > > Below is the error > > message: > > > > RuntimeError (can't create Java VM): > > .//app/models/pdf.rb:2:in `load' > > .//app/models/pdf.rb:2 > > > > > /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in > > `require' > > > > > /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:in > > `require' > > > > > /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:65:in > > `require_or_load' > > > > > /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:30:in > > `depend_on' > > > > > /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:85:in > > `require_dependency' > > > > > /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:98:in > > `const_missing' > > > > > /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:131:in > > `const_missing' > > > > > /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:133:in > > `const_missing' > > .//app/controllers/order_controller.rb:247:in > > `create_factuur' > > .//app/controllers/order_controller.rb:210:in > > `process_order' > > > > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:941:in > > `perform_action_without_filters' > > > > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/filters.rb:368:in > > `perform_action_without_benchmark' > > > > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/benchmarking.rb:69:in > > `perform_action_without_rescue' > > /usr/local/lib/ruby/1.8/benchmark.rb:293:in > > `measure' > > > > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/benchmarking.rb:69:in > > `perform_action_without_rescue' > > > > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/rescue.rb:82:in > > `perform_action' > > > > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:408:in > > `process_without_filters' > > > > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/filters.rb:377:in > > `process_without_session_management_support' > > > > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/session_management.rb:117:in > > `process' > > > > > /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/dispatcher.rb:38:in > > `dispatch' > > /usr/local/lsws/fcgi-bin/RailsRunner.rb:24 > > > > Line 2 equals Rjb::load('lib/itext-2.0.6.jar'). > > Don't know where to > > get the log of the debug. Hope this tells you > > something more. Thanks. > > > > Kind regards, > > > > Nick > > > > On Nov 10, 2007 2:52 PM, > > wrote: > > > Hi, > > > > > > Does Litespeed run in your permission ? In other > > words, it's launched in > > > /etc/init.d when the box is booting up ? > > > If so, you have to set JAVA_HOME and > > LD_LIBRAY_PATH in your startup > > > shell (/etc/init.d/litespeed etc, I don't know > > exact name). > > > If it's not the correct answer, please get the log > > after setting > > > $DEBUG = true > > > on the first line of your config/environment.rb. > > And get the exception > > > information please. > > > > > > Regards > > > > > > > > > On Sat, 10 Nov 2007 13:27:11 +0100 > > > rjb-users at rubyforge.org、オ、s wrote: > > > > > > > Hi, > > > > > > > > I have the following code: > > > > > > > > require 'rjb' > > > > Rjb::load('lib/itext-2.0.6.jar') > > > > > > > > When I run it under Windows, it works fine. But > > when I run it on my > > > > production Linux box, a get the error: > > > > > > > > can't create Java VM > > > > > > > > I did some searching on Google and it turns out, > > I have to set > > > > JAVA_HOME and LD_LIBRARY_PATH. I have set both > > variables in Linux and > > > > in my environment.rb file. But it still doesn't > > work. I'm using > > > > Litespeed as my webserver (so no Mongrel). Hope > > somebody can tell me > > > > what is wrong. Thanks. > > > > > > > > Kind regards, > > > > > > > > Nick > > > > _______________________________________________ > > > > rjb-users mailing list > > > > rjb-users at rubyforge.org > > > > http://rubyforge.org/mailman/listinfo/rjb-users > > > > > > -- > > > arton > > > > > > > > > _______________________________________________ > > > rjb-users mailing list > > > rjb-users at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/rjb-users > > > > > > > > > _______________________________________________ > > rjb-users mailing list > > rjb-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/rjb-users > > > > > ___________________________________ > > Richard L. Apodaca > > http://depth-first.com Blog > http://metamolecular.com Company > _______________________________________________ > rjb-users mailing list > rjb-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rjb-users -- arton From rjb-users at rubyforge.org Sat Nov 10 20:29:41 2007 From: rjb-users at rubyforge.org (rjb-users at rubyforge.org) Date: Sun, 11 Nov 2007 10:29:41 +0900 Subject: [rjb-users] can't create Java VM In-Reply-To: <20071111100826.E02B.ARTON@e07.itscom.net> References: <796948.21707.qm@web34201.mail.mud.yahoo.com> <20071111100826.E02B.ARTON@e07.itscom.net> Message-ID: <20071111102551.E02E.ARTON@e07.itscom.net> Or it may need to specify full path name ? Rjb::load("#{File.exapnd_path(RAILS_ROOT)}/lib/...") -- arton From rjb-users at rubyforge.org Sun Nov 11 07:28:50 2007 From: rjb-users at rubyforge.org (rjb-users at rubyforge.org) Date: Sun, 11 Nov 2007 13:28:50 +0100 Subject: [rjb-users] can't create Java VM In-Reply-To: <20071111100826.E02B.ARTON@e07.itscom.net> References: <857ffc970711101208m68c92866i50b410a80526c9d6@mail.gmail.com> <796948.21707.qm@web34201.mail.mud.yahoo.com> <20071111100826.E02B.ARTON@e07.itscom.net> Message-ID: <857ffc970711110428j4f6feb6dk59d0a08eee1ba270@mail.gmail.com> Hi, below is the output from my IRB session. # ruby script/console Loading development environment. >> $DEBUG=true => true >> require 'rjb' Exception `MissingSourceFile' at /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27 - no such file to load -- rjb => true >> Rjb::load('lib/itext-2.0.6.jar') => nil >> I have done a gem install rjb, and have version 1.0.11 installed. Hope this helps sole the problem. Thanks. Kind regards, Nick On Nov 11, 2007 2:17 AM, wrote: > Hi, > > Thanks Rich for your advice. I've forgotten it and it's possible. > > BTW, please create and run the reproductive small script or interractive > console. > For example, entering your application's directory and hit > script/console > -- script/console start to prompt, then hit > $DEBUG=true > --- and hit (or before enter the code, you need to enter require 'rjb') > Rjb::load('lib/... > > It must show the some stack traces or the exception information to the > console, then copy and paste to you mail. > > Best regards. > > On Sat, 10 Nov 2007 14:18:53 -0800 (PST) > rjb-users at rubyforge.orgさん wrote: > > > > Hello Nick, > > > > By any chance, do you have an AMD64 box? If so, you > > also need to set LD_PRELOAD: > > > > http://arton.no-ip.info/collabo/backyard/?RubyJavaBridge > > > > Cheers, > > Rich > > > > --- rjb-users at rubyforge.org wrote: > > > > > Hi, > > > > > > it didn't work. Litespeed is launched when mye > > > server starts up. So I > > > have added JAVA_HOME and LD_LIBRARY_PATH to the > > > startup script of > > > Litespeed. After that I have restarted Litespeed. It > > > didn't work. > > > > > > So I added $DEBUG = true to environment.rb. That > > > didn't work, my > > > application didn't work anymore. So I added DEBUG = > > > true (which > > > probably isn't correct). BTW I'm using Rails 1.1.6. > > > Below is the error > > > message: > > > > > > RuntimeError (can't create Java VM): > > > .//app/models/pdf.rb:2:in `load' > > > .//app/models/pdf.rb:2 > > > > > > > > /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in > > > `require' > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:in > > > `require' > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:65:in > > > `require_or_load' > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:30:in > > > `depend_on' > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:85:in > > > `require_dependency' > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:98:in > > > `const_missing' > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:131:in > > > `const_missing' > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:133:in > > > `const_missing' > > > .//app/controllers/order_controller.rb:247:in > > > `create_factuur' > > > .//app/controllers/order_controller.rb:210:in > > > `process_order' > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:941:in > > > `perform_action_without_filters' > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/filters.rb:368:in > > > `perform_action_without_benchmark' > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/benchmarking.rb:69:in > > > `perform_action_without_rescue' > > > /usr/local/lib/ruby/1.8/benchmark.rb:293:in > > > `measure' > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/benchmarking.rb:69:in > > > `perform_action_without_rescue' > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/rescue.rb:82:in > > > `perform_action' > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:408:in > > > `process_without_filters' > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/filters.rb:377:in > > > `process_without_session_management_support' > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/session_management.rb:117:in > > > `process' > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/dispatcher.rb:38:in > > > `dispatch' > > > /usr/local/lsws/fcgi-bin/RailsRunner.rb:24 > > > > > > Line 2 equals Rjb::load('lib/itext-2.0.6.jar'). > > > Don't know where to > > > get the log of the debug. Hope this tells you > > > something more. Thanks. > > > > > > Kind regards, > > > > > > Nick > > > > > > On Nov 10, 2007 2:52 PM, > > > wrote: > > > > Hi, > > > > > > > > Does Litespeed run in your permission ? In other > > > words, it's launched in > > > > /etc/init.d when the box is booting up ? > > > > If so, you have to set JAVA_HOME and > > > LD_LIBRAY_PATH in your startup > > > > shell (/etc/init.d/litespeed etc, I don't know > > > exact name). > > > > If it's not the correct answer, please get the log > > > after setting > > > > $DEBUG = true > > > > on the first line of your config/environment.rb. > > > And get the exception > > > > information please. > > > > > > > > Regards > > > > > > > > > > > > On Sat, 10 Nov 2007 13:27:11 +0100 > > > > > rjb-users at rubyforge.org、オ、 s wrote: > > > > > > > > > Hi, > > > > > > > > > > I have the following code: > > > > > > > > > > require 'rjb' > > > > > Rjb::load('lib/itext-2.0.6.jar') > > > > > > > > > > When I run it under Windows, it works fine. But > > > when I run it on my > > > > > production Linux box, a get the error: > > > > > > > > > > can't create Java VM > > > > > > > > > > I did some searching on Google and it turns out, > > > I have to set > > > > > JAVA_HOME and LD_LIBRARY_PATH. I have set both > > > variables in Linux and > > > > > in my environment.rb file. But it still doesn't > > > work. I'm using > > > > > Litespeed as my webserver (so no Mongrel). Hope > > > somebody can tell me > > > > > what is wrong. Thanks. > > > > > > > > > > Kind regards, > > > > > > > > > > Nick > > > > > _______________________________________________ > > > > > rjb-users mailing list > > > > > rjb-users at rubyforge.org > > > > > http://rubyforge.org/mailman/listinfo/rjb-users > > > > > > > > -- > > > > arton > > > > > > > > > > > > _______________________________________________ > > > > rjb-users mailing list > > > > rjb-users at rubyforge.org > > > > http://rubyforge.org/mailman/listinfo/rjb-users > > > > > > > > > > > > _______________________________________________ > > > rjb-users mailing list > > > rjb-users at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/rjb-users > > > > > > > > > ___________________________________ > > > > Richard L. Apodaca > > > > http://depth-first.com Blog > > http://metamolecular.com Company > > _______________________________________________ > > rjb-users mailing list > > rjb-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/rjb-users > > -- > arton > > > _______________________________________________ > rjb-users mailing list > rjb-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rjb-users > > From rjb-users at rubyforge.org Sun Nov 11 07:55:41 2007 From: rjb-users at rubyforge.org (rjb-users at rubyforge.org) Date: Sun, 11 Nov 2007 21:55:41 +0900 Subject: [rjb-users] can't create Java VM In-Reply-To: <857ffc970711110428j4f6feb6dk59d0a08eee1ba270@mail.gmail.com> References: <20071111100826.E02B.ARTON@e07.itscom.net> <857ffc970711110428j4f6feb6dk59d0a08eee1ba270@mail.gmail.com> Message-ID: <20071111213929.E031.ARTON@e07.itscom.net> Hi, It seems fine your environment. The message 'no such file to load ...' is only RubyGem's debugging message because $DEBUG set to true, and rjb was successfuly loaded. Then, another question is: have you ever try to sciprt/server for testing ? and in the testing environment Rjb can create jvm ? If so, the problem is caused by Litehttpd's environment. Does Litehttpd use FastCGI ? If so, you need to set the environment variables such JAVA_HOME etc, in the FastCGI process, I think, because the FastCGI process is separated from the parent (Web server's process). Best regards On Sun, 11 Nov 2007 13:28:50 +0100 rjb-users at rubyforge.orgさん wrote: > Hi, > > below is the output from my IRB session. > > # ruby script/console > Loading development environment. > >> $DEBUG=true > => true > >> require 'rjb' > Exception `MissingSourceFile' at > /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27 - no > such file to load -- rjb > => true > >> Rjb::load('lib/itext-2.0.6.jar') > => nil > >> > > I have done a gem install rjb, and have version 1.0.11 installed. Hope > this helps sole the problem. Thanks. > > Kind regards, > > Nick > > > > On Nov 11, 2007 2:17 AM, wrote: > > Hi, > > > > Thanks Rich for your advice. I've forgotten it and it's possible. > > > > BTW, please create and run the reproductive small script or interractive > > console. > > For example, entering your application's directory and hit > > script/console > > -- script/console start to prompt, then hit > > $DEBUG=true > > --- and hit (or before enter the code, you need to enter require 'rjb') > > Rjb::load('lib/... > > > > It must show the some stack traces or the exception information to the > > console, then copy and paste to you mail. > > > > Best regards. > > > > On Sat, 10 Nov 2007 14:18:53 -0800 (PST) > > rjb-users at rubyforge.orgさん wrote: > > > > > > > Hello Nick, > > > > > > By any chance, do you have an AMD64 box? If so, you > > > also need to set LD_PRELOAD: > > > > > > http://arton.no-ip.info/collabo/backyard/?RubyJavaBridge > > > > > > Cheers, > > > Rich > > > > > > --- rjb-users at rubyforge.org wrote: > > > > > > > Hi, > > > > > > > > it didn't work. Litespeed is launched when mye > > > > server starts up. So I > > > > have added JAVA_HOME and LD_LIBRARY_PATH to the > > > > startup script of > > > > Litespeed. After that I have restarted Litespeed. It > > > > didn't work. > > > > > > > > So I added $DEBUG = true to environment.rb. That > > > > didn't work, my > > > > application didn't work anymore. So I added DEBUG = > > > > true (which > > > > probably isn't correct). BTW I'm using Rails 1.1.6. > > > > Below is the error > > > > message: > > > > > > > > RuntimeError (can't create Java VM): > > > > .//app/models/pdf.rb:2:in `load' > > > > .//app/models/pdf.rb:2 > > > > > > > > > > > /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in > > > > `require' > > > > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:in > > > > `require' > > > > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:65:in > > > > `require_or_load' > > > > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:30:in > > > > `depend_on' > > > > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:85:in > > > > `require_dependency' > > > > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:98:in > > > > `const_missing' > > > > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:131:in > > > > `const_missing' > > > > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:133:in > > > > `const_missing' > > > > .//app/controllers/order_controller.rb:247:in > > > > `create_factuur' > > > > .//app/controllers/order_controller.rb:210:in > > > > `process_order' > > > > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:941:in > > > > `perform_action_without_filters' > > > > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/filters.rb:368:in > > > > `perform_action_without_benchmark' > > > > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/benchmarking.rb:69:in > > > > `perform_action_without_rescue' > > > > /usr/local/lib/ruby/1.8/benchmark.rb:293:in > > > > `measure' > > > > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/benchmarking.rb:69:in > > > > `perform_action_without_rescue' > > > > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/rescue.rb:82:in > > > > `perform_action' > > > > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:408:in > > > > `process_without_filters' > > > > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/filters.rb:377:in > > > > `process_without_session_management_support' > > > > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/session_management.rb:117:in > > > > `process' > > > > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/dispatcher.rb:38:in > > > > `dispatch' > > > > /usr/local/lsws/fcgi-bin/RailsRunner.rb:24 > > > > > > > > Line 2 equals Rjb::load('lib/itext-2.0.6.jar'). > > > > Don't know where to > > > > get the log of the debug. Hope this tells you > > > > something more. Thanks. > > > > > > > > Kind regards, > > > > > > > > Nick > > > > > > > > On Nov 10, 2007 2:52 PM, > > > > wrote: > > > > > Hi, > > > > > > > > > > Does Litespeed run in your permission ? In other > > > > words, it's launched in > > > > > /etc/init.d when the box is booting up ? > > > > > If so, you have to set JAVA_HOME and > > > > LD_LIBRAY_PATH in your startup > > > > > shell (/etc/init.d/litespeed etc, I don't know > > > > exact name). > > > > > If it's not the correct answer, please get the log > > > > after setting > > > > > $DEBUG = true > > > > > on the first line of your config/environment.rb. > > > > And get the exception > > > > > information please. > > > > > > > > > > Regards > > > > > > > > > > > > > > > On Sat, 10 Nov 2007 13:27:11 +0100 > > > > > > > rjb-users at rubyforge.org、オ、 s wrote: > > > > > > > > > > > Hi, > > > > > > > > > > > > I have the following code: > > > > > > > > > > > > require 'rjb' > > > > > > Rjb::load('lib/itext-2.0.6.jar') > > > > > > > > > > > > When I run it under Windows, it works fine. But > > > > when I run it on my > > > > > > production Linux box, a get the error: > > > > > > > > > > > > can't create Java VM > > > > > > > > > > > > I did some searching on Google and it turns out, > > > > I have to set > > > > > > JAVA_HOME and LD_LIBRARY_PATH. I have set both > > > > variables in Linux and > > > > > > in my environment.rb file. But it still doesn't > > > > work. I'm using > > > > > > Litespeed as my webserver (so no Mongrel). Hope > > > > somebody can tell me > > > > > > what is wrong. Thanks. > > > > > > > > > > > > Kind regards, > > > > > > > > > > > > Nick > > > > > > _______________________________________________ > > > > > > rjb-users mailing list > > > > > > rjb-users at rubyforge.org > > > > > > http://rubyforge.org/mailman/listinfo/rjb-users > > > > > > > > > > -- > > > > > arton > > > > > > > > > > > > > > > _______________________________________________ > > > > > rjb-users mailing list > > > > > rjb-users at rubyforge.org > > > > > http://rubyforge.org/mailman/listinfo/rjb-users > > > > > > > > > > > > > > > _______________________________________________ > > > > rjb-users mailing list > > > > rjb-users at rubyforge.org > > > > http://rubyforge.org/mailman/listinfo/rjb-users > > > > > > > > > > > > > ___________________________________ > > > > > > Richard L. Apodaca > > > > > > http://depth-first.com Blog > > > http://metamolecular.com Company > > > _______________________________________________ > > > rjb-users mailing list > > > rjb-users at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/rjb-users > > > > -- > > arton > > > > > > _______________________________________________ > > rjb-users mailing list > > rjb-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/rjb-users > > > > -- arton From rjb-users at rubyforge.org Sun Nov 11 07:59:22 2007 From: rjb-users at rubyforge.org (rjb-users at rubyforge.org) Date: Sun, 11 Nov 2007 21:59:22 +0900 Subject: [rjb-users] can't create Java VM In-Reply-To: <20071111213929.E031.ARTON@e07.itscom.net> References: <857ffc970711110428j4f6feb6dk59d0a08eee1ba270@mail.gmail.com> <20071111213929.E031.ARTON@e07.itscom.net> Message-ID: <20071111215724.E034.ARTON@e07.itscom.net> Hi I'm not sure Litehttpd's configuration file, but I suppose it compatible to Apache. If so, http://www.fastcgi.com/archives/fastcgi-developers/2000-August/000389.html tells that SetEnv JAVA_HOME and SetEnv LD_LIBRARY_PATH are needed in you httpd.conf Reagards. On Sun, 11 Nov 2007 21:55:41 +0900 rjb-users at rubyforge.orgさん wrote: > Hi, > > It seems fine your environment. > The message 'no such file to load ...' is only RubyGem's debugging > message because $DEBUG set to true, and rjb was successfuly loaded. > Then, another question is: have you ever try to sciprt/server for > testing ? and in the testing environment Rjb can create jvm ? > If so, the problem is caused by Litehttpd's environment. > Does Litehttpd use FastCGI ? If so, you need to set the environment > variables such JAVA_HOME etc, in the FastCGI process, I think, because > the FastCGI process is separated from the parent (Web server's process). > > Best regards > > On Sun, 11 Nov 2007 13:28:50 +0100 > rjb-users at rubyforge.orgさん wrote: > > > Hi, > > > > below is the output from my IRB session. > > > > # ruby script/console > > Loading development environment. > > >> $DEBUG=true > > => true > > >> require 'rjb' > > Exception `MissingSourceFile' at > > /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27 - no > > such file to load -- rjb > > => true > > >> Rjb::load('lib/itext-2.0.6.jar') > > => nil > > >> > > > > I have done a gem install rjb, and have version 1.0.11 installed. Hope > > this helps sole the problem. Thanks. > > > > Kind regards, > > > > Nick > > > > > > > > On Nov 11, 2007 2:17 AM, wrote: > > > Hi, > > > > > > Thanks Rich for your advice. I've forgotten it and it's possible. > > > > > > BTW, please create and run the reproductive small script or interractive > > > console. > > > For example, entering your application's directory and hit > > > script/console > > > -- script/console start to prompt, then hit > > > $DEBUG=true > > > --- and hit (or before enter the code, you need to enter require 'rjb') > > > Rjb::load('lib/... > > > > > > It must show the some stack traces or the exception information to the > > > console, then copy and paste to you mail. > > > > > > Best regards. > > > > > > On Sat, 10 Nov 2007 14:18:53 -0800 (PST) > > > rjb-users at rubyforge.orgさん wrote: > > > > > > > > > > Hello Nick, > > > > > > > > By any chance, do you have an AMD64 box? If so, you > > > > also need to set LD_PRELOAD: > > > > > > > > http://arton.no-ip.info/collabo/backyard/?RubyJavaBridge > > > > > > > > Cheers, > > > > Rich > > > > > > > > --- rjb-users at rubyforge.org wrote: > > > > > > > > > Hi, > > > > > > > > > > it didn't work. Litespeed is launched when mye > > > > > server starts up. So I > > > > > have added JAVA_HOME and LD_LIBRARY_PATH to the > > > > > startup script of > > > > > Litespeed. After that I have restarted Litespeed. It > > > > > didn't work. > > > > > > > > > > So I added $DEBUG = true to environment.rb. That > > > > > didn't work, my > > > > > application didn't work anymore. So I added DEBUG = > > > > > true (which > > > > > probably isn't correct). BTW I'm using Rails 1.1.6. > > > > > Below is the error > > > > > message: > > > > > > > > > > RuntimeError (can't create Java VM): > > > > > .//app/models/pdf.rb:2:in `load' > > > > > .//app/models/pdf.rb:2 > > > > > > > > > > > > > > /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in > > > > > `require' > > > > > > > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:in > > > > > `require' > > > > > > > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:65:in > > > > > `require_or_load' > > > > > > > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:30:in > > > > > `depend_on' > > > > > > > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:85:in > > > > > `require_dependency' > > > > > > > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:98:in > > > > > `const_missing' > > > > > > > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:131:in > > > > > `const_missing' > > > > > > > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:133:in > > > > > `const_missing' > > > > > .//app/controllers/order_controller.rb:247:in > > > > > `create_factuur' > > > > > .//app/controllers/order_controller.rb:210:in > > > > > `process_order' > > > > > > > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:941:in > > > > > `perform_action_without_filters' > > > > > > > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/filters.rb:368:in > > > > > `perform_action_without_benchmark' > > > > > > > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/benchmarking.rb:69:in > > > > > `perform_action_without_rescue' > > > > > /usr/local/lib/ruby/1.8/benchmark.rb:293:in > > > > > `measure' > > > > > > > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/benchmarking.rb:69:in > > > > > `perform_action_without_rescue' > > > > > > > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/rescue.rb:82:in > > > > > `perform_action' > > > > > > > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:408:in > > > > > `process_without_filters' > > > > > > > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/filters.rb:377:in > > > > > `process_without_session_management_support' > > > > > > > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/session_management.rb:117:in > > > > > `process' > > > > > > > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/dispatcher.rb:38:in > > > > > `dispatch' > > > > > /usr/local/lsws/fcgi-bin/RailsRunner.rb:24 > > > > > > > > > > Line 2 equals Rjb::load('lib/itext-2.0.6.jar'). > > > > > Don't know where to > > > > > get the log of the debug. Hope this tells you > > > > > something more. Thanks. > > > > > > > > > > Kind regards, > > > > > > > > > > Nick > > > > > > > > > > On Nov 10, 2007 2:52 PM, > > > > > wrote: > > > > > > Hi, > > > > > > > > > > > > Does Litespeed run in your permission ? In other > > > > > words, it's launched in > > > > > > /etc/init.d when the box is booting up ? > > > > > > If so, you have to set JAVA_HOME and > > > > > LD_LIBRAY_PATH in your startup > > > > > > shell (/etc/init.d/litespeed etc, I don't know > > > > > exact name). > > > > > > If it's not the correct answer, please get the log > > > > > after setting > > > > > > $DEBUG = true > > > > > > on the first line of your config/environment.rb. > > > > > And get the exception > > > > > > information please. > > > > > > > > > > > > Regards > > > > > > > > > > > > > > > > > > On Sat, 10 Nov 2007 13:27:11 +0100 > > > > > > > > > rjb-users at rubyforge.org、オ、 s wrote: > > > > > > > > > > > > > Hi, > > > > > > > > > > > > > > I have the following code: > > > > > > > > > > > > > > require 'rjb' > > > > > > > Rjb::load('lib/itext-2.0.6.jar') > > > > > > > > > > > > > > When I run it under Windows, it works fine. But > > > > > when I run it on my > > > > > > > production Linux box, a get the error: > > > > > > > > > > > > > > can't create Java VM > > > > > > > > > > > > > > I did some searching on Google and it turns out, > > > > > I have to set > > > > > > > JAVA_HOME and LD_LIBRARY_PATH. I have set both > > > > > variables in Linux and > > > > > > > in my environment.rb file. But it still doesn't > > > > > work. I'm using > > > > > > > Litespeed as my webserver (so no Mongrel). Hope > > > > > somebody can tell me > > > > > > > what is wrong. Thanks. > > > > > > > > > > > > > > Kind regards, > > > > > > > > > > > > > > Nick > > > > > > > _______________________________________________ > > > > > > > rjb-users mailing list > > > > > > > rjb-users at rubyforge.org > > > > > > > http://rubyforge.org/mailman/listinfo/rjb-users > > > > > > > > > > > > -- > > > > > > arton > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > rjb-users mailing list > > > > > > rjb-users at rubyforge.org > > > > > > http://rubyforge.org/mailman/listinfo/rjb-users > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > rjb-users mailing list > > > > > rjb-users at rubyforge.org > > > > > http://rubyforge.org/mailman/listinfo/rjb-users > > > > > > > > > > > > > > > > > ___________________________________ > > > > > > > > Richard L. Apodaca > > > > > > > > http://depth-first.com Blog > > > > http://metamolecular.com Company > > > > _______________________________________________ > > > > rjb-users mailing list > > > > rjb-users at rubyforge.org > > > > http://rubyforge.org/mailman/listinfo/rjb-users > > > > > > -- > > > arton > > > > > > > > > _______________________________________________ > > > rjb-users mailing list > > > rjb-users at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/rjb-users > > > > > > > > -- > arton > -- arton From rjb-users at rubyforge.org Sun Nov 11 08:17:16 2007 From: rjb-users at rubyforge.org (rjb-users at rubyforge.org) Date: Sun, 11 Nov 2007 14:17:16 +0100 Subject: [rjb-users] can't create Java VM In-Reply-To: <20071111213929.E031.ARTON@e07.itscom.net> References: <20071111100826.E02B.ARTON@e07.itscom.net> <857ffc970711110428j4f6feb6dk59d0a08eee1ba270@mail.gmail.com> <20071111213929.E031.ARTON@e07.itscom.net> Message-ID: <857ffc970711110517m2a1d379ex7d9d65c525ccc1e0@mail.gmail.com> Hi, just ran Webbrick (script/server) in production mode and everything performed beautifully. So obviously a problem with my webserver. I'm using Litespeed (www.litespeedtech.com) and not Lighttpd. My server runs as user nobody (don't know if that has anything to do with it). Litespeed uses LSAPI to run Rails code. I have already placed JAVA_HOME and LD_LIBRARY_PATH in the startup script of Litespeed, but that didn't help. Any other suggestions I can try out. Thanks. Kind regards, Nick On Nov 11, 2007 1:55 PM, wrote: > Hi, > > It seems fine your environment. > The message 'no such file to load ...' is only RubyGem's debugging > message because $DEBUG set to true, and rjb was successfuly loaded. > Then, another question is: have you ever try to sciprt/server for > testing ? and in the testing environment Rjb can create jvm ? > If so, the problem is caused by Litehttpd's environment. > Does Litehttpd use FastCGI ? If so, you need to set the environment > variables such JAVA_HOME etc, in the FastCGI process, I think, because > the FastCGI process is separated from the parent (Web server's process). > > Best regards > > On Sun, 11 Nov 2007 13:28:50 +0100 > > rjb-users at rubyforge.orgさん wrote: > > > Hi, > > > > below is the output from my IRB session. > > > > # ruby script/console > > Loading development environment. > > >> $DEBUG=true > > => true > > >> require 'rjb' > > Exception `MissingSourceFile' at > > /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27 - no > > such file to load -- rjb > > => true > > >> Rjb::load('lib/itext-2.0.6.jar') > > => nil > > >> > > > > I have done a gem install rjb, and have version 1.0.11 installed. Hope > > this helps sole the problem. Thanks. > > > > Kind regards, > > > > Nick > > > > > > > > On Nov 11, 2007 2:17 AM, wrote: > > > Hi, > > > > > > Thanks Rich for your advice. I've forgotten it and it's possible. > > > > > > BTW, please create and run the reproductive small script or interractive > > > console. > > > For example, entering your application's directory and hit > > > script/console > > > -- script/console start to prompt, then hit > > > $DEBUG=true > > > --- and hit (or before enter the code, you need to enter require 'rjb') > > > Rjb::load('lib/... > > > > > > It must show the some stack traces or the exception information to the > > > console, then copy and paste to you mail. > > > > > > Best regards. > > > > > > On Sat, 10 Nov 2007 14:18:53 -0800 (PST) > > > rjb-users at rubyforge.orgさん wrote: > > > > > > > > > > Hello Nick, > > > > > > > > By any chance, do you have an AMD64 box? If so, you > > > > also need to set LD_PRELOAD: > > > > > > > > http://arton.no-ip.info/collabo/backyard/?RubyJavaBridge > > > > > > > > Cheers, > > > > Rich > > > > > > > > --- rjb-users at rubyforge.org wrote: > > > > > > > > > Hi, > > > > > > > > > > it didn't work. Litespeed is launched when mye > > > > > server starts up. So I > > > > > have added JAVA_HOME and LD_LIBRARY_PATH to the > > > > > startup script of > > > > > Litespeed. After that I have restarted Litespeed. It > > > > > didn't work. > > > > > > > > > > So I added $DEBUG = true to environment.rb. That > > > > > didn't work, my > > > > > application didn't work anymore. So I added DEBUG = > > > > > true (which > > > > > probably isn't correct). BTW I'm using Rails 1.1.6. > > > > > Below is the error > > > > > message: > > > > > > > > > > RuntimeError (can't create Java VM): > > > > > .//app/models/pdf.rb:2:in `load' > > > > > .//app/models/pdf.rb:2 > > > > > > > > > > > > > > /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in > > > > > `require' > > > > > > > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:in > > > > > `require' > > > > > > > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:65:in > > > > > `require_or_load' > > > > > > > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:30:in > > > > > `depend_on' > > > > > > > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:85:in > > > > > `require_dependency' > > > > > > > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:98:in > > > > > `const_missing' > > > > > > > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:131:in > > > > > `const_missing' > > > > > > > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:133:in > > > > > `const_missing' > > > > > .//app/controllers/order_controller.rb:247:in > > > > > `create_factuur' > > > > > .//app/controllers/order_controller.rb:210:in > > > > > `process_order' > > > > > > > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:941:in > > > > > `perform_action_without_filters' > > > > > > > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/filters.rb:368:in > > > > > `perform_action_without_benchmark' > > > > > > > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/benchmarking.rb:69:in > > > > > `perform_action_without_rescue' > > > > > /usr/local/lib/ruby/1.8/benchmark.rb:293:in > > > > > `measure' > > > > > > > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/benchmarking.rb:69:in > > > > > `perform_action_without_rescue' > > > > > > > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/rescue.rb:82:in > > > > > `perform_action' > > > > > > > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:408:in > > > > > `process_without_filters' > > > > > > > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/filters.rb:377:in > > > > > `process_without_session_management_support' > > > > > > > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/session_management.rb:117:in > > > > > `process' > > > > > > > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/dispatcher.rb:38:in > > > > > `dispatch' > > > > > /usr/local/lsws/fcgi-bin/RailsRunner.rb:24 > > > > > > > > > > Line 2 equals Rjb::load('lib/itext-2.0.6.jar'). > > > > > Don't know where to > > > > > get the log of the debug. Hope this tells you > > > > > something more. Thanks. > > > > > > > > > > Kind regards, > > > > > > > > > > Nick > > > > > > > > > > On Nov 10, 2007 2:52 PM, > > > > > wrote: > > > > > > Hi, > > > > > > > > > > > > Does Litespeed run in your permission ? In other > > > > > words, it's launched in > > > > > > /etc/init.d when the box is booting up ? > > > > > > If so, you have to set JAVA_HOME and > > > > > LD_LIBRAY_PATH in your startup > > > > > > shell (/etc/init.d/litespeed etc, I don't know > > > > > exact name). > > > > > > If it's not the correct answer, please get the log > > > > > after setting > > > > > > $DEBUG = true > > > > > > on the first line of your config/environment.rb. > > > > > And get the exception > > > > > > information please. > > > > > > > > > > > > Regards > > > > > > > > > > > > > > > > > > On Sat, 10 Nov 2007 13:27:11 +0100 > > > > > > > > > rjb-users at rubyforge.org、オ、 s wrote: > > > > > > > > > > > > > Hi, > > > > > > > > > > > > > > I have the following code: > > > > > > > > > > > > > > require 'rjb' > > > > > > > Rjb::load('lib/itext-2.0.6.jar') > > > > > > > > > > > > > > When I run it under Windows, it works fine. But > > > > > when I run it on my > > > > > > > production Linux box, a get the error: > > > > > > > > > > > > > > can't create Java VM > > > > > > > > > > > > > > I did some searching on Google and it turns out, > > > > > I have to set > > > > > > > JAVA_HOME and LD_LIBRARY_PATH. I have set both > > > > > variables in Linux and > > > > > > > in my environment.rb file. But it still doesn't > > > > > work. I'm using > > > > > > > Litespeed as my webserver (so no Mongrel). Hope > > > > > somebody can tell me > > > > > > > what is wrong. Thanks. > > > > > > > > > > > > > > Kind regards, > > > > > > > > > > > > > > Nick > > > > > > > _______________________________________________ > > > > > > > rjb-users mailing list > > > > > > > rjb-users at rubyforge.org > > > > > > > http://rubyforge.org/mailman/listinfo/rjb-users > > > > > > > > > > > > -- > > > > > > arton > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > rjb-users mailing list > > > > > > rjb-users at rubyforge.org > > > > > > http://rubyforge.org/mailman/listinfo/rjb-users > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > rjb-users mailing list > > > > > rjb-users at rubyforge.org > > > > > http://rubyforge.org/mailman/listinfo/rjb-users > > > > > > > > > > > > > > > > > ___________________________________ > > > > > > > > Richard L. Apodaca > > > > > > > > http://depth-first.com Blog > > > > http://metamolecular.com Company > > > > _______________________________________________ > > > > rjb-users mailing list > > > > rjb-users at rubyforge.org > > > > http://rubyforge.org/mailman/listinfo/rjb-users > > > > > > -- > > > arton > > > > > > > > > _______________________________________________ > > > rjb-users mailing list > > > rjb-users at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/rjb-users > > > > > > > > -- > arton > > > _______________________________________________ > rjb-users mailing list > rjb-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rjb-users > > From rjb-users at rubyforge.org Sun Nov 11 08:47:53 2007 From: rjb-users at rubyforge.org (rjb-users at rubyforge.org) Date: Sun, 11 Nov 2007 22:47:53 +0900 Subject: [rjb-users] can't create Java VM In-Reply-To: <857ffc970711110517m2a1d379ex7d9d65c525ccc1e0@mail.gmail.com> References: <20071111213929.E031.ARTON@e07.itscom.net> <857ffc970711110517m2a1d379ex7d9d65c525ccc1e0@mail.gmail.com> Message-ID: <20071111224448.E037.ARTON@e07.itscom.net> Hi, see http://www.litespeedtech.com/docs/webserver/config/rails/#env You need to configure the environment variables in you Litespeed setting. Reagrds. On Sun, 11 Nov 2007 14:17:16 +0100 rjb-users at rubyforge.orgさん wrote: > Hi, > > just ran Webbrick (script/server) in production mode and everything > performed beautifully. So obviously a problem with my webserver. > > I'm using Litespeed (www.litespeedtech.com) and not Lighttpd. My > server runs as user nobody (don't know if that has anything to do with > it). Litespeed uses LSAPI to run Rails code. > > I have already placed JAVA_HOME and LD_LIBRARY_PATH in the startup > script of Litespeed, but that didn't help. > > Any other suggestions I can try out. Thanks. > > Kind regards, > > Nick > > > On Nov 11, 2007 1:55 PM, wrote: > > Hi, > > > > It seems fine your environment. > > The message 'no such file to load ...' is only RubyGem's debugging > > message because $DEBUG set to true, and rjb was successfuly loaded. > > Then, another question is: have you ever try to sciprt/server for > > testing ? and in the testing environment Rjb can create jvm ? > > If so, the problem is caused by Litehttpd's environment. > > Does Litehttpd use FastCGI ? If so, you need to set the environment > > variables such JAVA_HOME etc, in the FastCGI process, I think, because > > the FastCGI process is separated from the parent (Web server's process). > > > > Best regards > > > > On Sun, 11 Nov 2007 13:28:50 +0100 > > > > rjb-users at rubyforge.orgさん wrote: > > > > > Hi, > > > > > > below is the output from my IRB session. > > > > > > # ruby script/console > > > Loading development environment. > > > >> $DEBUG=true > > > => true > > > >> require 'rjb' > > > Exception `MissingSourceFile' at > > > /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27 - no > > > such file to load -- rjb > > > => true > > > >> Rjb::load('lib/itext-2.0.6.jar') > > > => nil > > > >> > > > > > > I have done a gem install rjb, and have version 1.0.11 installed. Hope > > > this helps sole the problem. Thanks. > > > > > > Kind regards, > > > > > > Nick > > > > > > > > > > > > On Nov 11, 2007 2:17 AM, wrote: > > > > Hi, > > > > > > > > Thanks Rich for your advice. I've forgotten it and it's possible. > > > > > > > > BTW, please create and run the reproductive small script or interractive > > > > console. > > > > For example, entering your application's directory and hit > > > > script/console > > > > -- script/console start to prompt, then hit > > > > $DEBUG=true > > > > --- and hit (or before enter the code, you need to enter require 'rjb') > > > > Rjb::load('lib/... > > > > > > > > It must show the some stack traces or the exception information to the > > > > console, then copy and paste to you mail. > > > > > > > > Best regards. > > > > > > > > On Sat, 10 Nov 2007 14:18:53 -0800 (PST) > > > > rjb-users at rubyforge.orgさん wrote: > > > > > > > > > > > > > Hello Nick, > > > > > > > > > > By any chance, do you have an AMD64 box? If so, you > > > > > also need to set LD_PRELOAD: > > > > > > > > > > http://arton.no-ip.info/collabo/backyard/?RubyJavaBridge > > > > > > > > > > Cheers, > > > > > Rich > > > > > > > > > > --- rjb-users at rubyforge.org wrote: > > > > > > > > > > > Hi, > > > > > > > > > > > > it didn't work. Litespeed is launched when mye > > > > > > server starts up. So I > > > > > > have added JAVA_HOME and LD_LIBRARY_PATH to the > > > > > > startup script of > > > > > > Litespeed. After that I have restarted Litespeed. It > > > > > > didn't work. > > > > > > > > > > > > So I added $DEBUG = true to environment.rb. That > > > > > > didn't work, my > > > > > > application didn't work anymore. So I added DEBUG = > > > > > > true (which > > > > > > probably isn't correct). BTW I'm using Rails 1.1.6. > > > > > > Below is the error > > > > > > message: > > > > > > > > > > > > RuntimeError (can't create Java VM): > > > > > > .//app/models/pdf.rb:2:in `load' > > > > > > .//app/models/pdf.rb:2 > > > > > > > > > > > > > > > > > /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in > > > > > > `require' > > > > > > > > > > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:in > > > > > > `require' > > > > > > > > > > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:65:in > > > > > > `require_or_load' > > > > > > > > > > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:30:in > > > > > > `depend_on' > > > > > > > > > > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:85:in > > > > > > `require_dependency' > > > > > > > > > > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:98:in > > > > > > `const_missing' > > > > > > > > > > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:131:in > > > > > > `const_missing' > > > > > > > > > > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:133:in > > > > > > `const_missing' > > > > > > .//app/controllers/order_controller.rb:247:in > > > > > > `create_factuur' > > > > > > .//app/controllers/order_controller.rb:210:in > > > > > > `process_order' > > > > > > > > > > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:941:in > > > > > > `perform_action_without_filters' > > > > > > > > > > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/filters.rb:368:in > > > > > > `perform_action_without_benchmark' > > > > > > > > > > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/benchmarking.rb:69:in > > > > > > `perform_action_without_rescue' > > > > > > /usr/local/lib/ruby/1.8/benchmark.rb:293:in > > > > > > `measure' > > > > > > > > > > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/benchmarking.rb:69:in > > > > > > `perform_action_without_rescue' > > > > > > > > > > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/rescue.rb:82:in > > > > > > `perform_action' > > > > > > > > > > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:408:in > > > > > > `process_without_filters' > > > > > > > > > > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/filters.rb:377:in > > > > > > `process_without_session_management_support' > > > > > > > > > > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/session_management.rb:117:in > > > > > > `process' > > > > > > > > > > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/dispatcher.rb:38:in > > > > > > `dispatch' > > > > > > /usr/local/lsws/fcgi-bin/RailsRunner.rb:24 > > > > > > > > > > > > Line 2 equals Rjb::load('lib/itext-2.0.6.jar'). > > > > > > Don't know where to > > > > > > get the log of the debug. Hope this tells you > > > > > > something more. Thanks. > > > > > > > > > > > > Kind regards, > > > > > > > > > > > > Nick > > > > > > > > > > > > On Nov 10, 2007 2:52 PM, > > > > > > wrote: > > > > > > > Hi, > > > > > > > > > > > > > > Does Litespeed run in your permission ? In other > > > > > > words, it's launched in > > > > > > > /etc/init.d when the box is booting up ? > > > > > > > If so, you have to set JAVA_HOME and > > > > > > LD_LIBRAY_PATH in your startup > > > > > > > shell (/etc/init.d/litespeed etc, I don't know > > > > > > exact name). > > > > > > > If it's not the correct answer, please get the log > > > > > > after setting > > > > > > > $DEBUG = true > > > > > > > on the first line of your config/environment.rb. > > > > > > And get the exception > > > > > > > information please. > > > > > > > > > > > > > > Regards > > > > > > > > > > > > > > > > > > > > > On Sat, 10 Nov 2007 13:27:11 +0100 > > > > > > > > > > > rjb-users at rubyforge.org、オ、 s wrote: > > > > > > > > > > > > > > > Hi, > > > > > > > > > > > > > > > > I have the following code: > > > > > > > > > > > > > > > > require 'rjb' > > > > > > > > Rjb::load('lib/itext-2.0.6.jar') > > > > > > > > > > > > > > > > When I run it under Windows, it works fine. But > > > > > > when I run it on my > > > > > > > > production Linux box, a get the error: > > > > > > > > > > > > > > > > can't create Java VM > > > > > > > > > > > > > > > > I did some searching on Google and it turns out, > > > > > > I have to set > > > > > > > > JAVA_HOME and LD_LIBRARY_PATH. I have set both > > > > > > variables in Linux and > > > > > > > > in my environment.rb file. But it still doesn't > > > > > > work. I'm using > > > > > > > > Litespeed as my webserver (so no Mongrel). Hope > > > > > > somebody can tell me > > > > > > > > what is wrong. Thanks. > > > > > > > > > > > > > > > > Kind regards, > > > > > > > > > > > > > > > > Nick > > > > > > > > _______________________________________________ > > > > > > > > rjb-users mailing list > > > > > > > > rjb-users at rubyforge.org > > > > > > > > http://rubyforge.org/mailman/listinfo/rjb-users > > > > > > > > > > > > > > -- > > > > > > > arton > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > > rjb-users mailing list > > > > > > > rjb-users at rubyforge.org > > > > > > > http://rubyforge.org/mailman/listinfo/rjb-users > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > rjb-users mailing list > > > > > > rjb-users at rubyforge.org > > > > > > http://rubyforge.org/mailman/listinfo/rjb-users > > > > > > > > > > > > > > > > > > > > > ___________________________________ > > > > > > > > > > Richard L. Apodaca > > > > > > > > > > http://depth-first.com Blog > > > > > http://metamolecular.com Company > > > > > _______________________________________________ > > > > > rjb-users mailing list > > > > > rjb-users at rubyforge.org > > > > > http://rubyforge.org/mailman/listinfo/rjb-users > > > > > > > > -- > > > > arton > > > > > > > > > > > > _______________________________________________ > > > > rjb-users mailing list > > > > rjb-users at rubyforge.org > > > > http://rubyforge.org/mailman/listinfo/rjb-users > > > > > > > > > > > > -- > > arton > > > > > > _______________________________________________ > > rjb-users mailing list > > rjb-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/rjb-users > > > > -- arton From rjb-users at rubyforge.org Sun Nov 11 10:58:17 2007 From: rjb-users at rubyforge.org (rjb-users at rubyforge.org) Date: Sun, 11 Nov 2007 16:58:17 +0100 Subject: [rjb-users] can't create Java VM In-Reply-To: <20071111224448.E037.ARTON@e07.itscom.net> References: <20071111213929.E031.ARTON@e07.itscom.net> <857ffc970711110517m2a1d379ex7d9d65c525ccc1e0@mail.gmail.com> <20071111224448.E037.ARTON@e07.itscom.net> Message-ID: <857ffc970711110758p4f23529cw45765e25fc19974f@mail.gmail.com> Thanks for the link. I can't find the configuration setting in my Litespeed server, so I have posted a question on their forum. Hope that solves it. I'll let you know. Thanks for all the help. Kind regards, Nick On Nov 11, 2007 2:47 PM, wrote: > Hi, > > see http://www.litespeedtech.com/docs/webserver/config/rails/#env > You need to configure the environment variables in you Litespeed setting. > > Reagrds. > > On Sun, 11 Nov 2007 14:17:16 +0100 > > rjb-users at rubyforge.orgさん wrote: > > > Hi, > > > > just ran Webbrick (script/server) in production mode and everything > > performed beautifully. So obviously a problem with my webserver. > > > > I'm using Litespeed (www.litespeedtech.com) and not Lighttpd. My > > server runs as user nobody (don't know if that has anything to do with > > it). Litespeed uses LSAPI to run Rails code. > > > > I have already placed JAVA_HOME and LD_LIBRARY_PATH in the startup > > script of Litespeed, but that didn't help. > > > > Any other suggestions I can try out. Thanks. > > > > Kind regards, > > > > Nick > > > > > > On Nov 11, 2007 1:55 PM, wrote: > > > Hi, > > > > > > It seems fine your environment. > > > The message 'no such file to load ...' is only RubyGem's debugging > > > message because $DEBUG set to true, and rjb was successfuly loaded. > > > Then, another question is: have you ever try to sciprt/server for > > > testing ? and in the testing environment Rjb can create jvm ? > > > If so, the problem is caused by Litehttpd's environment. > > > Does Litehttpd use FastCGI ? If so, you need to set the environment > > > variables such JAVA_HOME etc, in the FastCGI process, I think, because > > > the FastCGI process is separated from the parent (Web server's process). > > > > > > Best regards > > > > > > On Sun, 11 Nov 2007 13:28:50 +0100 > > > > > > rjb-users at rubyforge.orgさん wrote: > > > > > > > Hi, > > > > > > > > below is the output from my IRB session. > > > > > > > > # ruby script/console > > > > Loading development environment. > > > > >> $DEBUG=true > > > > => true > > > > >> require 'rjb' > > > > Exception `MissingSourceFile' at > > > > /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27 - no > > > > such file to load -- rjb > > > > => true > > > > >> Rjb::load('lib/itext-2.0.6.jar') > > > > => nil > > > > >> > > > > > > > > I have done a gem install rjb, and have version 1.0.11 installed. Hope > > > > this helps sole the problem. Thanks. > > > > > > > > Kind regards, > > > > > > > > Nick > > > > > > > > > > > > > > > > On Nov 11, 2007 2:17 AM, wrote: > > > > > Hi, > > > > > > > > > > Thanks Rich for your advice. I've forgotten it and it's possible. > > > > > > > > > > BTW, please create and run the reproductive small script or interractive > > > > > console. > > > > > For example, entering your application's directory and hit > > > > > script/console > > > > > -- script/console start to prompt, then hit > > > > > $DEBUG=true > > > > > --- and hit (or before enter the code, you need to enter require 'rjb') > > > > > Rjb::load('lib/... > > > > > > > > > > It must show the some stack traces or the exception information to the > > > > > console, then copy and paste to you mail. > > > > > > > > > > Best regards. > > > > > > > > > > On Sat, 10 Nov 2007 14:18:53 -0800 (PST) > > > > > rjb-users at rubyforge.orgさん wrote: > > > > > > > > > > > > > > > > Hello Nick, > > > > > > > > > > > > By any chance, do you have an AMD64 box? If so, you > > > > > > also need to set LD_PRELOAD: > > > > > > > > > > > > http://arton.no-ip.info/collabo/backyard/?RubyJavaBridge > > > > > > > > > > > > Cheers, > > > > > > Rich > > > > > > > > > > > > --- rjb-users at rubyforge.org wrote: > > > > > > > > > > > > > Hi, > > > > > > > > > > > > > > it didn't work. Litespeed is launched when mye > > > > > > > server starts up. So I > > > > > > > have added JAVA_HOME and LD_LIBRARY_PATH to the > > > > > > > startup script of > > > > > > > Litespeed. After that I have restarted Litespeed. It > > > > > > > didn't work. > > > > > > > > > > > > > > So I added $DEBUG = true to environment.rb. That > > > > > > > didn't work, my > > > > > > > application didn't work anymore. So I added DEBUG = > > > > > > > true (which > > > > > > > probably isn't correct). BTW I'm using Rails 1.1.6. > > > > > > > Below is the error > > > > > > > message: > > > > > > > > > > > > > > RuntimeError (can't create Java VM): > > > > > > > .//app/models/pdf.rb:2:in `load' > > > > > > > .//app/models/pdf.rb:2 > > > > > > > > > > > > > > > > > > > > /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in > > > > > > > `require' > > > > > > > > > > > > > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:in > > > > > > > `require' > > > > > > > > > > > > > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:65:in > > > > > > > `require_or_load' > > > > > > > > > > > > > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:30:in > > > > > > > `depend_on' > > > > > > > > > > > > > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:85:in > > > > > > > `require_dependency' > > > > > > > > > > > > > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:98:in > > > > > > > `const_missing' > > > > > > > > > > > > > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:131:in > > > > > > > `const_missing' > > > > > > > > > > > > > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:133:in > > > > > > > `const_missing' > > > > > > > .//app/controllers/order_controller.rb:247:in > > > > > > > `create_factuur' > > > > > > > .//app/controllers/order_controller.rb:210:in > > > > > > > `process_order' > > > > > > > > > > > > > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:941:in > > > > > > > `perform_action_without_filters' > > > > > > > > > > > > > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/filters.rb:368:in > > > > > > > `perform_action_without_benchmark' > > > > > > > > > > > > > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/benchmarking.rb:69:in > > > > > > > `perform_action_without_rescue' > > > > > > > /usr/local/lib/ruby/1.8/benchmark.rb:293:in > > > > > > > `measure' > > > > > > > > > > > > > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/benchmarking.rb:69:in > > > > > > > `perform_action_without_rescue' > > > > > > > > > > > > > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/rescue.rb:82:in > > > > > > > `perform_action' > > > > > > > > > > > > > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:408:in > > > > > > > `process_without_filters' > > > > > > > > > > > > > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/filters.rb:377:in > > > > > > > `process_without_session_management_support' > > > > > > > > > > > > > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/session_management.rb:117:in > > > > > > > `process' > > > > > > > > > > > > > > > > > > > > /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/dispatcher.rb:38:in > > > > > > > `dispatch' > > > > > > > /usr/local/lsws/fcgi-bin/RailsRunner.rb:24 > > > > > > > > > > > > > > Line 2 equals Rjb::load('lib/itext-2.0.6.jar'). > > > > > > > Don't know where to > > > > > > > get the log of the debug. Hope this tells you > > > > > > > something more. Thanks. > > > > > > > > > > > > > > Kind regards, > > > > > > > > > > > > > > Nick > > > > > > > > > > > > > > On Nov 10, 2007 2:52 PM, > > > > > > > wrote: > > > > > > > > Hi, > > > > > > > > > > > > > > > > Does Litespeed run in your permission ? In other > > > > > > > words, it's launched in > > > > > > > > /etc/init.d when the box is booting up ? > > > > > > > > If so, you have to set JAVA_HOME and > > > > > > > LD_LIBRAY_PATH in your startup > > > > > > > > shell (/etc/init.d/litespeed etc, I don't know > > > > > > > exact name). > > > > > > > > If it's not the correct answer, please get the log > > > > > > > after setting > > > > > > > > $DEBUG = true > > > > > > > > on the first line of your config/environment.rb. > > > > > > > And get the exception > > > > > > > > information please. > > > > > > > > > > > > > > > > Regards > > > > > > > > > > > > > > > > > > > > > > > > On Sat, 10 Nov 2007 13:27:11 +0100 > > > > > > > > > > > > > rjb-users at rubyforge.org、オ、 s wrote: > > > > > > > > > > > > > > > > > Hi, > > > > > > > > > > > > > > > > > > I have the following code: > > > > > > > > > > > > > > > > > > require 'rjb' > > > > > > > > > Rjb::load('lib/itext-2.0.6.jar') > > > > > > > > > > > > > > > > > > When I run it under Windows, it works fine. But > > > > > > > when I run it on my > > > > > > > > > production Linux box, a get the error: > > > > > > > > > > > > > > > > > > can't create Java VM > > > > > > > > > > > > > > > > > > I did some searching on Google and it turns out, > > > > > > > I have to set > > > > > > > > > JAVA_HOME and LD_LIBRARY_PATH. I have set both > > > > > > > variables in Linux and > > > > > > > > > in my environment.rb file. But it still doesn't > > > > > > > work. I'm using > > > > > > > > > Litespeed as my webserver (so no Mongrel). Hope > > > > > > > somebody can tell me > > > > > > > > > what is wrong. Thanks. > > > > > > > > > > > > > > > > > > Kind regards, > > > > > > > > > > > > > > > > > > Nick > > > > > > > > > _______________________________________________ > > > > > > > > > rjb-users mailing list > > > > > > > > > rjb-users at rubyforge.org > > > > > > > > > http://rubyforge.org/mailman/listinfo/rjb-users > > > > > > > > > > > > > > > > -- > > > > > > > > arton > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > > > rjb-users mailing list > > > > > > > > rjb-users at rubyforge.org > > > > > > > > http://rubyforge.org/mailman/listinfo/rjb-users > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > > rjb-users mailing list > > > > > > > rjb-users at rubyforge.org > > > > > > > http://rubyforge.org/mailman/listinfo/rjb-users > > > > > > > > > > > > > > > > > > > > > > > > > ___________________________________ > > > > > > > > > > > > Richard L. Apodaca > > > > > > > > > > > > http://depth-first.com Blog > > > > > > http://metamolecular.com Company > > > > > > _______________________________________________ > > > > > > rjb-users mailing list > > > > > > rjb-users at rubyforge.org > > > > > > http://rubyforge.org/mailman/listinfo/rjb-users > > > > > > > > > > -- > > > > > arton > > > > > > > > > > > > > > > _______________________________________________ > > > > > rjb-users mailing list > > > > > rjb-users at rubyforge.org > > > > > http://rubyforge.org/mailman/listinfo/rjb-users > > > > > > > > > > > > > > > > -- > > > arton > > > > > > > > > _______________________________________________ > > > rjb-users mailing list > > > rjb-users at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/rjb-users > > > > > > > > -- > arton > > > _______________________________________________ > rjb-users mailing list > rjb-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rjb-users > > From rjb-users at rubyforge.org Mon Nov 12 14:51:36 2007 From: rjb-users at rubyforge.org (rjb-users at rubyforge.org) Date: Mon, 12 Nov 2007 20:51:36 +0100 Subject: [rjb-users] can't create Java VM In-Reply-To: <20071111224448.E037.ARTON@e07.itscom.net> References: <20071111213929.E031.ARTON@e07.itscom.net> <857ffc970711110517m2a1d379ex7d9d65c525ccc1e0@mail.gmail.com> <20071111224448.E037.ARTON@e07.itscom.net> Message-ID: <857ffc970711121151l11dcfd24s822218b159c3789f@mail.gmail.com> Just added JAVA_HOME and LD_LIBRARY_PATH to my environment variables of Litespeed as described in http://www.litespeedtech.com/docs/webserver/config/rails/#env. Restarted the server, executed the script again, but I still get the same error. How can I debug this? Thanks. Kind regards, Nick From rjb-users at rubyforge.org Wed Nov 14 04:27:34 2007 From: rjb-users at rubyforge.org (rjb-users at rubyforge.org) Date: Wed, 14 Nov 2007 18:27:34 +0900 Subject: [rjb-users] can't create Java VM In-Reply-To: <857ffc970711121151l11dcfd24s822218b159c3789f@mail.gmail.com> References: <20071111224448.E037.ARTON@e07.itscom.net> <857ffc970711121151l11dcfd24s822218b159c3789f@mail.gmail.com> Message-ID: <20071114182659.FD07.ARTON@e07.itscom.net> Hi, Did you set these values in Rails Contexts ? On Mon, 12 Nov 2007 20:51:36 +0100 rjb-users at rubyforge.orgさん wrote: > Just added JAVA_HOME and LD_LIBRARY_PATH to my environment variables > of Litespeed as described in > http://www.litespeedtech.com/docs/webserver/config/rails/#env. > Restarted the server, executed the script again, but I still get the > same error. How can I debug this? Thanks. > > Kind regards, > > Nick > _______________________________________________ > rjb-users mailing list > rjb-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rjb-users -- arton From rjb-users at rubyforge.org Wed Nov 14 04:39:20 2007 From: rjb-users at rubyforge.org (rjb-users at rubyforge.org) Date: Wed, 14 Nov 2007 18:39:20 +0900 Subject: [rjb-users] can't create Java VM In-Reply-To: <20071114182659.FD07.ARTON@e07.itscom.net> References: <857ffc970711121151l11dcfd24s822218b159c3789f@mail.gmail.com> <20071114182659.FD07.ARTON@e07.itscom.net> Message-ID: <20071114183619.FD0A.ARTON@e07.itscom.net> Hi, Can you add the action method below in your controller ? def showenv render :text => "JAVA_HOME=#{ENV['JAVA_HOME']}
LD_LIBRARY_PATH=#{ENV['LD_LIBRARY_PATH']}
CurrentDir=#{Dir.pwd}" end If you can, please show me the output. Regards On Wed, 14 Nov 2007 18:27:34 +0900 rjb-users at rubyforge.orgさん wrote: > Hi, > > Did you set these values in Rails Contexts ? > > On Mon, 12 Nov 2007 20:51:36 +0100 > rjb-users at rubyforge.orgさん wrote: > > > Just added JAVA_HOME and LD_LIBRARY_PATH to my environment variables > > of Litespeed as described in > > http://www.litespeedtech.com/docs/webserver/config/rails/#env. > > Restarted the server, executed the script again, but I still get the > > same error. How can I debug this? Thanks. > > > > Kind regards, > > > > Nick > > _______________________________________________ > > rjb-users mailing list > > rjb-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/rjb-users > > -- > arton > -- arton From rjb-users at rubyforge.org Wed Nov 14 05:25:03 2007 From: rjb-users at rubyforge.org (rjb-users at rubyforge.org) Date: Wed, 14 Nov 2007 11:25:03 +0100 Subject: [rjb-users] can't create Java VM In-Reply-To: <20071114183619.FD0A.ARTON@e07.itscom.net> References: <857ffc970711121151l11dcfd24s822218b159c3789f@mail.gmail.com> <20071114182659.FD07.ARTON@e07.itscom.net> <20071114183619.FD0A.ARTON@e07.itscom.net> Message-ID: <857ffc970711140225h5cedf16biad5e6b2f64f1e9a9@mail.gmail.com> Yes I set the values in the Rails context as indicated by the docs and the help in the Litespeed forum. The output of the code you gave me is: JAVA_HOME=/usr/java/jdk1.5.0_08/ LD_LIBRARY_PATH=/usr/java/jdk1.5.0_08/jre/lib/i386/:/usr/java/jdk1.5.0_08/jre/lib/i386/client/:./ CurrentDir=/usr/local/lsws/verkoop So it appears as if everything is set correctly. Kind regards, Nick On Nov 14, 2007 10:39 AM, wrote: > Hi, > > Can you add the action method below in your controller ? > > def showenv > render :text => "JAVA_HOME=#{ENV['JAVA_HOME']}
LD_LIBRARY_PATH=#{ENV['LD_LIBRARY_PATH']}
CurrentDir=#{Dir.pwd}" > end > > If you can, please show me the output. > > Regards > > On Wed, 14 Nov 2007 18:27:34 +0900 > > rjb-users at rubyforge.orgさん wrote: > > > Hi, > > > > Did you set these values in Rails Contexts ? > > > > On Mon, 12 Nov 2007 20:51:36 +0100 > > rjb-users at rubyforge.orgさん wrote: > > > > > Just added JAVA_HOME and LD_LIBRARY_PATH to my environment variables > > > of Litespeed as described in > > > http://www.litespeedtech.com/docs/webserver/config/rails/#env. > > > Restarted the server, executed the script again, but I still get the > > > same error. How can I debug this? Thanks. > > > > > > Kind regards, > > > > > > Nick > > > _______________________________________________ > > > rjb-users mailing list > > > rjb-users at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/rjb-users > > > > -- > > arton > > > > -- > arton > > > _______________________________________________ > rjb-users mailing list > rjb-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rjb-users > > From rjb-users at rubyforge.org Thu Nov 15 06:24:43 2007 From: rjb-users at rubyforge.org (rjb-users at rubyforge.org) Date: Thu, 15 Nov 2007 12:24:43 +0100 Subject: [rjb-users] Daemonized mongrel causes Segmentation faults Message-ID: <473C2C7B.3050000@oblivion.nl> Hello, I am currently trying to generate PDF's from ruby using iText. On my development machine everything worked fine. However when I moved to the production server (which uses mongrel_cluster), every instance of mongrel crashes when initializing the Java VM. When I started a server manually with 'sudo -u mongrel ruby script/server ......', generating PDF's worked again. However when I start the server as a daemon 'sudo -u mongrel ruby script/server -d ......' the instance crashes again with a segmentation fault. The line before the segmentation fault reads 'Java HotSpot(TM) 64-Bit Server VM warning: Can't detect initial thread stack location - find_vma failed'. The machine is a Intel Xeon system. Is this a known bug, and if so is there already a solution? Thanks in advance, Regards Andres From rjb-users at rubyforge.org Thu Nov 15 08:43:26 2007 From: rjb-users at rubyforge.org (rjb-users at rubyforge.org) Date: Thu, 15 Nov 2007 22:43:26 +0900 Subject: [rjb-users] Daemonized mongrel causes Segmentation faults In-Reply-To: <473C2C7B.3050000@oblivion.nl> References: <473C2C7B.3050000@oblivion.nl> Message-ID: <20071115223451.FD12.ARTON@e07.itscom.net> Hmmmm, interesting. http://forum.java.sun.com/thread.jspa?threadID=542672&messageID=2634141 I'm not sure the forum thread's result - just mounting linprocfs for you, but please try it first. And please let me know the result. Regards On Thu, 15 Nov 2007 12:24:43 +0100 rjb-users at rubyforge.orgさん wrote: > Hello, > > I am currently trying to generate PDF's from ruby using iText. On my > development machine everything worked fine. However when I moved to the > production server (which uses mongrel_cluster), every instance of > mongrel crashes when initializing the Java VM. > > When I started a server manually with 'sudo -u mongrel ruby > script/server ......', generating PDF's worked again. However when I > start the server as a daemon 'sudo -u mongrel ruby script/server -d > ......' the instance crashes again with a segmentation fault. The line > before the segmentation fault reads 'Java HotSpot(TM) 64-Bit Server VM > warning: Can't detect initial thread stack location - find_vma failed'. > The machine is a Intel Xeon system. > > Is this a known bug, and if so is there already a solution? > > Thanks in advance, > Regards Andres > _______________________________________________ > rjb-users mailing list > rjb-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rjb-users -- arton From rjb-users at rubyforge.org Thu Nov 15 10:46:15 2007 From: rjb-users at rubyforge.org (rjb-users at rubyforge.org) Date: Thu, 15 Nov 2007 16:46:15 +0100 Subject: [rjb-users] Daemonized mongrel causes Segmentation faults In-Reply-To: <20071115223451.FD12.ARTON@e07.itscom.net> References: <473C2C7B.3050000@oblivion.nl> <20071115223451.FD12.ARTON@e07.itscom.net> Message-ID: <473C69C7.5020103@oblivion.nl> I already tried that solution. Procfs is mounted correctly and it is only a problem when running mongrel as a daemon. I recon if procfs was not mounted (or incorrectly) it should also have segfaulted in 'normal' mode. Regards rjb-users at rubyforge.org wrote: > Hmmmm, interesting. > > http://forum.java.sun.com/thread.jspa?threadID=542672&messageID=2634141 > I'm not sure the forum thread's result - just mounting linprocfs for you, > but please try it first. > And please let me know the result. > > Regards > > On Thu, 15 Nov 2007 12:24:43 +0100 > rjb-users at rubyforge.orgさん wrote: > > >> Hello, >> >> I am currently trying to generate PDF's from ruby using iText. On my >> development machine everything worked fine. However when I moved to the >> production server (which uses mongrel_cluster), every instance of >> mongrel crashes when initializing the Java VM. >> >> When I started a server manually with 'sudo -u mongrel ruby >> script/server ......', generating PDF's worked again. However when I >> start the server as a daemon 'sudo -u mongrel ruby script/server -d >> ......' the instance crashes again with a segmentation fault. The line >> before the segmentation fault reads 'Java HotSpot(TM) 64-Bit Server VM >> warning: Can't detect initial thread stack location - find_vma failed'. >> The machine is a Intel Xeon system. >> >> Is this a known bug, and if so is there already a solution? >> >> Thanks in advance, >> Regards Andres >> _______________________________________________ >> rjb-users mailing list >> rjb-users at rubyforge.org >> http://rubyforge.org/mailman/listinfo/rjb-users >> > > -- > arton > > From rjb-users at rubyforge.org Thu Nov 15 11:59:12 2007 From: rjb-users at rubyforge.org (rjb-users at rubyforge.org) Date: Fri, 16 Nov 2007 01:59:12 +0900 Subject: [rjb-users] Daemonized mongrel causes Segmentation faults In-Reply-To: <473C69C7.5020103@oblivion.nl> References: <20071115223451.FD12.ARTON@e07.itscom.net> <473C69C7.5020103@oblivion.nl> Message-ID: <20071116015325.FD15.ARTON@e07.itscom.net> Hi, Then, have you already read http://jaywhy.wordpress.com/2007/03/05/pdf-templates-via-rails/ ? If you've not, then please read it. I suppose that you can either set the options -Xms... in the code as Rjb::load('', ['-Xms16m', '-Xmx32m']) Regards On Thu, 15 Nov 2007 16:46:15 +0100 rjb-users at rubyforge.orgさん wrote: > I already tried that solution. Procfs is mounted correctly and it is > only a problem when running mongrel as a daemon. I recon if procfs was > not mounted (or incorrectly) it should also have segfaulted in 'normal' > mode. > > Regards > > rjb-users at rubyforge.org wrote: > > Hmmmm, interesting. > > > > http://forum.java.sun.com/thread.jspa?threadID=542672&messageID=2634141 > > I'm not sure the forum thread's result - just mounting linprocfs for you, > > but please try it first. > > And please let me know the result. > > > > Regards > > > > On Thu, 15 Nov 2007 12:24:43 +0100 > > rjb-users at rubyforge.orgさん wrote: > > > > > >> Hello, > >> > >> I am currently trying to generate PDF's from ruby using iText. On my > >> development machine everything worked fine. However when I moved to the > >> production server (which uses mongrel_cluster), every instance of > >> mongrel crashes when initializing the Java VM. > >> > >> When I started a server manually with 'sudo -u mongrel ruby > >> script/server ......', generating PDF's worked again. However when I > >> start the server as a daemon 'sudo -u mongrel ruby script/server -d > >> ......' the instance crashes again with a segmentation fault. The line > >> before the segmentation fault reads 'Java HotSpot(TM) 64-Bit Server VM > >> warning: Can't detect initial thread stack location - find_vma failed'. > >> The machine is a Intel Xeon system. > >> > >> Is this a known bug, and if so is there already a solution? > >> > >> Thanks in advance, > >> Regards Andres > >> _______________________________________________ > >> rjb-users mailing list > >> rjb-users at rubyforge.org > >> http://rubyforge.org/mailman/listinfo/rjb-users > >> > > > > -- > > arton > > > > > -- arton From rjb-users at rubyforge.org Thu Nov 15 14:36:20 2007 From: rjb-users at rubyforge.org (rjb-users at rubyforge.org) Date: Thu, 15 Nov 2007 20:36:20 +0100 Subject: [rjb-users] Daemonized mongrel causes Segmentation faults In-Reply-To: <20071116015325.FD15.ARTON@e07.itscom.net> References: <20071115223451.FD12.ARTON@e07.itscom.net> <473C69C7.5020103@oblivion.nl> <20071116015325.FD15.ARTON@e07.itscom.net> Message-ID: <473C9FB4.7070800@oblivion.nl> Hello, I already read that blog and used the memory configuration flags in the Rjb::load command, so the problem lies somewhere else.... Still, it is quite strange mongrel only crashes when being run as a daemon. It cannot be a user/right problem since I tried starting mongrel as the mongrel user, which works nicely without the -d. Regards rjb-users at rubyforge.org wrote: > Hi, > > Then, have you already read http://jaywhy.wordpress.com/2007/03/05/pdf-templates-via-rails/ ? > If you've not, then please read it. > I suppose that you can either set the options -Xms... in the code as > Rjb::load('', ['-Xms16m', '-Xmx32m']) > > Regards > > On Thu, 15 Nov 2007 16:46:15 +0100 > rjb-users at rubyforge.orgさん wrote: > > >> I already tried that solution. Procfs is mounted correctly and it is >> only a problem when running mongrel as a daemon. I recon if procfs was >> not mounted (or incorrectly) it should also have segfaulted in 'normal' >> mode. >> >> Regards >> >> rjb-users at rubyforge.org wrote: >> >>> Hmmmm, interesting. >>> >>> http://forum.java.sun.com/thread.jspa?threadID=542672&messageID=2634141 >>> I'm not sure the forum thread's result - just mounting linprocfs for you, >>> but please try it first. >>> And please let me know the result. >>> >>> Regards >>> >>> On Thu, 15 Nov 2007 12:24:43 +0100 >>> rjb-users at rubyforge.orgさん wrote: >>> >>> >>> >>>> Hello, >>>> >>>> I am currently trying to generate PDF's from ruby using iText. On my >>>> development machine everything worked fine. However when I moved to the >>>> production server (which uses mongrel_cluster), every instance of >>>> mongrel crashes when initializing the Java VM. >>>> >>>> When I started a server manually with 'sudo -u mongrel ruby >>>> script/server ......', generating PDF's worked again. However when I >>>> start the server as a daemon 'sudo -u mongrel ruby script/server -d >>>> ......' the instance crashes again with a segmentation fault. The line >>>> before the segmentation fault reads 'Java HotSpot(TM) 64-Bit Server VM >>>> warning: Can't detect initial thread stack location - find_vma failed'. >>>> The machine is a Intel Xeon system. >>>> >>>> Is this a known bug, and if so is there already a solution? >>>> >>>> Thanks in advance, >>>> Regards Andres >>>> _______________________________________________ >>>> rjb-users mailing list >>>> rjb-users at rubyforge.org >>>> http://rubyforge.org/mailman/listinfo/rjb-users >>>> >>>> >>> -- >>> arton >>> >>> >>> > > -- > arton > > From rjb-users at rubyforge.org Fri Nov 16 09:39:45 2007 From: rjb-users at rubyforge.org (rjb-users at rubyforge.org) Date: Fri, 16 Nov 2007 23:39:45 +0900 Subject: [rjb-users] Daemonized mongrel causes Segmentation faults In-Reply-To: <473C9FB4.7070800@oblivion.nl> References: <20071116015325.FD15.ARTON@e07.itscom.net> <473C9FB4.7070800@oblivion.nl> Message-ID: <20071116233232.FD1A.ARTON@e07.itscom.net> Hi, Now I'm trying to reproduce the problem, but in my environment, daemon mongrel runs fine with rjb, so please inform me more details. With my test environment is ruby 1.8.6-pl110 x86 64-linux Java build 1.6.0-b105 with poi-2.5.1.jar (my rjb testing app is to produce excel files with Jakarta -POI, but I suppose that the Java libraries are not concerned) mongrel 1.1.1 daemons 1.0.9 rjb 1.0.11 rails 1.2.3 Linux 2.6.20 (Ubuntu 4.1.2) Regards On Thu, 15 Nov 2007 20:36:20 +0100 rjb-users at rubyforge.orgさん wrote: > Hello, > > I already read that blog and used the memory configuration flags in the > Rjb::load command, so the problem lies somewhere else.... Still, it is > quite strange mongrel only crashes when being run as a daemon. It cannot > be a user/right problem since I tried starting mongrel as the mongrel > user, which works nicely without the -d. > > Regards > > rjb-users at rubyforge.org wrote: > > Hi, > > > > Then, have you already read http://jaywhy.wordpress.com/2007/03/05/pdf-templates-via-rails/ ? > > If you've not, then please read it. > > I suppose that you can either set the options -Xms... in the code as > > Rjb::load('', ['-Xms16m', '-Xmx32m']) > > > > Regards > > > > On Thu, 15 Nov 2007 16:46:15 +0100 > > rjb-users at rubyforge.orgさん wrote: > > > > > >> I already tried that solution. Procfs is mounted correctly and it is > >> only a problem when running mongrel as a daemon. I recon if procfs was > >> not mounted (or incorrectly) it should also have segfaulted in 'normal' > >> mode. > >> > >> Regards > >> > >> rjb-users at rubyforge.org wrote: > >> > >>> Hmmmm, interesting. > >>> > >>> http://forum.java.sun.com/thread.jspa?threadID=542672&messageID=2634141 > >>> I'm not sure the forum thread's result - just mounting linprocfs for you, > >>> but please try it first. > >>> And please let me know the result. > >>> > >>> Regards > >>> > >>> On Thu, 15 Nov 2007 12:24:43 +0100 > >>> rjb-users at rubyforge.orgさん wrote: > >>> > >>> > >>> > >>>> Hello, > >>>> > >>>> I am currently trying to generate PDF's from ruby using iText. On my > >>>> development machine everything worked fine. However when I moved to the > >>>> production server (which uses mongrel_cluster), every instance of > >>>> mongrel crashes when initializing the Java VM. > >>>> > >>>> When I started a server manually with 'sudo -u mongrel ruby > >>>> script/server ......', generating PDF's worked again. However when I > >>>> start the server as a daemon 'sudo -u mongrel ruby script/server -d > >>>> ......' the instance crashes again with a segmentation fault. The line > >>>> before the segmentation fault reads 'Java HotSpot(TM) 64-Bit Server VM > >>>> warning: Can't detect initial thread stack location - find_vma failed'. > >>>> The machine is a Intel Xeon system. > >>>> > >>>> Is this a known bug, and if so is there already a solution? > >>>> > >>>> Thanks in advance, > >>>> Regards Andres > >>>> _______________________________________________ > >>>> rjb-users mailing list > >>>> rjb-users at rubyforge.org > >>>> http://rubyforge.org/mailman/listinfo/rjb-users > >>>> > >>>> > >>> -- > >>> arton > >>> > >>> > >>> > > > > -- > > arton > > > > > -- arton From rjb-users at rubyforge.org Sat Nov 17 07:27:45 2007 From: rjb-users at rubyforge.org (rjb-users at rubyforge.org) Date: Sat, 17 Nov 2007 13:27:45 +0100 Subject: [rjb-users] can't create Java VM In-Reply-To: <857ffc970711140225h5cedf16biad5e6b2f64f1e9a9@mail.gmail.com> References: <857ffc970711121151l11dcfd24s822218b159c3789f@mail.gmail.com> <20071114182659.FD07.ARTON@e07.itscom.net> <20071114183619.FD0A.ARTON@e07.itscom.net> <857ffc970711140225h5cedf16biad5e6b2f64f1e9a9@mail.gmail.com> Message-ID: <857ffc970711170427j7daf97a9u5ea5f7147fb6980d@mail.gmail.com> Any more ideas what could be wrong? Can somebody explain what happens when you call Rjb::load('lib/itext-2.0.6.jar')? Which processes are called? What is started? Can it be something with user rights? I'm becoming a bit desperate, I really need this to work. All help is really appreciated. Thanks. Kind regards, Nick On Nov 14, 2007 11:25 AM, Nick Snels wrote: > Yes I set the values in the Rails context as indicated by the docs and > the help in the Litespeed forum. > > The output of the code you gave me is: > JAVA_HOME=/usr/java/jdk1.5.0_08/ > LD_LIBRARY_PATH=/usr/java/jdk1.5.0_08/jre/lib/i386/:/usr/java/jdk1.5.0_08/jre/lib/i386/client/:./ > CurrentDir=/usr/local/lsws/verkoop > > So it appears as if everything is set correctly. > > Kind regards, > > Nick > > > > On Nov 14, 2007 10:39 AM, wrote: > > Hi, > > > > Can you add the action method below in your controller ? > > > > def showenv > > render :text => "JAVA_HOME=#{ENV['JAVA_HOME']}
LD_LIBRARY_PATH=#{ENV['LD_LIBRARY_PATH']}
CurrentDir=#{Dir.pwd}" > > end > > > > If you can, please show me the output. > > > > Regards > > > > On Wed, 14 Nov 2007 18:27:34 +0900 > > > > rjb-users at rubyforge.orgさん wrote: > > > > > Hi, > > > > > > Did you set these values in Rails Contexts ? > > > > > > On Mon, 12 Nov 2007 20:51:36 +0100 > > > rjb-users at rubyforge.orgさん wrote: > > > > > > > Just added JAVA_HOME and LD_LIBRARY_PATH to my environment variables > > > > of Litespeed as described in > > > > http://www.litespeedtech.com/docs/webserver/config/rails/#env. > > > > Restarted the server, executed the script again, but I still get the > > > > same error. How can I debug this? Thanks. > > > > > > > > Kind regards, > > > > > > > > Nick > > > > _______________________________________________ > > > > rjb-users mailing list > > > > rjb-users at rubyforge.org > > > > http://rubyforge.org/mailman/listinfo/rjb-users > > > > > > -- > > > arton > > > > > > > -- > > arton > > > > > > _______________________________________________ > > rjb-users mailing list > > rjb-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/rjb-users > > > > > From rjb-users at rubyforge.org Sat Nov 17 10:28:05 2007 From: rjb-users at rubyforge.org (rjb-users at rubyforge.org) Date: Sat, 17 Nov 2007 07:28:05 -0800 (PST) Subject: [rjb-users] can't create Java VM In-Reply-To: <857ffc970711170427j7daf97a9u5ea5f7147fb6980d@mail.gmail.com> Message-ID: <524682.8100.qm@web34208.mail.mud.yahoo.com> I haven't followed the discussion too closely, but what happens if you put the itext jarfile on your CLASSPATH (ENV['CLASSPATH']) prior to calling Rjb::import? Maybe that's what RJB does anyway... Cheers, Rich BTW, Arton, is it possible to replace rjb-users at rubyforge... with the actual name of the sender on the mailing list? --- rjb-users at rubyforge.org wrote: > Any more ideas what could be wrong? Can somebody > explain what happens > when you call Rjb::load('lib/itext-2.0.6.jar')? > Which processes are > called? What is started? Can it be something with > user rights? I'm > becoming a bit desperate, I really need this to > work. All help is > really appreciated. Thanks. > > Kind regards, > > Nick > > > > On Nov 14, 2007 11:25 AM, Nick Snels > wrote: > > Yes I set the values in the Rails context as > indicated by the docs and > > the help in the Litespeed forum. > > > > The output of the code you gave me is: > > JAVA_HOME=/usr/java/jdk1.5.0_08/ > > > LD_LIBRARY_PATH=/usr/java/jdk1.5.0_08/jre/lib/i386/:/usr/java/jdk1.5.0_08/jre/lib/i386/client/:./ > > CurrentDir=/usr/local/lsws/verkoop > > > > So it appears as if everything is set correctly. > > > > Kind regards, > > > > Nick > > > > > > > > On Nov 14, 2007 10:39 AM, > wrote: > > > Hi, > > > > > > Can you add the action method below in your > controller ? > > > > > > def showenv > > > render :text => > "JAVA_HOME=#{ENV['JAVA_HOME']}
LD_LIBRARY_PATH=#{ENV['LD_LIBRARY_PATH']}
CurrentDir=#{Dir.pwd}" > > > end > > > > > > If you can, please show me the output. > > > > > > Regards > > > > > > On Wed, 14 Nov 2007 18:27:34 +0900 > > > > > > rjb-users at rubyforge.org???? wrote: > > > > > > > Hi, > > > > > > > > Did you set these values in Rails Contexts ? > > > > > > > > On Mon, 12 Nov 2007 20:51:36 +0100 > > > > rjb-users at rubyforge.org???? wrote: > > > > > > > > > Just added JAVA_HOME and LD_LIBRARY_PATH to > my environment variables > > > > > of Litespeed as described in > > > > > > http://www.litespeedtech.com/docs/webserver/config/rails/#env. > > > > > Restarted the server, executed the script > again, but I still get the > > > > > same error. How can I debug this? Thanks. > > > > > > > > > > Kind regards, > > > > > > > > > > Nick > > > > > > _______________________________________________ > > > > > rjb-users mailing list > > > > > rjb-users at rubyforge.org > > > > > > http://rubyforge.org/mailman/listinfo/rjb-users > > > > > > > > -- > > > > arton > > > > > > > > > > -- > > > arton > > > > > > > > > _______________________________________________ > > > rjb-users mailing list > > > rjb-users at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/rjb-users > > > > > > > > > > _______________________________________________ > rjb-users mailing list > rjb-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rjb-users > ___________________________________ Richard L. Apodaca http://depth-first.com Blog http://metamolecular.com Company From yuichiro at kuwashima.org Sat Nov 17 21:14:52 2007 From: yuichiro at kuwashima.org (KUWASHIMA Yuichiro) Date: Sun, 18 Nov 2007 11:14:52 +0900 Subject: [rjb-users] can't create Java VM In-Reply-To: <857ffc970711170427j7daf97a9u5ea5f7147fb6980d@mail.gmail.com> References: <857ffc970711121151l11dcfd24s822218b159c3789f@mail.gmail.com> <20071114182659.FD07.ARTON@e07.itscom.net> <20071114183619.FD0A.ARTON@e07.itscom.net> <857ffc970711140225h5cedf16biad5e6b2f64f1e9a9@mail.gmail.com> <857ffc970711170427j7daf97a9u5ea5f7147fb6980d@mail.gmail.com> Message-ID: <473FA01C.4080802@kuwashima.org> There is method run java process(ex:`java -help`), if you really need this to work. I have use the Java+iText from PHP4 ## such a code... # $msg = system('java -cp itext.jar FooClass', $status); ## in ruby # msg = `java -cp itext.jar FooClass' # status = $? It without a problem, careful about run parallel. From arton at e07.itscom.net Sun Nov 18 10:42:04 2007 From: arton at e07.itscom.net (arton) Date: Mon, 19 Nov 2007 00:42:04 +0900 Subject: [rjb-users] can't create Java VM In-Reply-To: <524682.8100.qm@web34208.mail.mud.yahoo.com> References: <857ffc970711170427j7daf97a9u5ea5f7147fb6980d@mail.gmail.com> <524682.8100.qm@web34208.mail.mud.yahoo.com> Message-ID: <20071119004103.0625.ARTON@e07.itscom.net> Hi, > BTW, Arton, is it possible to replace > rjb-users at rubyforge... with the actual name of the > sender on the mailing list? I've changed the setting on the list. Cheers. -- arton From rich_apodaca at yahoo.com Sun Nov 18 12:19:47 2007 From: rich_apodaca at yahoo.com (richard apodaca) Date: Sun, 18 Nov 2007 09:19:47 -0800 (PST) Subject: [rjb-users] JRuby Compatibility? In-Reply-To: <20071119004103.0625.ARTON@e07.itscom.net> Message-ID: <929392.30119.qm@web34203.mail.mud.yahoo.com> Hi All, What if I could write a single version of my Ruby/Java application and have it run with only minor modifications on both MRI/RJB and JRuby? There are currently some differences between the two that make it difficult to run Ruby/Java code on both platforms. For example, JRuby supports rubyesque methods ("object.do_something" instead of "object.doSomething"). JRuby also has an "import" method that does something different than Rjb::import. So my JRuby code isn't easily ported to MRI/RJB because these dependencies would be scattered throughout it. I'm not sure how much work this would involve, but what if RJB's API worked more like JRuby's? Just a thought... Cheers, Rich ___________________________________ Richard L. Apodaca http://depth-first.com Blog http://metamolecular.com Company From arton at e07.itscom.net Mon Nov 19 04:39:37 2007 From: arton at e07.itscom.net (arton) Date: Mon, 19 Nov 2007 18:39:37 +0900 Subject: [rjb-users] JRuby Compatibility? In-Reply-To: <929392.30119.qm@web34203.mail.mud.yahoo.com> References: <20071119004103.0625.ARTON@e07.itscom.net> <929392.30119.qm@web34203.mail.mud.yahoo.com> Message-ID: <20071119183926.063A.ARTON@e07.itscom.net> Hi, Since Rjb-1.0.8, Rjb supports ruby style method name for Java objects. So, the main difference between Jruby and Rjb is the importing method for Java classes. (If you find more difference, please let me know, I'll fix it) Below is my diary (something like blog) http://arton.no-ip.info/diary/20070911.html#p03 This entry was written in Japanese, but the code is Ruby, so I think you can read and understand how it works. Best regatds -- arton From detarmstrong at visiontree.com Mon Nov 19 13:59:29 2007 From: detarmstrong at visiontree.com (Danny Armstrong) Date: Mon, 19 Nov 2007 10:59:29 -0800 Subject: [rjb-users] can't create Java VM In-Reply-To: <857ffc970711170427j7daf97a9u5ea5f7147fb6980d@mail.gmail.com> References: <857ffc970711121151l11dcfd24s822218b159c3789f@mail.gmail.com> <20071114182659.FD07.ARTON@e07.itscom.net> <20071114183619.FD0A.ARTON@e07.itscom.net> <857ffc970711140225h5cedf16biad5e6b2f64f1e9a9@mail.gmail.com> <857ffc970711170427j7daf97a9u5ea5f7147fb6980d@mail.gmail.com> Message-ID: <1195498769.6161.13.camel@localhost> @Nick I assume you looked through the old posts on this list but I'll paste this here just in case. It is in response to a similar problem you are describing where rjb fails in Rails but works in console. Oct 22: I had a similar problem awhile back. I remember I diagnosed the problem and found it wouldn't work for some reason or another. I just can't remember why. I need Google for my brain. Anyways, I fixed it by adding a shell script that exported those variables and called mongrel. I also edited the mongrel_cluster init.d file to do the same. I blogged about it, scroll down to the "Caveats" part. http://www.peabrane.com/2007/3/5/pdf-templates-via-rails Hope that helps. On Sat, 2007-11-17 at 13:27 +0100, rjb-users at rubyforge.org wrote: > Any more ideas what could be wrong? Can somebody explain what happens > when you call Rjb::load('lib/itext-2.0.6.jar')? Which processes are > called? What is started? Can it be something with user rights? I'm > becoming a bit desperate, I really need this to work. All help is > really appreciated. Thanks. > > Kind regards, > > Nick > > > > On Nov 14, 2007 11:25 AM, Nick Snels wrote: > > Yes I set the values in the Rails context as indicated by the docs and > > the help in the Litespeed forum. > > > > The output of the code you gave me is: > > JAVA_HOME=/usr/java/jdk1.5.0_08/ > > LD_LIBRARY_PATH=/usr/java/jdk1.5.0_08/jre/lib/i386/:/usr/java/jdk1.5.0_08/jre/lib/i386/client/:./ > > CurrentDir=/usr/local/lsws/verkoop > > > > So it appears as if everything is set correctly. > > > > Kind regards, > > > > Nick > > > > > > > > On Nov 14, 2007 10:39 AM, wrote: > > > Hi, > > > > > > Can you add the action method below in your controller ? > > > > > > def showenv > > > render :text => "JAVA_HOME=#{ENV['JAVA_HOME']}
LD_LIBRARY_PATH=#{ENV['LD_LIBRARY_PATH']}
CurrentDir=#{Dir.pwd}" > > > end > > > > > > If you can, please show me the output. > > > > > > Regards > > > > > > On Wed, 14 Nov 2007 18:27:34 +0900 > > > > > > rjb-users at rubyforge.org?? wrote: > > > > > > > Hi, > > > > > > > > Did you set these values in Rails Contexts ? > > > > > > > > On Mon, 12 Nov 2007 20:51:36 +0100 > > > > rjb-users at rubyforge.org?? wrote: > > > > > > > > > Just added JAVA_HOME and LD_LIBRARY_PATH to my environment variables > > > > > of Litespeed as described in > > > > > http://www.litespeedtech.com/docs/webserver/config/rails/#env. > > > > > Restarted the server, executed the script again, but I still get the > > > > > same error. How can I debug this? Thanks. > > > > > > > > > > Kind regards, > > > > > > > > > > Nick > > > > > _______________________________________________ > > > > > rjb-users mailing list > > > > > rjb-users at rubyforge.org > > > > > http://rubyforge.org/mailman/listinfo/rjb-users > > > > > > > > -- > > > > arton > > > > > > > > > > -- > > > arton > > > > > > > > > _______________________________________________ > > > rjb-users mailing list > > > rjb-users at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/rjb-users > > > > > > > > > _______________________________________________ > rjb-users mailing list > rjb-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rjb-users From koetsier at oblivion.nl Tue Nov 20 04:41:57 2007 From: koetsier at oblivion.nl (=?UTF-8?B?QW5kcsOocyBLb2V0c2llcg==?=) Date: Tue, 20 Nov 2007 10:41:57 +0100 Subject: [rjb-users] Daemonized mongrel causes Segmentation faults In-Reply-To: <20071116233232.FD1A.ARTON@e07.itscom.net> References: <20071116015325.FD15.ARTON@e07.itscom.net> <473C9FB4.7070800@oblivion.nl> <20071116233232.FD1A.ARTON@e07.itscom.net> Message-ID: <4742ABE5.4010505@oblivion.nl> Some information about the system: ruby 1.8.5 (2006-08-25) [x86_64-linux] Java(TM) SE Runtime Environment (build 1.6.0_03-b05) mongrel_cluster 1.0.5 mongrel 1.1.1 daemons 1.0.7 rjb 1.0.11 rails 1.2.3 Linux 2.6.9 (Redhat) Regards rjb-users at rubyforge.org wrote: > Hi, > > Now I'm trying to reproduce the problem, but in my environment, > daemon mongrel runs fine with rjb, so please inform me more details. > With my test environment is > ruby 1.8.6-pl110 x86 64-linux > Java build 1.6.0-b105 > with poi-2.5.1.jar (my rjb testing app is to produce excel files with > Jakarta -POI, but I suppose that the Java libraries are not concerned) > mongrel 1.1.1 > daemons 1.0.9 > rjb 1.0.11 > rails 1.2.3 > Linux 2.6.20 (Ubuntu 4.1.2) > > Regards > > On Thu, 15 Nov 2007 20:36:20 +0100 > rjb-users at rubyforge.org?? wrote: > > >> Hello, >> >> I already read that blog and used the memory configuration flags in the >> Rjb::load command, so the problem lies somewhere else.... Still, it is >> quite strange mongrel only crashes when being run as a daemon. It cannot >> be a user/right problem since I tried starting mongrel as the mongrel >> user, which works nicely without the -d. >> >> Regards >> >> rjb-users at rubyforge.org wrote: >> >>> Hi, >>> >>> Then, have you already read http://jaywhy.wordpress.com/2007/03/05/pdf-templates-via-rails/ ? >>> If you've not, then please read it. >>> I suppose that you can either set the options -Xms... in the code as >>> Rjb::load('', ['-Xms16m', '-Xmx32m']) >>> >>> Regards >>> >>> On Thu, 15 Nov 2007 16:46:15 +0100 >>> rjb-users at rubyforge.org?? wrote: >>> >>> >>> >>>> I already tried that solution. Procfs is mounted correctly and it is >>>> only a problem when running mongrel as a daemon. I recon if procfs was >>>> not mounted (or incorrectly) it should also have segfaulted in 'normal' >>>> mode. >>>> >>>> Regards >>>> >>>> rjb-users at rubyforge.org wrote: >>>> >>>> >>>>> Hmmmm, interesting. >>>>> >>>>> http://forum.java.sun.com/thread.jspa?threadID=542672&messageID=2634141 >>>>> I'm not sure the forum thread's result - just mounting linprocfs for you, >>>>> but please try it first. >>>>> And please let me know the result. >>>>> >>>>> Regards >>>>> >>>>> On Thu, 15 Nov 2007 12:24:43 +0100 >>>>> rjb-users at rubyforge.org?? wrote: >>>>> >>>>> >>>>> >>>>> >>>>>> Hello, >>>>>> >>>>>> I am currently trying to generate PDF's from ruby using iText. On my >>>>>> development machine everything worked fine. However when I moved to the >>>>>> production server (which uses mongrel_cluster), every instance of >>>>>> mongrel crashes when initializing the Java VM. >>>>>> >>>>>> When I started a server manually with 'sudo -u mongrel ruby >>>>>> script/server ......', generating PDF's worked again. However when I >>>>>> start the server as a daemon 'sudo -u mongrel ruby script/server -d >>>>>> ......' the instance crashes again with a segmentation fault. The line >>>>>> before the segmentation fault reads 'Java HotSpot(TM) 64-Bit Server VM >>>>>> warning: Can't detect initial thread stack location - find_vma failed'. >>>>>> The machine is a Intel Xeon system. >>>>>> >>>>>> Is this a known bug, and if so is there already a solution? >>>>>> >>>>>> Thanks in advance, >>>>>> Regards Andres >>>>>> _______________________________________________ >>>>>> rjb-users mailing list >>>>>> rjb-users at rubyforge.org >>>>>> http://rubyforge.org/mailman/listinfo/rjb-users >>>>>> >>>>>> >>>>>> >>>>> -- >>>>> arton >>>>> >>>>> >>>>> >>>>> >>> -- >>> arton >>> >>> >>> > > -- > arton > > From rich_apodaca at yahoo.com Tue Nov 20 20:13:14 2007 From: rich_apodaca at yahoo.com (richard apodaca) Date: Tue, 20 Nov 2007 17:13:14 -0800 (PST) Subject: [rjb-users] JRuby Compatibility? In-Reply-To: <20071119183926.063A.ARTON@e07.itscom.net> Message-ID: <909442.54748.qm@web34212.mail.mud.yahoo.com> Hello Arton, That's great news - I completely missed it. I tried the Rubyesque method names out and they seem to work very well. Now if we had a regular old "import" statement that does the same thing as the JRuby import statement: $ jirb irb(main):001:0> import 'java.util.Vector' => ["java.util.Vector"] irb(main):002:0> v=Vector.new => # Between an import statement and the Rubyesque method names, the remaining syntax differences between JRuby and RJB/MRI would be pretty minor. I'm not sure that's a direction you want to take RJB, but it seems like it could really make it easy to switch between MRI/RJB and JRuby as the need arises. Cheers, Rich --- arton wrote: > Hi, > > Since Rjb-1.0.8, Rjb supports ruby style method name > for Java objects. > So, the main difference between Jruby and Rjb is the > importing method > for Java classes. (If you find more difference, > please let me know, I'll > fix it) > Below is my diary (something like blog) > http://arton.no-ip.info/diary/20070911.html#p03 > This entry was written in Japanese, but the code is > Ruby, so I think you > can read and understand how it works. > > Best regatds > > -- > arton > > > _______________________________________________ > rjb-users mailing list > rjb-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rjb-users > ___________________________________ Richard L. Apodaca http://depth-first.com Blog http://metamolecular.com Company From arton at e07.itscom.net Wed Nov 21 05:19:59 2007 From: arton at e07.itscom.net (arton) Date: Wed, 21 Nov 2007 19:19:59 +0900 Subject: [rjb-users] JRuby Compatibility? In-Reply-To: <909442.54748.qm@web34212.mail.mud.yahoo.com> References: <20071119183926.063A.ARTON@e07.itscom.net> <909442.54748.qm@web34212.mail.mud.yahoo.com> Message-ID: <20071121191008.0673.ARTON@e07.itscom.net> Hi I like Java's original import statement' semantic, and good coding style as per a class import style. In fact, I never wrote import java.io.*; // except for some testing or temporary programs but import java.io.IOException; // it imports IOException as a class, not an array. import java.io.FileInputStream; ... So, Rjb's import is as it is. (But sometime I'd like to write "import 'java.io.*'", so supporting the wildcard '*' may be possible, if anyone wants it. > $ jirb > irb(main):001:0> import 'java.util.Vector' > => ["java.util.Vector"] > irb(main):002:0> v=Vector.new > => # > > Between an import statement and the Rubyesque method > names, the remaining syntax differences between JRuby > and RJB/MRI would be pretty minor. > > I'm not sure that's a direction you want to take RJB, > but it seems like it could really make it easy to > switch between MRI/RJB and JRuby as the need arises. > > Cheers, > Rich > > --- arton wrote: > > > Hi, > > > > Since Rjb-1.0.8, Rjb supports ruby style method name > > for Java objects. > > So, the main difference between Jruby and Rjb is the > > importing method > > for Java classes. (If you find more difference, > > please let me know, I'll > > fix it) > > Below is my diary (something like blog) > > http://arton.no-ip.info/diary/20070911.html#p03 > > This entry was written in Japanese, but the code is > > Ruby, so I think you > > can read and understand how it works. > > > > Best regatds > > > > -- > > arton > > > > > > _______________________________________________ > > rjb-users mailing list > > rjb-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/rjb-users > > > > > ___________________________________ > > Richard L. Apodaca > > http://depth-first.com Blog > http://metamolecular.com Company > _______________________________________________ > rjb-users mailing list > rjb-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rjb-users -- arton From nick.snels at gmail.com Sun Nov 25 12:54:12 2007 From: nick.snels at gmail.com (Nick Snels) Date: Sun, 25 Nov 2007 18:54:12 +0100 Subject: [rjb-users] can't create Java VM In-Reply-To: <1195498769.6161.13.camel@localhost> References: <857ffc970711121151l11dcfd24s822218b159c3789f@mail.gmail.com> <20071114182659.FD07.ARTON@e07.itscom.net> <20071114183619.FD0A.ARTON@e07.itscom.net> <857ffc970711140225h5cedf16biad5e6b2f64f1e9a9@mail.gmail.com> <857ffc970711170427j7daf97a9u5ea5f7147fb6980d@mail.gmail.com> <1195498769.6161.13.camel@localhost> Message-ID: <857ffc970711250954i91bdd64m570adc32bdca760d@mail.gmail.com> Just to let you guys know that I solved the problem thanks to the people at litespeedtech.com . It turned out to be a memory issue. The ruby process didn't have enough memory available to start a JVM. I had to raise the memory limit under the Ruby on Rails context. Thank you very much for all your suggestions and help. Thanks. Kind regards, Nick From arton at e07.itscom.net Sun Nov 25 19:42:18 2007 From: arton at e07.itscom.net (arton) Date: Mon, 26 Nov 2007 09:42:18 +0900 Subject: [rjb-users] can't create Java VM In-Reply-To: <857ffc970711250954i91bdd64m570adc32bdca760d@mail.gmail.com> References: <1195498769.6161.13.camel@localhost> <857ffc970711250954i91bdd64m570adc32bdca760d@mail.gmail.com> Message-ID: <20071126093802.0688.ARTON@e07.itscom.net> Hi, Nick Thanks for your information that's great help for whom uses Litespeed, and congratulation on solving the issue. On Sun, 25 Nov 2007 18:54:12 +0100 "Nick Snels" さん wrote: > Just to let you guys know that I solved the problem thanks to the > people at litespeedtech.com . It turned out to be a memory issue. The > ruby process didn't have enough memory available to start a JVM. I had > to raise the memory limit under the Ruby on Rails context. Thank you > very much for all your suggestions and help. Thanks. > > Kind regards, > > Nick > _______________________________________________ > rjb-users mailing list > rjb-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rjb-users -- arton