Forum: JRuby Stack Level Too Deep

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Chris G. (Guest)
on 2009-04-13 01:35
Hello!

I get a "Stack Level Too Deep"-Error with JRuby when I spawn a thread
containing code which accesses the database to update a row. When I run
this code sequentielly (not in a thread), it works fine.

The database-connection is a JDBC-connection.

The code looks like this:

@t = Thread.new do
          begin
            Java::checkout.Files.main main_args.to_java :String

            # critical code line
            @version.update_attribute(:status_checkout, 2)
          rescue StandardError => e
            puts "[svnkit] "+e
            @version.update_attribute(:exception_checkout, e)
          end
        end

        @t.run

Can anyone help me please?
This topic is locked and can not be replied to.