sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r1161413 - /sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/internal/services/DefaultPortletRegistryService.java
Date Thu, 25 Aug 2011 06:50:03 GMT
Author: cziegeler
Date: Thu Aug 25 06:50:03 2011
New Revision: 1161413

URL: http://svn.apache.org/viewvc?rev=1161413&view=rev
Log:
Fix another class loading problem with Java 6

Modified:
    sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/internal/services/DefaultPortletRegistryService.java

Modified: sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/internal/services/DefaultPortletRegistryService.java
URL: http://svn.apache.org/viewvc/sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/internal/services/DefaultPortletRegistryService.java?rev=1161413&r1=1161412&r2=1161413&view=diff
==============================================================================
--- sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/internal/services/DefaultPortletRegistryService.java
(original)
+++ sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/internal/services/DefaultPortletRegistryService.java
Thu Aug 25 06:50:03 2011
@@ -26,7 +26,6 @@ import java.util.Map;
 import javax.portlet.Portlet;
 import javax.portlet.PortletException;
 import javax.servlet.ServletContext;
-import javax.xml.bind.JAXBContext;
 
 import org.apache.pluto.container.ContainerInfo;
 import org.apache.pluto.container.PortletAppDescriptorService;
@@ -148,8 +147,8 @@ public class DefaultPortletRegistryServi
                 }
                 // store context path in servlet context!
                 servletContext.setAttribute(SC_ATTR_APP, applicationName);
-            } catch (PortletContainerException pce) {
-
+            } catch (final PortletContainerException pce) {
+                logger.error("Unable to load portlet application descriptor from context
'/" + applicationName + "'", pce);
             }
         } else {
             if (logger.isInfoEnabled()) {
@@ -292,7 +291,7 @@ public class DefaultPortletRegistryServi
         PortletApplicationDefinition portletApp = null;
         final ClassLoader oldTCCL = Thread.currentThread().getContextClassLoader();
         try {
-            Thread.currentThread().setContextClassLoader(JAXBContext.class.getClassLoader());
+            Thread.currentThread().setContextClassLoader(ServletContext.class.getClassLoader());
             InputStream paIn = servletContext.getResourceAsStream(PORTLET_XML);
             InputStream webIn = servletContext.getResourceAsStream(WEB_XML);
             if (paIn == null) {
@@ -304,7 +303,6 @@ public class DefaultPortletRegistryServi
                     "'. Are you sure it is in the deployed package?");
             }
             portletApp = portletDDService.read(name, contextPath, paIn);
-            Thread.currentThread().setContextClassLoader(oldTCCL);
             portletDDService.mergeWebDescriptor(portletApp, webIn);
         } catch (Exception ex) {
             throw new PortletContainerException("Unable to load portlet descriptor for context
" + contextPath, ex);



Mime
View raw message