You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by il...@apache.org on 2014/06/26 13:01:07 UTC

svn commit: r1605732 - in /syncope/branches/1_1_X: console/src/main/webapp/css/style.css core/src/main/java/org/apache/syncope/core/sync/impl/SyncopeSyncResultHandler.java

Author: ilgrosso
Date: Thu Jun 26 11:01:07 2014
New Revision: 1605732

URL: http://svn.apache.org/r1605732
Log:
[SYNCOPE-511] Now reporting root cause message

Modified:
    syncope/branches/1_1_X/console/src/main/webapp/css/style.css
    syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/sync/impl/SyncopeSyncResultHandler.java

Modified: syncope/branches/1_1_X/console/src/main/webapp/css/style.css
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/console/src/main/webapp/css/style.css?rev=1605732&r1=1605731&r2=1605732&view=diff
==============================================================================
--- syncope/branches/1_1_X/console/src/main/webapp/css/style.css (original)
+++ syncope/branches/1_1_X/console/src/main/webapp/css/style.css Thu Jun 26 11:01:07 2014
@@ -483,4 +483,10 @@ div.wicket-aa ul li.selected {
   padding: 2px;
   margin:0;
 }
-
+pre {
+  white-space: -moz-pre-wrap; /* Mozilla, supported since 1999 */
+  white-space: -pre-wrap; /* Opera */
+  white-space: -o-pre-wrap; /* Opera */
+  white-space: pre-wrap; /* CSS3 - Text module (Candidate Recommendation) http://www.w3.org/TR/css3-text/#white-space */
+  word-wrap: break-word; /* IE 5.5+ */
+}
\ No newline at end of file

Modified: syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/sync/impl/SyncopeSyncResultHandler.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/sync/impl/SyncopeSyncResultHandler.java?rev=1605732&r1=1605731&r2=1605732&view=diff
==============================================================================
--- syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/sync/impl/SyncopeSyncResultHandler.java (original)
+++ syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/sync/impl/SyncopeSyncResultHandler.java Thu Jun 26 11:01:07 2014
@@ -26,7 +26,8 @@ import java.util.HashMap;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.commons.lang3.exception.ExceptionUtils;
 import org.apache.syncope.common.mod.AttributeMod;
 import org.apache.syncope.common.mod.RoleMod;
 import org.apache.syncope.common.mod.UserMod;
@@ -475,7 +476,7 @@ public class SyncopeSyncResultHandler im
 
         final List<ConnectorObject> found = connector.search(objectClass,
                 new EqualsFilter(new Name(name)), connector.getOperationOptions(
-                attrUtil.getMappingItems(syncTask.getResource(), MappingPurpose.SYNCHRONIZATION)));
+                        attrUtil.getMappingItems(syncTask.getResource(), MappingPurpose.SYNCHRONIZATION)));
 
         if (found.isEmpty()) {
             LOG.debug("No {} found on {} with __NAME__ {}", objectClass, syncTask.getResource(), name);
@@ -593,7 +594,7 @@ public class SyncopeSyncResultHandler im
                 resultStatus = Result.FAILURE;
             } catch (Exception e) {
                 result.setStatus(SyncResult.Status.FAILURE);
-                result.setMessage(e.getMessage());
+                result.setMessage(ExceptionUtils.getRootCauseMessage(e));
                 LOG.error("Could not create {} {} ", attrUtil.getType(), delta.getUid().getUidValue(), e);
                 output = e;
                 resultStatus = Result.FAILURE;
@@ -650,7 +651,8 @@ public class SyncopeSyncResultHandler im
             LOG.error("Update of user {} failed, trying to sync its status anyway (if configured)", id, e);
 
             result.setStatus(SyncResult.Status.FAILURE);
-            result.setMessage("Update failed, trying to sync status anyway (if configured)\n" + e.getMessage());
+            result.setMessage("Update failed, trying to sync status anyway (if configured)\n"
+                    + ExceptionUtils.getRootCauseMessage(e));
 
             updated = new WorkflowResult<Map.Entry<Long, Boolean>>(
                     new AbstractMap.SimpleEntry<Long, Boolean>(id, false), new PropagationByResource(),
@@ -789,7 +791,7 @@ public class SyncopeSyncResultHandler im
                 resultStatus = Result.FAILURE;
             } catch (Exception e) {
                 result.setStatus(SyncResult.Status.FAILURE);
-                result.setMessage(e.getMessage());
+                result.setMessage(ExceptionUtils.getRootCauseMessage(e));
                 LOG.error("Could not update {} {}", attrUtil.getType(), delta.getUid().getUidValue(), e);
                 output = e;
                 resultStatus = Result.FAILURE;
@@ -886,7 +888,7 @@ public class SyncopeSyncResultHandler im
                         resultStatus = Result.SUCCESS;
                     } catch (Exception e) {
                         result.setStatus(SyncResult.Status.FAILURE);
-                        result.setMessage(e.getMessage());
+                        result.setMessage(ExceptionUtils.getRootCauseMessage(e));
                         LOG.error("Could not delete {} {}", attrUtil.getType(), id, e);
                         output = e;
                     }