<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Matt,<br>
I had the same problem as you. The link you referenced pinpoints the
problem exactly with Oracle. It may be<br>
that a newer version of Rails fixes the problem, I don't know. I am
using Rails 2.1.2 and I had the same problem.<br>
<br>
To fix this, I patched my copy of brdb_job_queue.rb located at
vendor/plugins/backgroundrb/lib/backgroundrb/brdb_job_queue.rb<br>
using the solution in the link (select all relevant records, then use
the first one in the list). I have only used this<br>
with Oracle and am running on linux.<br>
<br>
I have attached the file,maybe it will help.<br>
<br>
Regards,<br>
Don<br>
<br>
Stone, Matthew A wrote:
<blockquote cite="mid:C5E7C1A8.2D9B%25mstone@austin.utexas.edu"
type="cite">
<title>Issue starting backgroundrb server (with Oracle)</title>
<font face="Calibri, Verdana, Helvetica, Arial"><span
style="font-size: 11pt;">Hello All,<br>
<br>
I’ve recently started trying to use backgroundrb and I’m running into
an issue with starting the server. I’m running OSX (leopard) and rails
2.0.2 with an oracle database. <br>
When I run ./script/backgroundrb start I get the following error: <br>
/Library/Ruby/Gems/1.8/gems/activerecord-2.0.2/lib/active_record/connection_adapters/abstract_adapter.rb:150:in
`log': OCIError: ORA-02014: cannot select FOR UPDATE from view with
DISTINCT, GROUP BY, etc.: select * from (select raw_sql_.*, rownum
raw_rnum_ from (SELECT * FROM event_tracking.bdrb_job_queues WHERE (
worker_name = 'upload_invitees_worker' AND taken = 0 AND scheduled_at
<= '2009-03-19 13:38:04' ) ) raw_sql_ where rownum <= 1) where
raw_rnum_ > 0 FOR UPDATE (ActiveRecord::StatementInvalid)<br>
<br>
I’ve read in a few places that when using Oracle it may be a good idea
to remove the lines that say allow_concurrency = true, and I’ve done
that.<br>
<br>
Also, I saw that there may be an issue with oracle adapter with a
SELECT ... FOR UPDATE statement locking rows here: <a
moz-do-not-send="true"
href="http://kseebaldt.blogspot.com/2007/11/synchronizing-using-active-record.html">http://kseebaldt.blogspot.com/2007/11/synchronizing-using-active-record.html</a>
The comment points to this occurring with backgroundrb.<br>
<br>
I would appreciate any help that you all can provide.<br>
<br>
Thanks,<br>
Matt Stone</span></font>
<pre wrap="">
<hr size="4" width="90%">
_______________________________________________
Backgroundrb-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Backgroundrb-devel@rubyforge.org">Backgroundrb-devel@rubyforge.org</a>
<a class="moz-txt-link-freetext" href="http://rubyforge.org/mailman/listinfo/backgroundrb-devel">http://rubyforge.org/mailman/listinfo/backgroundrb-devel</a></pre>
</blockquote>
</body>
</html>