You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geronimo.apache.org by Michał Kudła <m1...@wp.pl> on 2008/02/25 01:43:00 UTC
Geronimo 2.1 + Pluto 2.0 context /testsite NULL due to restrict
I trying install Pluto 2.0-SNAPSHOT
(fresh : svn checkout https://svn.apache.org/repos/asf/portals/pluto/trunk
pluto-2.0-SNAPSHOT: 630666.)
but
Under Pluto (in some portlets) site I recieve error
Error rendering portlet.
java.lang.NullPointerException
at
org.apache.pluto.internal.PortletDescriptorRegistry.createDefinition(PortletDescriptorRegistry.java:143)
at
org.apache.pluto.internal.PortletDescriptorRegistry.getPortletAppDD(PortletDescriptorRegistry.java:122)
at
org.apache.pluto.internal.impl.PortletEntityImpl.load(PortletEntityImpl.java:191)
at
org.apache.pluto.internal.impl.PortletEntityImpl.getPortletDefinition(PortletEntityImpl.java:155)
at
org.apache.pluto.internal.impl.MimeResponseImpl.(MimeResponseImpl.java:116)
at
org.apache.pluto.internal.impl.RenderResponseImpl.(RenderResponseImpl.java:57)
at
org.apache.pluto.core.DefaultPortletEnvironmentService.createRenderResponse(DefaultPortletEnvironmentService.java:70)
at
org.apache.pluto.core.PortletContainerImpl.doRender(PortletContainerImpl.java:192)
I investigated and I found some place
PortletContextManager.java I have changes some lines
public static ServletContext getPortletContext(ServletContext
portalContext, String portletContextPath) {
System.out.println("getPortletContext(ServletContext:"+
portalContext+", String:"+ portletContextPath+")");
if (Configuration.preventUnecessaryCrossContext()) {
String portalPath = getContextPath(portalContext);
if (portalPath.equals(portletContextPath)) {
System.out.println("... ret 290:"+portalContext);
return portalContext;
}
}
ServletContext ret = portalContext.getContext(portletContextPath);
System.out.println("... ret 294:"+ret);
return ret;
}
After starting geronimo/pluto i receive some descriptions in geronimo.out
Geronimo Application Server started
getPortletContext(ServletContext:org.apache.catalina.core.ApplicationContextFacade@1d62d02,
String:/pluto)
... ret 294:org.apache.catalina.core.ApplicationContextFacade@1d62d02
InternalPortletWindowImpl(ServletContext:org.apache.catalina.core.ApplicationContextFacade@1d62d02,
PortletWindow:org.apache.pluto.driver.core.PortletWindowImpl@9e5e7e)
PortletEntityImpl(ServletContext:org.apache.catalina.core.ApplicationContextFacade@1d62d02,
String:AboutPortlet)
!!!!!!!!
crossContext:org.apache.catalina.core.ApplicationContextFacade@1d62d02
getPortletContext(ServletContext:org.apache.catalina.core.ApplicationContextFacade@1d62d02,
String:/testsuite)
... ret 294:null
InternalPortletWindowImpl(ServletContext:null,
PortletWindow:org.apache.pluto.driver.core.PortletWindowImpl@85a317)
PortletEntityImpl(ServletContext:null, String:TestPortlet1)
!!!!!!!! crossContext:null
!!!!!!!! servletContext:null, PORTLET_XML/WEB-INF/portlet.xml
You can see, that for context /testsuite ServletContext is null
In help I found that null can be returned
getContext
ServletContext getContext(java.lang.String uripath)
Returns a ServletContext object that corresponds to a specified URL on the
server.
This method allows servlets to gain access to the context for various parts
of the server, and as needed obtain RequestDispatcher objects from the
context. The given path must be begin with "/", is interpreted relative to
the server's document root and is matched against the context roots of other
web applications hosted on this container.
In a security conscious environment, the servlet container may return null
for a given URL.
Parameters:
uripath - a String specifying the context path of another web application in
the container.
Returns:
the ServletContext object that corresponds to the named URL, or null if
either none exists or the container wishes to restrict this access.
See Also:
RequestDispatcher
I think, that Geronimo bloks access to context /testsuite
Can I, in some way, release this blocking?
Or, there are some way in joining Pluto 2.0 with Geronimo 2.1?
Sorry for my bad English
--
View this message in context: http://www.nabble.com/Geronimo-2.1-%2B-Pluto-2.0-context--testsite-NULL-due-to-restrict-tp15672018s134p15672018.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.