Author: taylor
Date: Wed Sep 21 01:54:22 2016
New Revision: 1761658

URL: http://svn.apache.org/viewvc?rev=1761658&view=rev
Log:
Improve logging for PortletApp failures, getting root cause. Fix import error 
in registry migration.

Modified:
    
portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/tools/pamanager/PortletApplicationManager.java
    
portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/tools/migration/JetspeedRegistryMigration.java
    
portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/main/java/org/apache/jetspeed/serializer/JetspeedSecuritySerializer.java

Modified: 
portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/tools/pamanager/PortletApplicationManager.java
URL: 
http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/tools/pamanager/PortletApplicationManager.java?rev=1761658&r1=1761657&r2=1761658&view=diff
==============================================================================
--- 
portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/tools/pamanager/PortletApplicationManager.java
 (original)
+++ 
portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/tools/pamanager/PortletApplicationManager.java
 Wed Sep 21 01:54:22 2016
@@ -16,13 +16,6 @@
  */
 package org.apache.jetspeed.tools.pamanager;
 
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.concurrent.locks.ReadWriteLock;
-import java.util.concurrent.locks.ReentrantReadWriteLock;
-
 import org.apache.jetspeed.cluster.NodeManager;
 import org.apache.jetspeed.components.portletregistry.PortletRegistry;
 import org.apache.jetspeed.components.portletregistry.RegistryException;
@@ -44,6 +37,13 @@ import org.apache.jetspeed.util.descript
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.locks.ReadWriteLock;
+import java.util.concurrent.locks.ReentrantReadWriteLock;
+
 /**
  * PortletApplicationManager
  *
@@ -690,10 +690,15 @@ public class PortletApplicationManager i
         catch (Exception e)
         {
             String msg = "Error starting portlet application " + contextName;
-            
+            if (e.getCause() != null) {
+                msg += ", root cause: " + e.getCause().getMessage();
+            }
             if (!silent || log.isDebugEnabled())
             {
                 log.error(msg, e);
+                if (e.getCause() != null) {
+                    log.error(e.getCause().getMessage(), e.getCause());
+                }
             }
             // monitor PA for changes
             // do not add monitor if a monitor already exists

Modified: 
portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/tools/migration/JetspeedRegistryMigration.java
URL: 
http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/tools/migration/JetspeedRegistryMigration.java?rev=1761658&r1=1761657&r2=1761658&view=diff
==============================================================================
--- 
portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/tools/migration/JetspeedRegistryMigration.java
 (original)
+++ 
portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/tools/migration/JetspeedRegistryMigration.java
 Wed Sep 21 01:54:22 2016
@@ -1350,7 +1350,7 @@ public class JetspeedRegistryMigration i
                 case JETSPEED_SCHEMA_VERSION_2_1_3:
                 case JETSPEED_SCHEMA_VERSION_2_1_4:
                 {
-                    if (tableName.equals("SEQ_LOCALIZED_DESCRIPTION") && 
!localizedDescriptions.isEmpty() && (maxLocalizedDescriptionId > 0))
+                    if (!localizedDescriptionSeqMigrated && 
tableName.equals("SEQ_LOCALIZED_DESCRIPTION") && 
!localizedDescriptions.isEmpty() && (maxLocalizedDescriptionId > 0))
                     {
                         version = 
(maxLocalizedDescriptionId+(grabSize-1))/grabSize;
                         maxKey = version*grabSize;

Modified: 
portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/main/java/org/apache/jetspeed/serializer/JetspeedSecuritySerializer.java
URL: 
http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/main/java/org/apache/jetspeed/serializer/JetspeedSecuritySerializer.java?rev=1761658&r1=1761657&r2=1761658&view=diff
==============================================================================
--- 
portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/main/java/org/apache/jetspeed/serializer/JetspeedSecuritySerializer.java
 (original)
+++ 
portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/main/java/org/apache/jetspeed/serializer/JetspeedSecuritySerializer.java
 Wed Sep 21 01:54:22 2016
@@ -16,20 +16,6 @@
  */
 package org.apache.jetspeed.serializer;
 
-import java.security.Principal;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import javax.security.auth.Subject;
-
-import org.slf4j.Logger;
 import org.apache.jetspeed.security.Credential;
 import org.apache.jetspeed.security.CredentialPasswordEncoder;
 import org.apache.jetspeed.security.Group;
@@ -70,6 +56,19 @@ import org.apache.jetspeed.serializer.ob
 import org.apache.jetspeed.serializer.objects.JSUserGroups;
 import org.apache.jetspeed.serializer.objects.JSUserRoles;
 import org.apache.jetspeed.serializer.objects.JSUserUsers;
+import org.slf4j.Logger;
+
+import javax.security.auth.Subject;
+import java.security.Principal;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
 
 /**
  * JetspeedSecuritySerializer - Security component serializer
@@ -987,7 +986,7 @@ public class JetspeedSecuritySerializer
      * 
      * @param isPublic
      *            public or private credential
-     * @param newUser
+     * @param newPrincipal
      *            the JS user object reference
      * @param credential
      *            the credential object



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscr...@portals.apache.org
For additional commands, e-mail: jetspeed-dev-h...@portals.apache.org

Reply via email to