Warning: Can't synchronize with repository "(default)" (/home/git/ome.git does not appear to be a Git repository.). Look in the Trac log for more information.
Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

Task #2940 (closed)

Opened 14 years ago

Closed 14 years ago

Service Factory sharedResources().areTablesEnabled() always returning true.

Reported by: bwzloranger Owned by: jamoore
Priority: minor Milestone: OMERO-Beta4.2.1
Component: Services Version: n.a.
Keywords: n.a. Cc: bwzloranger
Resources: n.a. Referenced By: n.a.
References: n.a. Remaining Time: 0.0d
Sprint: 2010-09-09 (16)

Description

Even if tables not installed, areTablesEnabled() seems to be always reuturning 'true'

Change History (3)

comment:1 Changed 14 years ago by bwzloranger

Trying:

diff --git a/components/blitz/src/ome/services/blitz/impl/SharedResourcesI.java b/components/blitz/src/ome/services/blitz/impl/SharedResource
index 70ba454..9a94358 100644
--- a/components/blitz/src/ome/services/blitz/impl/SharedResourcesI.java
+++ b/components/blitz/src/ome/services/blitz/impl/SharedResourcesI.java
@@ -267,7 +267,14 @@ public class SharedResourcesI extends AbstractAmdServant implements
                             final ResultHolder<TablesPrx> holder) {
                         final TablesPrx server = TablesPrxHelper
                                 .checkedCast(prx);
-                        holder.set(server);
+                        try {
+                            if (server != null && server.getRepository() != null) {
+                                holder.set(server);
+                            }
+                        } catch (Exception e) {
+                            log.debug("Exception on getRepository: " + e);
+                            holder.set(null);
+                        }
                     }
                 });
     }

comment:2 Changed 14 years ago by jmoore

  • Milestone changed from Unscheduled to OMERO-Beta4.2.1
  • Sprint set to 2010-09-09 (16)
  • Status changed from new to assigned

comment:3 Changed 14 years ago by jmoore

  • Remaining Time set to 0
  • Resolution set to fixed
  • Status changed from assigned to closed

(In [8160]) Adding stronger check to SharedResourcesI.areTablesEnabled (Fixes #2940)

Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.66372 sec.)

We're Hiring!