You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by cz...@apache.org on 2006/03/15 13:29:58 UTC
svn commit: r386063 -
/cocoon/trunk/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/pluto/adapter/PortletAdapter.java
Author: cziegeler
Date: Wed Mar 15 04:29:55 2006
New Revision: 386063
URL: http://svn.apache.org/viewcvs?rev=386063&view=rev
Log:
Improve logging
Modified:
cocoon/trunk/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/pluto/adapter/PortletAdapter.java
Modified: cocoon/trunk/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/pluto/adapter/PortletAdapter.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/pluto/adapter/PortletAdapter.java?rev=386063&r1=386062&r2=386063&view=diff
==============================================================================
--- cocoon/trunk/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/pluto/adapter/PortletAdapter.java (original)
+++ cocoon/trunk/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/pluto/adapter/PortletAdapter.java Wed Mar 15 04:29:55 2006
@@ -126,6 +126,9 @@
PortletDefinitionRegistry registry = (PortletDefinitionRegistry) portletContainerEnvironment.getContainerService(PortletDefinitionRegistry.class);
final String portletEntityId = (String) getConfiguration(coplet, "portlet");
+ if ( this.getLogger().isDebugEnabled() ) {
+ this.getLogger().debug("Coplet " + coplet.getId() + " tries to login into portlet " + portletEntityId);
+ }
PortletApplicationEntity pae = registry.getPortletApplicationEntityList().get(ObjectIDImpl.createFromString("cocoon"));
PortletEntity portletEntity = ((PortletEntityListImpl)pae.getPortletEntityList()).add(pae, portletEntityId, coplet, registry);
@@ -153,11 +156,13 @@
this.portletContainer.portletLoad(portletWindow, req.getRequest(portletWindow),
res);
} catch (Exception e) {
- this.getLogger().error("Error loading portlet " + portletEntityId, e);
+ this.getLogger().error("Error loading portlet " + portletEntityId + " for instance " + coplet.getId(), e);
// remove portlet entity
coplet.removeTemporaryAttribute("window");
((PortletEntityListImpl)pae.getPortletEntityList()).remove(portletEntity);
}
+ } else {
+ this.getLogger().error("Error finding portlet " + portletEntityId + " for instance " + coplet.getId() + " - no definition found.");
}
}
@@ -171,10 +176,11 @@
throw new SAXException("Unable to execute JSR-168 portlets because of missing servlet context.");
}
try {
+ final String portletEntityId = (String) getConfiguration(coplet, "portlet");
// get the window
final PortletWindow window = (PortletWindow)coplet.getTemporaryAttribute("window");
if ( window == null ) {
- throw new SAXException("Portlet couldn't be loaded: " + coplet.getId());
+ throw new SAXException("Portlet couldn't be loaded: " + coplet.getId() + "(" + portletEntityId + ")");
}
final Map objectModel = ContextHelper.getObjectModel(this.context);
final ServletRequestImpl req = (ServletRequestImpl) objectModel.get("portlet-request");