[Bug 35843] New: No such thing as Koha::Exceptions::Exception
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35843 Bug ID: 35843 Summary: No such thing as Koha::Exceptions::Exception Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: magnus@libriotech.no QA Contact: testopia@bugs.koha-community.org On Koha 22.11.04-1 installed with the Debian packages I have some background jobs that are failing, and I see this in the logs: ==> /var/log/koha/mykoha/plack-intranet-error.log <== [2024/01/19 08:47:02] [WARN] The job has not been sent to the message broker: (Can't locate object method "throw" via package "Koha::Exceptions::Exception" (perhaps you forgot to load "Koha::Exceptions::Exception"?) at /usr/share/koha/lib/Koha/BackgroundJob.pm line 141. ) at /usr/share/koha/lib/Koha/BackgroundJob.pm line 148. The relevant code looks like this: 134 try { 135 # This namespace is wrong, it must be a vhost instead. 136 # But to do so it needs to be created on the server => much more work when a new Koha instance is created. 137 # Also, here we just want the Koha instance's name, but it's not in the config... 138 # Picking a random id (memcached_namespace) from the config 139 my $namespace = C4::Context->config('memcached_namespace'); 140 my $encoded_args = Encode::encode_utf8( $json_args ); # FIXME We should better leave this to Net::Stomp? 141 $conn->send_with_receipt( { destination => sprintf("/queue/%s-%s", $namespace, $job_queue), body => $encoded_args } ) 142 or Koha::Exceptions::Exception->throw('Job has not been enqueued'); 143 } catch { 144 $self->status('failed')->store; 145 if ( ref($_) eq 'Koha::Exceptions::Exception' ) { 146 $_->rethrow; 147 } else { 148 warn sprintf "The job has not been sent to the message broker: (%s)", $_; 149 } 150 }; This code is the only place Koha::Exceptions::Exception is mentioned in the code: $ sudo grep -rn "Koha::Exceptions::Exception" /usr/share/koha/ /usr/share/koha/lib/Koha/BackgroundJob.pm:142: or Koha::Exceptions::Exception->throw('Job has not been enqueued'); /usr/share/koha/lib/Koha/BackgroundJob.pm:145: if ( ref($_) eq 'Koha::Exceptions::Exception' ) { -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35843 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl Assignee|koha-bugs@lists.koha-commun |m.de.rooy@rijksmuseum.nl |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35843 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35843 --- Comment #1 from Magnus Enger <magnus@libriotech.no> --- Looks like the code was changed from Koha::Exception->throw('Job has not been enqueued'); to Koha::Exceptions::Exception->throw('Job has not been enqueued'); by bug 30172: https://git.koha-community.org/Koha-community/Koha/commit/7585db29c08078d2b8... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35843 --- Comment #2 from Magnus Enger <magnus@libriotech.no> --- Looks like there was Koha::Exceptions::Exception, but it was changed to Koha::Exception by bug 29857. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35843 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35843 --- Comment #3 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 161177 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=161177&action=edit Bug 35843: Correct invalid exception Test plan: Run background job tests. Especially the changed one. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35843 Magnus Enger <magnus@libriotech.no> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35843 Magnus Enger <magnus@libriotech.no> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #161177|0 |1 is obsolete| | --- Comment #4 from Magnus Enger <magnus@libriotech.no> --- Created attachment 161181 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=161181&action=edit Bug 35843: Correct invalid exception Test plan: Run background job tests. Especially the changed one. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Magnus Enger <magnus@libriotech.no> All test pass when running this: prove t/db_dependent/Koha/BackgroundJobs* -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35843 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #161181|0 |1 is obsolete| | --- Comment #5 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 161311 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=161311&action=edit Bug 35843: Correct invalid exception Test plan: Run background job tests. Especially the changed one. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Magnus Enger <magnus@libriotech.no> All test pass when running this: prove t/db_dependent/Koha/BackgroundJobs* Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35843 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA QA Contact|testopia@bugs.koha-communit |martin.renvoize@ptfs-europe |y.org |.com CC| |martin.renvoize@ptfs-europe | |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35843 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |24.05.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35843 --- Comment #6 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 24.05! Well done everyone, thank you! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35843 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|24.05.00 |24.05.00,23.11.03 released in| | CC| |fridolin.somers@biblibre.co | |m Status|Pushed to master |Pushed to stable --- Comment #7 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 23.11.x for 23.11.03 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35843 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |35962 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35962 [Bug 35962] t/db_dependent/Koha/BackgroundJob.t failing on D10 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35843 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Pushed to oldstable Version(s)|24.05.00,23.11.03 |24.05.00,23.11.03,23.05.09 released in| | CC| |lucas@bywatersolutions.com --- Comment #8 from Lucas Gass <lucas@bywatersolutions.com> --- Backported to 23.05.x for upcoming 23.05.09 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35843 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC|martin.renvoize@ptfs-europe | |.com | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35843 Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to oldstable |RESOLVED CC| |wainuiwitikapark@catalyst.n | |et.nz Resolution|--- |FIXED --- Comment #9 from Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> --- Not backporting to 22.11 unless requested -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org