password = rs.getString(1);
} catch (SQLException ex) {
- LoginException le = new LoginException("Query failed");
+ if (logger.isTraceEnabled() == true) {
+ logger.error("Could not open database to read AuthN tables.", ex);
+ }
+ LoginException le = new LoginException("Authentication query failed: " + ex.getLocalizedMessage());
le.initCause(ex);
throw le;
} catch (Exception ex) {
import org.nuxeo.ecm.core.api.model.PropertyException;
import org.nuxeo.ecm.core.api.model.PropertyNotFoundException;
import org.nuxeo.ecm.core.api.repository.RepositoryInstance;
+import org.nuxeo.runtime.transaction.TransactionHelper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* Checks to see if the refName has changed, and if so,
* uses utilities to find all references and update them.
+ * @throws Exception
*/
- protected void handleItemRefNameReferenceUpdate() {
+ protected void handleItemRefNameReferenceUpdate() throws Exception {
if (newRefNameOnUpdate != null && oldRefNameOnUpdate != null) {
// We have work to do.
if (logger.isDebugEnabled()) {
RepositoryInstance repoSession,\r
String oldRefName,\r
String newRefName,\r
- String refPropName ) {\r
+ String refPropName ) throws Exception {\r
Map<String, ServiceBindingType> queriedServiceBindings = new HashMap<String, ServiceBindingType>();\r
Map<String, List<AuthRefConfigInfo>> authRefFieldsByService = new HashMap<String, List<AuthRefConfigInfo>>();\r
int nRefsFound = 0;\r
}\r
pageNumProcessed++;\r
}\r
- } catch(Exception e) {\r
+ } catch (Exception e) {\r
logger.error("Internal error updating the AuthorityRefDocs: " + e.getLocalizedMessage());\r
logger.debug(Tools.errorToString(e, true));\r
+ throw e;\r
}\r
logger.debug("updateAuthorityRefDocs replaced a total of: "+nRefsFound);\r
return nRefsFound;\r