[rjb-users] can't create Java VM

rjb-users at rubyforge.org rjb-users at rubyforge.org
Sat Nov 10 15:08:59 EST 2007


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,  <rjb-users at rubyforge.org> 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
>
>


More information about the rjb-users mailing list