You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pluto-user@portals.apache.org by Graham Klyne <gr...@oucs.ox.ac.uk> on 2005/11/29 09:58:08 UTC
Doubts about strategy of ServletUnit testing
I seem to have run into a limitation of ServletUnit for testing Pluto code. It
appears that when the portal driver attempts to retrieve a ServerContext value
for the target portlet, ServletUnit simply returns a hard-coded null, which
(unsurprisingly) results in portlet invocation failure. Also, it is not clear
to me that ServletUnit has the ability to deal with more than one servlet and/or
context in a single run (i.e. it reads a single application's web.xml file,
without any obvious provision for dealing with more).
I may take a little while longer to look at the ServletUnit code, but it is
looking as if I may have to fall back on using HTTPUnit to test via a running
Tomcat instance, which will make the tests slower to run than I would have liked.
Does anyone have any edifying thoughts, comments or pointers?
#g
--
Graham Klyne
Research Technology Service
Oxford University Computing Services
Re: Doubts about strategy of ServletUnit testing (retract previous
report)
Posted by Graham Klyne <gr...@oucs.ox.ac.uk>.
David H. DeWolf wrote:
> Nice progress! You're almost there :)
Thanks!
What follows is a bit rambling. In summary: I've managed to get the test
portlets to render in the unit test framework by copying the tld files to the
/testsuite area, and modifying the testsuit web.xml. I feel there's a better
way, but for now I think it does what I need. I'll continue to build unit tests
to check the rendered content returned, then to run and check (some of) the
actual tests.
> It looks like you're not picking up the tld. We have a similar bug
> logged in which this happens with JBoss. My guess is that it's a result
> of the fact that the jar containing the tlds is either not referenced
> within web.xmol (which it doesn't have to be) or within a jar in
> WEB-INF/lib. Instead, it's in the taglib jar which is included in
> common along with the container libraries.
>
> However, now that I've seperated the classes into their own jar - they
> don't have to be deployed that way. . .perhaps we can think through the
> reprecussions of adding that jar to web-inf/lib . . .
>
> Play around with different possibilities and let me know what you find.
> I think this is probably something that's not just an issue you get
> past but more of an issue we as a pluto team need to think about.
Unfortunately, I only half understand what you say here. I think you're right
that its to do with the TLD. I'm not aware of a jar containing the tlds -- in
my test environment they are in directory "test/portal/WEB-INF/tld", which
contains two files: "pluto.tld" and "portlet.tld". I'm also not sure what you
mean by "the taglib jar which is included in common along with the container
libraries" (I'm still pretty new to the details of servlets, so there are
certainly gaps between what I know and what I should know here).
On closer examination of the stack at the point of the exception (repeated here
for convenience)
>> [[
>> Nested Exception is org.apache.jasper.JasperException: The absolute uri:
>> http://java.sun.com/portlet cannot be resolved in either web.xml or
>> the jar
>> files deployed with this application
>> ]]
I find:
The first occurrence of "http://java.sun.com/portlet" that I see is this:
uri= "http://java.sun.com/portlet"
in org.apache.jasper.compiler.Parser. The code is at line 418, in the call of
addTagLib about here:
[[
if (pageInfo.getTaglib(uri) == null) {
String[] location = ctxt.getTldLocation(uri);
pageInfo.addTaglib(uri,
new TagLibraryInfoImpl(ctxt,
parserController,
prefix,
uri,
location,
err));
}
]]
The value of uri is determined somewhere in this code:
[[
Attributes attrs = parseAttributes();
String uri = attrs.getValue("uri");
String prefix = attrs.getValue("prefix");
if (prefix != null) {
Mark prevMark = pageInfo.getNonCustomTagPrefix(prefix);
if (prevMark != null) {
err.jspError(reader.mark(), "jsp.error.prefix.use_before_dcl",
prefix, prevMark.getFile(), "" + prevMark.getLineNumber());
}
if (uri != null) {
String uriPrev = pageInfo.getURI(prefix);
if (uriPrev != null && !uriPrev.equals(uri)) {
err.jspError(reader.mark(), "jsp.error.prefix.refined",
prefix, uri, uriPrev);
}
]]
The line:
String uri = attrs.getValue("uri");
returns uri= "http://java.sun.com/portlet"
It appears to be processing file introduction.jsp at this point, and I note that
this contains:
[[
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>
<portlet:defineObjects/>
]]
So it appears that "http://java.sun.com/portlet" is a reasonable resource to be
looking for here.
I'm digging around the running installation to see if I can find a candidate for
this. The only possibility I find is portlet.tld irtself, which is deployed
into directory /pluto/WEB-INF/tld. Further, the file /pluto/WEB-INF/web.xml
contains:
[[
<taglib>
<taglib-uri>http://java.sun.com/portlet</taglib-uri>
<taglib-location>/WEB-INF/tld/portlet.tld</taglib-location>
</taglib>
]]
But I note that the file being processed here is
"testsuite/jsp/introduction.jsp", so I guess that somehow the system is now
failing to see tag library definitions in the pluto web application directory.
To test this, I'll copy the files and web.xml entry into /testsuite. No joy
there, so I'll transfer the <taglib> entries into testsuite/WEB-INF/web.xml.
Success! (I still need to examine the content in some more detail to confirm
that the rendered content is correct, but I'm no longer getting the portlet
exception and a previous problem with the test result seems to be overcome.
This isn't pretty, but it does suggest to me that the information needed to
access tag libraries in the pluto web application area is not being passed to
the servlet that runs the portlet. (How is this information usually passed to
the portlet servlet context?)
#g
--
Here's the copnsole log from my last successful run:
[[
DEBUG - ServletContext created: path:
DEBUG - ServletContext created: path: /pluto
DEBUG - WebApplication path: /pluto, context:
com.meterware.servletunit.ServletUnitServletContext@296f76
INFO - Starting up Pluto Portal Driver...
DEBUG - * Retreaving portal driver configuration...
DEBUG - Retrieving driver configuration from:
/WEB-INF/pluto-portal-driver-services-config.xml
INFO - Loading XML bean definitions from (no description)
DEBUG - Using JAXP implementation
[org.apache.xerces.jaxp.DocumentBuilderFactoryImpl@1478a43]
DEBUG - Trying to resolve XML entity with public ID [-//SPRING//DTD BEAN//EN]
and system ID [http://www.springframework.org/dtd/spring-beans.dtd]
DEBUG - Trying to locate [spring-beans.dtd] under
[/org/springframework/beans/factory/xml/]
DEBUG - Found beans DTD [http://www.springframework.org/dtd/spring-beans.dtd] in
classpath
DEBUG - Loading bean definitions
DEBUG - Default lazy init 'false'
DEBUG - Default dependency check 'none'
DEBUG - Default autowire 'no'
DEBUG - No XML 'id' specified - using 'DriverConfiguration' as ID and [] as aliases
DEBUG - Registering bean definition with id 'DriverConfiguration'
DEBUG - No XML 'id' specified - using 'PropertyConfigService' as ID and [] as
aliases
DEBUG - Registering bean definition with id 'PropertyConfigService'
DEBUG - No XML 'id' specified - using 'PortletRegistryService' as ID and [] as
aliases
DEBUG - Registering bean definition with id 'PortletRegistryService'
DEBUG - No XML 'id' specified - using 'RenderConfigService' as ID and [] as aliases
DEBUG - Registering bean definition with id 'RenderConfigService'
DEBUG - Found 4 <bean> elements defining beans
INFO - Creating shared instance of singleton bean 'DriverConfiguration'
DEBUG - Creating instance of bean 'DriverConfiguration' with merged definition
[Root bean with class
[org.apache.pluto.driver.config.impl.DriverConfigurationImpl] defined in (no
description)]
DEBUG - Resolving reference from property 'constructor argument' in bean
'DriverConfiguration' to bean 'RenderConfigService'
INFO - Creating shared instance of singleton bean 'RenderConfigService'
DEBUG - Creating instance of bean 'RenderConfigService' with merged definition
[Root bean with class
[org.apache.pluto.driver.services.impl.resource.ResourceServicesImpl] defined in
(no description)]
DEBUG - Getting BeanInfo for class
[org.apache.pluto.driver.services.impl.resource.ResourceServicesImpl]
DEBUG - Caching PropertyDescriptors for class
[org.apache.pluto.driver.services.impl.resource.ResourceServicesImpl]
DEBUG - Found property 'class' of type [class java.lang.Class]; editor=[null]
DEBUG - Found property 'containerName' of type [class java.lang.String];
editor=[null]
DEBUG - Found property 'defaultPage' of type [class
org.apache.pluto.driver.services.impl.resource.PageConfig]; editor=[null]
DEBUG - Found property 'pages' of type [interface java.util.List]; editor=[null]
DEBUG - Found property 'portalName' of type [class java.lang.String]; editor=[null]
DEBUG - Found property 'portalVersion' of type [class java.lang.String];
editor=[null]
DEBUG - Found property 'portletApplications' of type [interface java.util.Set];
editor=[null]
DEBUG - Found property 'supportedPortletModes' of type [interface
java.util.Set]; editor=[null]
DEBUG - Found property 'supportedWindowStates' of type [interface
java.util.Set]; editor=[null]
DEBUG - Class
[org.apache.pluto.driver.services.impl.resource.ResourceServicesImpl] is cache-safe
DEBUG - Invoking BeanPostProcessors before initialization of bean
'RenderConfigService'
DEBUG - Invoking BeanPostProcessors after initialization of bean
'RenderConfigService'
DEBUG - Resolving reference from property 'constructor argument' in bean
'DriverConfiguration' to bean 'PortletRegistryService'
INFO - Creating shared instance of singleton bean 'PortletRegistryService'
DEBUG - Creating instance of bean 'PortletRegistryService' with merged
definition [Root bean with class
[org.apache.pluto.driver.services.impl.resource.ResourceServicesImpl] defined in
(no description)]
DEBUG - Using cached introspection results for class
[org.apache.pluto.driver.services.impl.resource.ResourceServicesImpl]
DEBUG - Invoking BeanPostProcessors before initialization of bean
'PortletRegistryService'
DEBUG - Invoking BeanPostProcessors after initialization of bean
'PortletRegistryService'
DEBUG - Resolving reference from property 'constructor argument' in bean
'DriverConfiguration' to bean 'PropertyConfigService'
INFO - Creating shared instance of singleton bean 'PropertyConfigService'
DEBUG - Creating instance of bean 'PropertyConfigService' with merged definition
[Root bean with class
[org.apache.pluto.driver.services.impl.resource.ResourceServicesImpl] defined in
(no description)]
DEBUG - Using cached introspection results for class
[org.apache.pluto.driver.services.impl.resource.ResourceServicesImpl]
DEBUG - Invoking BeanPostProcessors before initialization of bean
'PropertyConfigService'
DEBUG - Invoking BeanPostProcessors after initialization of bean
'PropertyConfigService'
DEBUG - Getting BeanInfo for class
[org.apache.pluto.driver.config.impl.DriverConfigurationImpl]
DEBUG - Caching PropertyDescriptors for class
[org.apache.pluto.driver.config.impl.DriverConfigurationImpl]
DEBUG - Found property 'class' of type [class java.lang.Class]; editor=[null]
DEBUG - Found property 'containerName' of type [class java.lang.String];
editor=[null]
DEBUG - Found property 'pages' of type [interface java.util.Collection];
editor=[null]
DEBUG - Found property 'portalName' of type [class java.lang.String]; editor=[null]
DEBUG - Found property 'portalVersion' of type [class java.lang.String];
editor=[null]
DEBUG - Found property 'portletApplications' of type [interface
java.util.Collection]; editor=[null]
DEBUG - Found property 'supportedPortletModes' of type [interface
java.util.Collection]; editor=[null]
DEBUG - Found property 'supportedWindowStates' of type [interface
java.util.Collection]; editor=[null]
DEBUG - Class [org.apache.pluto.driver.config.impl.DriverConfigurationImpl] is
cache-safe
INFO - Bean 'DriverConfiguration' instantiated via constructor [public
org.apache.pluto.driver.config.impl.DriverConfigurationImpl(org.apache.pluto.driver.config.impl.PropertyConfigService,org.apache.pluto.driver.config.impl.PortletRegistryService,org.apache.pluto.driver.config.impl.RenderConfigService)]
DEBUG - Invoking BeanPostProcessors before initialization of bean
'DriverConfiguration'
DEBUG - Invoking BeanPostProcessors after initialization of bean
'DriverConfiguration'
DEBUG - Setting up digester...
DEBUG - - - Adding PortletApp Configuration for: /testsuite
DEBUG - Driver Configuration of type class
org.apache.pluto.driver.config.impl.DriverConfigurationImpl Initialized and
Ready For Service
DEBUG - * Creating portal context [pluto-portal-driver/1.1.0-ALPHA]...
DEBUG - * Creating container services...
DEBUG - * Creating portlet container...
INFO - Portlet Container [Pluto Portal Driver] created.
DEBUG - * Initializing portlet container...
DEBUG - Portlet Container [Pluto Portal Driver] successfully initialized.
INFO - Pluto Portal Driver started.
DEBUG - ServletContext.setAttribute: path: /pluto,
driverConfig=org.apache.pluto.driver.config.impl.DriverConfigurationImpl@1b4c1d7
DEBUG - ServletContext.setAttribute: path: /pluto,
portletContainer=org.apache.pluto.core.PortletContainerImpl@1264eab
DEBUG - ServletContext created: path: /testsuite
DEBUG - WebApplication path: /testsuite, context:
com.meterware.servletunit.ServletUnitServletContext@11a01dd
DEBUG - String Manager Created for package: org.apache.pluto.core
DEBUG - Using Descriptor Service Impl:
org.apache.pluto.descriptors.services.castor.PortletAppDescriptorServiceImpl
DEBUG - PortalDriverServlet.doGet: PortalURL: http://localhost:0/pluto/portal?
DEBUG - PortalDriverServlet.doGet: actionWindowId: null
DEBUG - PortalDriverServlet.doGet: driverConfig:
org.apache.pluto.driver.config.impl.DriverConfigurationImpl@1b4c1d7
DEBUG - Rendering Portal: Requested Page: null
DEBUG - Requested page is null. Returning default: Test Page
DEBUG - Parent class loader is: sun.misc.Launcher$AppClassLoader@92e78c
DEBUG - Scratch dir for the JSP engine is: C:\DOCUME~1\Graham\LOCALS~1\Temp
DEBUG - IMPORTANT: Do not modify the generated servlets
DEBUG - JspEngine --> /WEB-INF/fragments/portlet.jsp
DEBUG - ServletPath: /WEB-INF/fragments/portlet.jsp
DEBUG - PathInfo: null
DEBUG - RealPath:
D:\Work\OxfordCS\Pluto-1.1\pluto-unittest\src\test\portal\WEB-INF\fragments\portlet.jsp
DEBUG - RequestURI: /pluto/WEB-INF/fragments/portlet.jsp
DEBUG - QueryString:
DEBUG - Request Params:
DEBUG - JspEngine --> /WEB-INF/fragments/template.jsp
DEBUG - ServletPath: /WEB-INF/fragments/template.jsp
DEBUG - PathInfo: null
DEBUG - RealPath:
D:\Work\OxfordCS\Pluto-1.1\pluto-unittest\src\test\portal\WEB-INF\fragments\template.jsp
DEBUG - RequestURI: /pluto/WEB-INF/fragments/template.jsp
DEBUG - QueryString:
DEBUG - Request Params:
DEBUG - JspEngine --> /WEB-INF/fragments/portlet-page.jsp
DEBUG - ServletPath: /WEB-INF/fragments/template.jsp
DEBUG - PathInfo: null
DEBUG - RealPath:
D:\Work\OxfordCS\Pluto-1.1\pluto-unittest\src\test\portal\WEB-INF\fragments\portlet-page.jsp
DEBUG - RequestURI: /pluto/WEB-INF/fragments/template.jsp
DEBUG - QueryString:
DEBUG - Request Params:
DEBUG - JspEngine --> /WEB-INF/fragments/portlet-skin.jsp
DEBUG - ServletPath: /WEB-INF/fragments/template.jsp
DEBUG - PathInfo: null
DEBUG - RealPath:
D:\Work\OxfordCS\Pluto-1.1\pluto-unittest\src\test\portal\WEB-INF\fragments\portlet-skin.jsp
DEBUG - RequestURI: /pluto/WEB-INF/fragments/template.jsp
DEBUG - QueryString:
DEBUG - Request Params:
DEBUG - Evaluated portletId to: /testsuite.TestPortlet1
DEBUG - Rendering Portlet Window:
org.apache.pluto.driver.services.impl.resource.PortletWindowConfig@e4e358
DEBUG - getContext: /testsuite, context:
com.meterware.servletunit.ServletUnitServletContext@11a01dd
DEBUG - Portlet Container [Pluto Portal Driver]: Render request recieved.
DEBUG - String Manager Created for package: org.apache.pluto.core.impl
DEBUG - Portlet Container [Pluto Portal Driver]: Invoker Created.
DEBUG - Performing Render Invocation
DEBUG - Loading PortletAppDD for context: /testsuite
DEBUG - getContext: /testsuite, context:
com.meterware.servletunit.ServletUnitServletContext@11a01dd
DEBUG - Retrieved context:
com.meterware.servletunit.ServletUnitServletContext@11a01dd
DEBUG - PortletRequestDispatcher requested: /jsp/introduction.jsp
DEBUG - Parent class loader is: sun.misc.Launcher$AppClassLoader@92e78c
DEBUG - Scratch dir for the JSP engine is: C:\DOCUME~1\Graham\LOCALS~1\Temp
DEBUG - IMPORTANT: Do not modify the generated servlets
DEBUG - JspEngine --> /jsp/introduction.jsp
DEBUG - ServletPath: /WEB-INF/fragments/portlet-skin.jsp
DEBUG - PathInfo: null
DEBUG - RealPath:
D:\Work\OxfordCS\Pluto-1.1\pluto-unittest\src\test\testsuite\jsp\introduction.jsp
DEBUG - RequestURI: /pluto/WEB-INF/fragments/portlet-skin.jsp
DEBUG - QueryString:
DEBUG - Request Params:
DEBUG - Generated
/C:/DOCUME~1/Graham/LOCALS~1/Temp//org/apache/jsp/jsp\introduction_jsp.java
total=16434 generate=751 validate=15602
DEBUG - Compiled
/C:/DOCUME~1/Graham/LOCALS~1/Temp//org/apache/jsp/jsp\introduction_jsp.java 6559ms
DEBUG - constant pool count: 435
DEBUG - 1 read class attr -- 'org/apache/jsp/jsp/introduction_jsp'
DEBUG - 2 copying 2 bytes
DEBUG - 3 read class attr -- 'org/apache/jasper/runtime/HttpJspBase'
DEBUG - 4 copying 2 bytes
DEBUG - 5 read class attr -- 'org/apache/jasper/runtime/JspSourceDependent'
DEBUG - 6 copying 2 bytes
DEBUG - 7 read class attr -- '_jspx_dependants'
DEBUG - 8 read class attr -- 'Ljava/util/Vector;'
DEBUG - 9 read class attr -- '_jspx_tagPool_portlet_defineObjects_nobody'
DEBUG - 10 read class attr -- 'Lorg/apache/jasper/runtime/TagHandlerPool;'
DEBUG - 11 read class attr -- '_jspx_tagPool_c_forEach_varStatus_var_items'
DEBUG - 12 read class attr -- '_jspx_tagPool_c_out_value_nobody'
DEBUG - 13 read class attr -- '_jspx_tagPool_portlet_actionURL_var_secure'
DEBUG - 14 read class attr -- '_jspx_tagPool_portlet_param_value_name_nobody'
DEBUG - 15 read class attr -- '_jspx_tagPool_c_forEach_var_items'
DEBUG - 16 read class attr -- 'class$0'
DEBUG - 17 read class attr -- 'Ljava/lang/Class;'
DEBUG - 18 read class attr -- 'Synthetic'
DEBUG - 19 read class attr -- 'class$1'
DEBUG - 20 read class attr -- 'class$2'
DEBUG - 21 read class attr -- 'class$3'
DEBUG - 22 read class attr -- 'class$4'
DEBUG - 23 read class attr -- '<clinit>'
DEBUG - 24 read class attr -- '()V'
DEBUG - 25 read class attr -- 'Code'
DEBUG - 26 read class attr -- 'java/util/Vector'
DEBUG - 27 copying 2 bytes
DEBUG - 28 read class attr -- '<init>'
DEBUG - 29 read class attr -- '(I)V'
DEBUG - 30 copying 4 bytes
DEBUG - 31 copying 4 bytes
DEBUG - 32 copying 4 bytes
DEBUG - 33 copying 4 bytes
DEBUG - 34 read class attr -- '/WEB-INF/tld/portlet.tld'
DEBUG - 35 copying 2 bytes
DEBUG - 36 read class attr -- 'add'
DEBUG - 37 read class attr -- '(Ljava/lang/Object;)Z'
DEBUG - 38 copying 4 bytes
DEBUG - 39 copying 4 bytes
DEBUG - 40 read class attr -- 'LineNumberTable'
DEBUG - 41 read class attr -- 'LocalVariableTable'
DEBUG - 42 copying 4 bytes
DEBUG - 43 copying 4 bytes
DEBUG - 44 read class attr -- 'this'
DEBUG - 45 read class attr -- 'Lorg/apache/jsp/jsp/introduction_jsp;'
DEBUG - 46 read class attr -- 'getDependants'
DEBUG - 47 read class attr -- '()Ljava/util/List;'
DEBUG - 48 read class attr -- '_jspInit'
DEBUG - 49 read class attr -- 'getServletConfig'
DEBUG - 50 read class attr -- '()Ljavax/servlet/ServletConfig;'
DEBUG - 51 copying 4 bytes
DEBUG - 52 copying 4 bytes
DEBUG - 53 read class attr -- 'org/apache/jasper/runtime/TagHandlerPool'
DEBUG - 54 copying 2 bytes
DEBUG - 55 read class attr -- 'getTagHandlerPool'
DEBUG - 56 read class attr --
'(Ljavax/servlet/ServletConfig;)Lorg/apache/jasper/runtime/TagHandlerPool;'
DEBUG - 57 copying 4 bytes
DEBUG - 58 copying 4 bytes
DEBUG - 59 copying 4 bytes
DEBUG - 60 copying 4 bytes
DEBUG - 61 copying 4 bytes
DEBUG - 62 copying 4 bytes
DEBUG - 63 copying 4 bytes
DEBUG - 64 copying 4 bytes
DEBUG - 65 copying 4 bytes
DEBUG - 66 copying 4 bytes
DEBUG - 67 copying 4 bytes
DEBUG - 68 copying 4 bytes
DEBUG - 69 copying 4 bytes
DEBUG - 70 copying 4 bytes
DEBUG - 71 read class attr -- '_jspDestroy'
DEBUG - 72 read class attr -- 'release'
DEBUG - 73 copying 4 bytes
DEBUG - 74 copying 4 bytes
DEBUG - 75 read class attr -- '_jspService'
DEBUG - 76 read class attr --
'(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V'
DEBUG - 77 read class attr -- 'Exceptions'
DEBUG - 78 read class attr -- 'java/io/IOException'
DEBUG - 79 copying 2 bytes
DEBUG - 80 read class attr -- 'javax/servlet/ServletException'
DEBUG - 81 copying 2 bytes
DEBUG - 82 read class attr -- 'javax/servlet/jsp/JspFactory'
DEBUG - 83 copying 2 bytes
DEBUG - 84 read class attr -- 'getDefaultFactory'
DEBUG - 85 read class attr -- '()Ljavax/servlet/jsp/JspFactory;'
DEBUG - 86 copying 4 bytes
DEBUG - 87 copying 4 bytes
DEBUG - 88 read class attr -- 'text/html'
DEBUG - 89 copying 2 bytes
DEBUG - 90 read class attr -- 'javax/servlet/http/HttpServletResponse'
DEBUG - 91 copying 2 bytes
DEBUG - 92 read class attr -- 'setContentType'
DEBUG - 93 read class attr -- '(Ljava/lang/String;)V'
DEBUG - 94 copying 4 bytes
DEBUG - 95 copying 4 bytes
DEBUG - 96 read class attr -- 'getPageContext'
DEBUG - 97 read class attr --
'(Ljavax/servlet/Servlet;Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Ljava/lang/String;ZIZ)Ljavax/servlet/jsp/PageContext;'
DEBUG - 98 copying 4 bytes
DEBUG - 99 copying 4 bytes
DEBUG - 100 read class attr -- 'javax/servlet/jsp/PageContext'
DEBUG - 101 copying 2 bytes
DEBUG - 102 read class attr -- 'getServletContext'
DEBUG - 103 read class attr -- '()Ljavax/servlet/ServletContext;'
DEBUG - 104 copying 4 bytes
DEBUG - 105 copying 4 bytes
DEBUG - 106 copying 4 bytes
DEBUG - 107 read class attr -- 'getSession'
DEBUG - 108 read class attr -- '()Ljavax/servlet/http/HttpSession;'
DEBUG - 109 copying 4 bytes
DEBUG - 110 copying 4 bytes
DEBUG - 111 read class attr -- 'getOut'
DEBUG - 112 read class attr -- '()Ljavax/servlet/jsp/JspWriter;'
DEBUG - 113 copying 4 bytes
DEBUG - 114 copying 4 bytes
DEBUG - 115 read class attr -- 'javax/servlet/jsp/JspWriter'
DEBUG - 116 copying 2 bytes
DEBUG - 117 read class attr -- 'write'
DEBUG - 118 copying 4 bytes
DEBUG - 119 copying 4 bytes
DEBUG - 120 read class attr -- '
'
DEBUG - 121 copying 2 bytes
DEBUG - 122 copying 4 bytes
DEBUG - 123 copying 4 bytes
DEBUG - 124 copying 4 bytes
DEBUG - 125 copying 4 bytes
DEBUG - 126 read class attr -- 'org.apache.pluto.tags.DefineObjectsTag'
DEBUG - 127 copying 2 bytes
DEBUG - 128 read class attr -- 'java/lang/Class'
DEBUG - 129 copying 2 bytes
DEBUG - 130 read class attr -- 'forName'
DEBUG - 131 read class attr -- '(Ljava/lang/String;)Ljava/lang/Class;'
DEBUG - 132 copying 4 bytes
DEBUG - 133 copying 4 bytes
DEBUG - 134 read class attr -- 'java/lang/NoClassDefFoundError'
DEBUG - 135 copying 2 bytes
DEBUG - 136 read class attr -- 'java/lang/Throwable'
DEBUG - 137 copying 2 bytes
DEBUG - 138 read class attr -- 'getMessage'
DEBUG - 139 read class attr -- '()Ljava/lang/String;'
DEBUG - 140 copying 4 bytes
DEBUG - 141 copying 4 bytes
DEBUG - 142 copying 4 bytes
DEBUG - 143 copying 4 bytes
DEBUG - 144 read class attr -- 'get'
DEBUG - 145 read class attr -- '(Ljava/lang/Class;)Ljavax/servlet/jsp/tagext/Tag;'
DEBUG - 146 copying 4 bytes
DEBUG - 147 copying 4 bytes
DEBUG - 148 read class attr -- 'org/apache/pluto/tags/DefineObjectsTag'
DEBUG - 149 copying 2 bytes
DEBUG - 150 read class attr -- 'setPageContext'
DEBUG - 151 read class attr -- '(Ljavax/servlet/jsp/PageContext;)V'
DEBUG - 152 copying 4 bytes
DEBUG - 153 copying 4 bytes
DEBUG - 154 read class attr -- 'setParent'
DEBUG - 155 read class attr -- '(Ljavax/servlet/jsp/tagext/Tag;)V'
DEBUG - 156 copying 4 bytes
DEBUG - 157 copying 4 bytes
DEBUG - 158 read class attr -- 'doStartTag'
DEBUG - 159 read class attr -- '()I'
DEBUG - 160 copying 4 bytes
DEBUG - 161 copying 4 bytes
DEBUG - 162 read class attr -- 'renderRequest'
DEBUG - 163 copying 2 bytes
DEBUG - 164 read class attr -- 'findAttribute'
DEBUG - 165 read class attr -- '(Ljava/lang/String;)Ljava/lang/Object;'
DEBUG - 166 copying 4 bytes
DEBUG - 167 copying 4 bytes
DEBUG - 168 read class attr -- 'javax/portlet/PortletRequest'
DEBUG - 169 copying 2 bytes
DEBUG - 170 read class attr -- 'renderResponse'
DEBUG - 171 copying 2 bytes
DEBUG - 172 read class attr -- 'javax/portlet/RenderResponse'
DEBUG - 173 copying 2 bytes
DEBUG - 174 read class attr -- 'portletConfig'
DEBUG - 175 copying 2 bytes
DEBUG - 176 read class attr -- 'javax/portlet/PortletConfig'
DEBUG - 177 copying 2 bytes
DEBUG - 178 read class attr -- 'doEndTag'
DEBUG - 179 copying 4 bytes
DEBUG - 180 copying 4 bytes
DEBUG - 181 read class attr -- 'reuse'
DEBUG - 182 copying 4 bytes
DEBUG - 183 copying 4 bytes
DEBUG - 184 read class attr -- '<TABLE>
'
DEBUG - 185 copying 2 bytes
DEBUG - 186 read class attr -- '<TR><TD>
'
DEBUG - 187 copying 2 bytes
DEBUG - 188 read class attr -- ' <P>
'
DEBUG - 189 copying 2 bytes
DEBUG - 190 read class attr -- ' This portlet is a portlet specification
compatibility test portlet.
'
DEBUG - 191 copying 2 bytes
DEBUG - 192 read class attr -- ' It provides several tests of verying
complexities which will assist
'
DEBUG - 193 copying 2 bytes
DEBUG - 194 read class attr -- ' in evaluating compliance with the portlet
specification. It was originally
'
DEBUG - 195 copying 2 bytes
DEBUG - 196 read class attr -- ' developed for testing Apache Pluto, however,
it does not utilize any
'
DEBUG - 197 copying 2 bytes
DEBUG - 198 read class attr -- ' proprietary APIs and should work with all
compliant portlet containers.
'
DEBUG - 199 copying 2 bytes
DEBUG - 200 read class attr -- ' </P>
'
DEBUG - 201 copying 2 bytes
DEBUG - 202 read class attr -- ' <P>Please select one of the following tests:
'
DEBUG - 203 copying 2 bytes
DEBUG - 204 read class attr -- ' <TABLE>
'
DEBUG - 205 copying 2 bytes
DEBUG - 206 read class attr -- ' '
DEBUG - 207 copying 2 bytes
DEBUG - 208 copying 4 bytes
DEBUG - 209 copying 4 bytes
DEBUG - 210 read class attr -- 'org.apache.taglibs.standard.tag.el.core.ForEachTag'
DEBUG - 211 copying 2 bytes
DEBUG - 212 read class attr -- 'org/apache/taglibs/standard/tag/el/core/ForEachTag'
DEBUG - 213 copying 2 bytes
DEBUG - 214 copying 4 bytes
DEBUG - 215 copying 4 bytes
DEBUG - 216 read class attr -- 'test'
DEBUG - 217 copying 2 bytes
DEBUG - 218 read class attr -- 'setVar'
DEBUG - 219 copying 4 bytes
DEBUG - 220 copying 4 bytes
DEBUG - 221 read class attr -- '${tests}'
DEBUG - 222 copying 2 bytes
DEBUG - 223 read class attr -- 'setItems'
DEBUG - 224 copying 4 bytes
DEBUG - 225 copying 4 bytes
DEBUG - 226 read class attr -- 'status'
DEBUG - 227 copying 2 bytes
DEBUG - 228 read class attr -- 'setVarStatus'
DEBUG - 229 copying 4 bytes
DEBUG - 230 copying 4 bytes
DEBUG - 231 copying 4 bytes
DEBUG - 232 read class attr -- ' <TR><TD>'
DEBUG - 233 copying 2 bytes
DEBUG - 234 read class attr -- '_jspx_meth_c_out_0'
DEBUG - 235 read class attr --
'(Ljavax/servlet/jsp/tagext/JspTag;Ljavax/servlet/jsp/PageContext;[I)Z'
DEBUG - 236 copying 4 bytes
DEBUG - 237 copying 4 bytes
DEBUG - 238 read class attr -- '</TD>
'
DEBUG - 239 copying 2 bytes
DEBUG - 240 read class attr -- ' <TD>'
DEBUG - 241 copying 2 bytes
DEBUG - 242 read class attr -- '_jspx_meth_c_out_1'
DEBUG - 243 copying 4 bytes
DEBUG - 244 copying 4 bytes
DEBUG - 245 read class attr -- ' '
DEBUG - 246 copying 2 bytes
DEBUG - 247 copying 4 bytes
DEBUG - 248 copying 4 bytes
DEBUG - 249 read class attr -- 'org.apache.pluto.tags.ActionURLTag'
DEBUG - 250 copying 2 bytes
DEBUG - 251 read class attr -- 'org/apache/pluto/tags/ActionURLTag'
DEBUG - 252 copying 2 bytes
DEBUG - 253 copying 4 bytes
DEBUG - 254 copying 4 bytes
DEBUG - 255 read class attr -- 'isSecure'
DEBUG - 256 read class attr -- '()Z'
DEBUG - 257 copying 4 bytes
DEBUG - 258 copying 4 bytes
DEBUG - 259 read class attr -- 'True'
DEBUG - 260 copying 2 bytes
DEBUG - 261 read class attr -- 'False'
DEBUG - 262 copying 2 bytes
DEBUG - 263 read class attr -- 'setSecure'
DEBUG - 264 copying 4 bytes
DEBUG - 265 copying 4 bytes
DEBUG - 266 read class attr -- 'url'
DEBUG - 267 copying 2 bytes
DEBUG - 268 copying 4 bytes
DEBUG - 269 copying 4 bytes
DEBUG - 270 read class attr -- 'java/lang/String'
DEBUG - 271 copying 2 bytes
DEBUG - 272 read class attr -- ' '
DEBUG - 273 copying 2 bytes
DEBUG - 274 copying 4 bytes
DEBUG - 275 copying 4 bytes
DEBUG - 276 read class attr -- 'org.apache.pluto.tags.ParamTag'
DEBUG - 277 copying 2 bytes
DEBUG - 278 read class attr -- 'org/apache/pluto/tags/ParamTag'
DEBUG - 279 copying 2 bytes
DEBUG - 280 copying 4 bytes
DEBUG - 281 copying 4 bytes
DEBUG - 282 read class attr -- 'testId'
DEBUG - 283 copying 2 bytes
DEBUG - 284 read class attr -- 'setName'
DEBUG - 285 copying 4 bytes
DEBUG - 286 copying 4 bytes
DEBUG - 287 read class attr -- 'java/lang/StringBuffer'
DEBUG - 288 copying 2 bytes
DEBUG - 289 read class attr -- 'getAttribute'
DEBUG - 290 copying 4 bytes
DEBUG - 291 copying 4 bytes
DEBUG - 292 read class attr -- 'javax/servlet/jsp/jstl/core/LoopTagStatus'
DEBUG - 293 copying 2 bytes
DEBUG - 294 read class attr -- 'getIndex'
DEBUG - 295 copying 4 bytes
DEBUG - 296 copying 4 bytes
DEBUG - 297 read class attr -- 'valueOf'
DEBUG - 298 read class attr -- '(I)Ljava/lang/String;'
DEBUG - 299 copying 4 bytes
DEBUG - 300 copying 4 bytes
DEBUG - 301 copying 4 bytes
DEBUG - 302 read class attr -- 'toString'
DEBUG - 303 copying 4 bytes
DEBUG - 304 copying 4 bytes
DEBUG - 305 read class attr -- 'setValue'
DEBUG - 306 copying 4 bytes
DEBUG - 307 copying 4 bytes
DEBUG - 308 copying 4 bytes
DEBUG - 309 copying 4 bytes
DEBUG - 310 read class attr -- 'param'
DEBUG - 311 copying 2 bytes
DEBUG - 312 read class attr -- '${test.actionParameters}'
DEBUG - 313 copying 2 bytes
DEBUG - 314 read class attr -- 'java/util/Map$Entry'
DEBUG - 315 copying 2 bytes
DEBUG - 316 read class attr -- ' '
DEBUG - 317 copying 2 bytes
DEBUG - 318 read class attr -- 'getKey'
DEBUG - 319 read class attr -- '()Ljava/lang/Object;'
DEBUG - 320 copying 4 bytes
DEBUG - 321 copying 4 bytes
DEBUG - 322 read class attr -- 'java/lang/Object'
DEBUG - 323 copying 2 bytes
DEBUG - 324 copying 4 bytes
DEBUG - 325 read class attr -- 'getValue'
DEBUG - 326 copying 4 bytes
DEBUG - 327 copying 4 bytes
DEBUG - 328 read class attr -- 'doAfterBody'
DEBUG - 329 copying 4 bytes
DEBUG - 330 copying 4 bytes
DEBUG - 331 copying 4 bytes
DEBUG - 332 read class attr -- 'popBody'
DEBUG - 333 copying 4 bytes
DEBUG - 334 copying 4 bytes
DEBUG - 335 read class attr -- 'doCatch'
DEBUG - 336 read class attr -- '(Ljava/lang/Throwable;)V'
DEBUG - 337 copying 4 bytes
DEBUG - 338 copying 4 bytes
DEBUG - 339 read class attr -- 'doFinally'
DEBUG - 340 copying 4 bytes
DEBUG - 341 copying 4 bytes
DEBUG - 342 copying 4 bytes
DEBUG - 343 copying 4 bytes
DEBUG - 344 read class attr -- ' <TD><A href="'
DEBUG - 345 copying 2 bytes
DEBUG - 346 read class attr -- '_jspx_meth_c_out_2'
DEBUG - 347 copying 4 bytes
DEBUG - 348 copying 4 bytes
DEBUG - 349 read class attr -- '">Test</A></TD></TR>
'
DEBUG - 350 copying 2 bytes
DEBUG - 351 read class attr -- ' </TABLE>
'
DEBUG - 352 copying 2 bytes
DEBUG - 353 read class attr -- ' </TD></TR>
'
DEBUG - 354 copying 2 bytes
DEBUG - 355 read class attr -- '</TABLE>
'
DEBUG - 356 copying 2 bytes
DEBUG - 357 read class attr -- 'javax/servlet/jsp/SkipPageException'
DEBUG - 358 copying 2 bytes
DEBUG - 359 read class attr -- 'getBufferSize'
DEBUG - 360 copying 4 bytes
DEBUG - 361 copying 4 bytes
DEBUG - 362 read class attr -- 'clearBuffer'
DEBUG - 363 copying 4 bytes
DEBUG - 364 copying 4 bytes
DEBUG - 365 read class attr -- 'handlePageException'
DEBUG - 366 copying 4 bytes
DEBUG - 367 copying 4 bytes
DEBUG - 368 read class attr -- 'releasePageContext'
DEBUG - 369 copying 4 bytes
DEBUG - 370 copying 4 bytes
DEBUG - 371 read class attr -- 'java/lang/ClassNotFoundException'
DEBUG - 372 copying 2 bytes
DEBUG - 373 read class attr -- 'request'
DEBUG - 374 read class attr -- 'Ljavax/servlet/http/HttpServletRequest;'
DEBUG - 375 read class attr -- 'response'
DEBUG - 376 read class attr -- 'Ljavax/servlet/http/HttpServletResponse;'
DEBUG - 377 read class attr -- '_jspxFactory'
DEBUG - 378 read class attr -- 'Ljavax/servlet/jsp/JspFactory;'
DEBUG - 379 read class attr -- 'pageContext'
DEBUG - 380 read class attr -- 'Ljavax/servlet/jsp/PageContext;'
DEBUG - 381 read class attr -- 'out'
DEBUG - 382 read class attr -- 'Ljavax/servlet/jsp/JspWriter;'
DEBUG - 383 read class attr -- '_jspx_out'
DEBUG - 384 read class attr -- '_jspx_page_context'
DEBUG - 385 read class attr -- 'Ljavax/portlet/PortletRequest;'
DEBUG - 386 read class attr -- '_jspx_th_portlet_defineObjects_0'
DEBUG - 387 read class attr -- 'Lorg/apache/pluto/tags/DefineObjectsTag;'
DEBUG - 388 read class attr -- '_jspx_th_c_forEach_0'
DEBUG - 389 read class attr --
'Lorg/apache/taglibs/standard/tag/el/core/ForEachTag;'
DEBUG - 390 read class attr -- '_jspx_push_body_count_c_forEach_0'
DEBUG - 391 read class attr -- '[I'
DEBUG - 392 read class attr -- '_jspx_eval_c_forEach_0'
DEBUG - 393 read class attr -- 'I'
DEBUG - 394 read class attr -- '_jspx_th_portlet_actionURL_0'
DEBUG - 395 read class attr -- 'Lorg/apache/pluto/tags/ActionURLTag;'
DEBUG - 396 read class attr -- '_jspx_eval_portlet_actionURL_0'
DEBUG - 397 read class attr -- '_jspx_th_portlet_param_0'
DEBUG - 398 read class attr -- 'Lorg/apache/pluto/tags/ParamTag;'
DEBUG - 399 read class attr -- '_jspx_th_c_forEach_1'
DEBUG - 400 read class attr -- '_jspx_push_body_count_c_forEach_1'
DEBUG - 401 read class attr -- '_jspx_eval_c_forEach_1'
DEBUG - 402 read class attr -- 'parm'
DEBUG - 403 read class attr -- 'Ljava/util/Map$Entry;'
DEBUG - 404 read class attr -- '_jspx_th_portlet_param_1'
DEBUG - 405 read class attr -- 'evalDoAfterBody'
DEBUG - 406 read class attr -- '_jspx_exception'
DEBUG - 407 read class attr -- 'Ljava/lang/Throwable;'
DEBUG - 408 read class attr -- 't'
DEBUG - 409 copying 4 bytes
DEBUG - 410 copying 4 bytes
DEBUG - 411 read class attr -- 'org.apache.taglibs.standard.tag.el.core.OutTag'
DEBUG - 412 copying 2 bytes
DEBUG - 413 read class attr -- 'org/apache/taglibs/standard/tag/el/core/OutTag'
DEBUG - 414 copying 2 bytes
DEBUG - 415 copying 4 bytes
DEBUG - 416 read class attr -- 'javax/servlet/jsp/tagext/Tag'
DEBUG - 417 copying 2 bytes
DEBUG - 418 copying 4 bytes
DEBUG - 419 read class attr -- '${test.plt}'
DEBUG - 420 copying 2 bytes
DEBUG - 421 copying 4 bytes
DEBUG - 422 copying 4 bytes
DEBUG - 423 copying 4 bytes
DEBUG - 424 read class attr -- 'Ljavax/servlet/jsp/tagext/JspTag;'
DEBUG - 425 read class attr -- '_jspx_th_c_out_0'
DEBUG - 426 read class attr -- 'Lorg/apache/taglibs/standard/tag/el/core/OutTag;'
DEBUG - 427 read class attr -- '${test.name}'
DEBUG - 428 copying 2 bytes
DEBUG - 429 read class attr -- '_jspx_th_c_out_1'
DEBUG - 430 read class attr -- '${url}'
DEBUG - 431 copying 2 bytes
DEBUG - 432 read class attr -- '_jspx_th_c_out_2'
DEBUG - 433 read class attr -- 'SourceFile'
DEBUG - 434 read class attr -- 'org.apache.jsp.jsp.introduction_jsp'
DEBUG - SourceDebugExtension not found, installed at: 435
DEBUG - interfaceCount: 1
DEBUG - members count: 12
DEBUG - member attr count: 0
DEBUG - member attr count: 0
DEBUG - member attr count: 0
DEBUG - member attr count: 0
DEBUG - member attr count: 0
DEBUG - member attr count: 0
DEBUG - member attr count: 0
DEBUG - member attr count: 1
DEBUG - attr len: 0
DEBUG - member attr count: 1
DEBUG - attr len: 0
DEBUG - member attr count: 1
DEBUG - attr len: 0
DEBUG - member attr count: 1
DEBUG - attr len: 0
DEBUG - member attr count: 1
DEBUG - attr len: 0
DEBUG - members count: 9
DEBUG - member attr count: 1
DEBUG - attr len: 61
DEBUG - member attr count: 1
DEBUG - attr len: 47
DEBUG - member attr count: 1
DEBUG - attr len: 46
DEBUG - member attr count: 1
DEBUG - attr len: 133
DEBUG - member attr count: 1
DEBUG - attr len: 109
DEBUG - member attr count: 2
DEBUG - attr len: 6
DEBUG - attr len: 2892
DEBUG - member attr count: 2
DEBUG - attr len: 4
DEBUG - attr len: 233
DEBUG - member attr count: 2
DEBUG - attr len: 4
DEBUG - attr len: 233
DEBUG - member attr count: 2
DEBUG - attr len: 4
DEBUG - attr len: 233
DEBUG - class attrCount: 1
DEBUG - attr len: 2
DEBUG - class attrCount incremented
DEBUG - Portlet Container [Pluto Portal Driver]: Portlet rendered.
DEBUG - Render status: 1, null
DEBUG - JspEngine --> /WEB-INF/fragments/portlet-skin.jsp
DEBUG - ServletPath: /WEB-INF/fragments/template.jsp
DEBUG - PathInfo: null
DEBUG - RealPath:
D:\Work\OxfordCS\Pluto-1.1\pluto-unittest\src\test\portal\WEB-INF\fragments\portlet-skin.jsp
DEBUG - RequestURI: /pluto/WEB-INF/fragments/template.jsp
DEBUG - QueryString:
DEBUG - Request Params:
DEBUG - Evaluated portletId to: /testsuite.TestPortlet2
DEBUG - Rendering Portlet Window:
org.apache.pluto.driver.services.impl.resource.PortletWindowConfig@1e492d8
DEBUG - getContext: /testsuite, context:
com.meterware.servletunit.ServletUnitServletContext@11a01dd
DEBUG - Portlet Container [Pluto Portal Driver]: Render request recieved.
DEBUG - Portlet Container [Pluto Portal Driver]: Invoker Created.
DEBUG - Performing Render Invocation
INFO - Unable to locate Resource Bundle TestPortlet: Can't find bundle for base
name TestPortlet, locale en_GB
DEBUG - Loading PortletAppDD for context: /testsuite
DEBUG - getContext: /testsuite, context:
com.meterware.servletunit.ServletUnitServletContext@11a01dd
DEBUG - Retrieved context:
com.meterware.servletunit.ServletUnitServletContext@11a01dd
DEBUG - PortletRequestDispatcher requested: /jsp/introduction.jsp
DEBUG - JspEngine --> /jsp/introduction.jsp
DEBUG - ServletPath: /WEB-INF/fragments/portlet-skin.jsp
DEBUG - PathInfo: null
DEBUG - RealPath:
D:\Work\OxfordCS\Pluto-1.1\pluto-unittest\src\test\testsuite\jsp\introduction.jsp
DEBUG - RequestURI: /pluto/WEB-INF/fragments/portlet-skin.jsp
DEBUG - QueryString:
DEBUG - Request Params:
DEBUG - Portlet Container [Pluto Portal Driver]: Portlet rendered.
DEBUG - Render status: 1, null
DEBUG - ServletContext created: path:
DEBUG - ServletContext created: path: /pluto
DEBUG - WebApplication path: /pluto, context:
com.meterware.servletunit.ServletUnitServletContext@ac576f
INFO - Starting up Pluto Portal Driver...
DEBUG - * Retreaving portal driver configuration...
DEBUG - Retrieving driver configuration from:
/WEB-INF/pluto-portal-driver-services-config.xml
INFO - Loading XML bean definitions from (no description)
DEBUG - Using JAXP implementation
[org.apache.xerces.jaxp.DocumentBuilderFactoryImpl@a07440]
DEBUG - Trying to resolve XML entity with public ID [-//SPRING//DTD BEAN//EN]
and system ID [http://www.springframework.org/dtd/spring-beans.dtd]
DEBUG - Trying to locate [spring-beans.dtd] under
[/org/springframework/beans/factory/xml/]
DEBUG - Found beans DTD [http://www.springframework.org/dtd/spring-beans.dtd] in
classpath
DEBUG - Loading bean definitions
DEBUG - Default lazy init 'false'
DEBUG - Default dependency check 'none'
DEBUG - Default autowire 'no'
DEBUG - No XML 'id' specified - using 'DriverConfiguration' as ID and [] as aliases
DEBUG - Registering bean definition with id 'DriverConfiguration'
DEBUG - No XML 'id' specified - using 'PropertyConfigService' as ID and [] as
aliases
DEBUG - Registering bean definition with id 'PropertyConfigService'
DEBUG - No XML 'id' specified - using 'PortletRegistryService' as ID and [] as
aliases
DEBUG - Registering bean definition with id 'PortletRegistryService'
DEBUG - No XML 'id' specified - using 'RenderConfigService' as ID and [] as aliases
DEBUG - Registering bean definition with id 'RenderConfigService'
DEBUG - Found 4 <bean> elements defining beans
INFO - Creating shared instance of singleton bean 'DriverConfiguration'
DEBUG - Creating instance of bean 'DriverConfiguration' with merged definition
[Root bean with class
[org.apache.pluto.driver.config.impl.DriverConfigurationImpl] defined in (no
description)]
DEBUG - Resolving reference from property 'constructor argument' in bean
'DriverConfiguration' to bean 'PropertyConfigService'
INFO - Creating shared instance of singleton bean 'PropertyConfigService'
DEBUG - Creating instance of bean 'PropertyConfigService' with merged definition
[Root bean with class
[org.apache.pluto.driver.services.impl.resource.ResourceServicesImpl] defined in
(no description)]
DEBUG - Using cached introspection results for class
[org.apache.pluto.driver.services.impl.resource.ResourceServicesImpl]
DEBUG - Invoking BeanPostProcessors before initialization of bean
'PropertyConfigService'
DEBUG - Invoking BeanPostProcessors after initialization of bean
'PropertyConfigService'
DEBUG - Resolving reference from property 'constructor argument' in bean
'DriverConfiguration' to bean 'RenderConfigService'
INFO - Creating shared instance of singleton bean 'RenderConfigService'
DEBUG - Creating instance of bean 'RenderConfigService' with merged definition
[Root bean with class
[org.apache.pluto.driver.services.impl.resource.ResourceServicesImpl] defined in
(no description)]
DEBUG - Using cached introspection results for class
[org.apache.pluto.driver.services.impl.resource.ResourceServicesImpl]
DEBUG - Invoking BeanPostProcessors before initialization of bean
'RenderConfigService'
DEBUG - Invoking BeanPostProcessors after initialization of bean
'RenderConfigService'
DEBUG - Resolving reference from property 'constructor argument' in bean
'DriverConfiguration' to bean 'PortletRegistryService'
INFO - Creating shared instance of singleton bean 'PortletRegistryService'
DEBUG - Creating instance of bean 'PortletRegistryService' with merged
definition [Root bean with class
[org.apache.pluto.driver.services.impl.resource.ResourceServicesImpl] defined in
(no description)]
DEBUG - Using cached introspection results for class
[org.apache.pluto.driver.services.impl.resource.ResourceServicesImpl]
DEBUG - Invoking BeanPostProcessors before initialization of bean
'PortletRegistryService'
DEBUG - Invoking BeanPostProcessors after initialization of bean
'PortletRegistryService'
DEBUG - Using cached introspection results for class
[org.apache.pluto.driver.config.impl.DriverConfigurationImpl]
INFO - Bean 'DriverConfiguration' instantiated via constructor [public
org.apache.pluto.driver.config.impl.DriverConfigurationImpl(org.apache.pluto.driver.config.impl.PropertyConfigService,org.apache.pluto.driver.config.impl.PortletRegistryService,org.apache.pluto.driver.config.impl.RenderConfigService)]
DEBUG - Invoking BeanPostProcessors before initialization of bean
'DriverConfiguration'
DEBUG - Invoking BeanPostProcessors after initialization of bean
'DriverConfiguration'
DEBUG - - - Adding PortletApp Configuration for: /testsuite
DEBUG - Driver Configuration of type class
org.apache.pluto.driver.config.impl.DriverConfigurationImpl Initialized and
Ready For Service
DEBUG - * Creating portal context [pluto-portal-driver/1.1.0-ALPHA]...
DEBUG - * Creating container services...
DEBUG - * Creating portlet container...
INFO - Portlet Container [Pluto Portal Driver] created.
DEBUG - * Initializing portlet container...
DEBUG - Portlet Container [Pluto Portal Driver] successfully initialized.
INFO - Pluto Portal Driver started.
DEBUG - ServletContext.setAttribute: path: /pluto,
driverConfig=org.apache.pluto.driver.config.impl.DriverConfigurationImpl@1913751
DEBUG - ServletContext.setAttribute: path: /pluto,
portletContainer=org.apache.pluto.core.PortletContainerImpl@c6b80e
DEBUG - ServletContext created: path: /testsuite
DEBUG - WebApplication path: /testsuite, context:
com.meterware.servletunit.ServletUnitServletContext@5dc268
DEBUG - PortalDriverServlet.doGet: PortalURL: http://localhost:0/pluto/portal?
DEBUG - PortalDriverServlet.doGet: actionWindowId: null
DEBUG - PortalDriverServlet.doGet: driverConfig:
org.apache.pluto.driver.config.impl.DriverConfigurationImpl@1913751
DEBUG - Rendering Portal: Requested Page: null
DEBUG - Requested page is null. Returning default: Test Page
DEBUG - Parent class loader is: sun.misc.Launcher$AppClassLoader@92e78c
DEBUG - Scratch dir for the JSP engine is: C:\DOCUME~1\Graham\LOCALS~1\Temp
DEBUG - IMPORTANT: Do not modify the generated servlets
DEBUG - JspEngine --> /WEB-INF/fragments/portlet.jsp
DEBUG - ServletPath: /WEB-INF/fragments/portlet.jsp
DEBUG - PathInfo: null
DEBUG - RealPath:
D:\Work\OxfordCS\Pluto-1.1\pluto-unittest\src\test\portal\WEB-INF\fragments\portlet.jsp
DEBUG - RequestURI: /pluto/WEB-INF/fragments/portlet.jsp
DEBUG - QueryString:
DEBUG - Request Params:
DEBUG - JspEngine --> /WEB-INF/fragments/template.jsp
DEBUG - ServletPath: /WEB-INF/fragments/template.jsp
DEBUG - PathInfo: null
DEBUG - RealPath:
D:\Work\OxfordCS\Pluto-1.1\pluto-unittest\src\test\portal\WEB-INF\fragments\template.jsp
DEBUG - RequestURI: /pluto/WEB-INF/fragments/template.jsp
DEBUG - QueryString:
DEBUG - Request Params:
DEBUG - JspEngine --> /WEB-INF/fragments/portlet-page.jsp
DEBUG - ServletPath: /WEB-INF/fragments/template.jsp
DEBUG - PathInfo: null
DEBUG - RealPath:
D:\Work\OxfordCS\Pluto-1.1\pluto-unittest\src\test\portal\WEB-INF\fragments\portlet-page.jsp
DEBUG - RequestURI: /pluto/WEB-INF/fragments/template.jsp
DEBUG - QueryString:
DEBUG - Request Params:
DEBUG - JspEngine --> /WEB-INF/fragments/portlet-skin.jsp
DEBUG - ServletPath: /WEB-INF/fragments/template.jsp
DEBUG - PathInfo: null
DEBUG - RealPath:
D:\Work\OxfordCS\Pluto-1.1\pluto-unittest\src\test\portal\WEB-INF\fragments\portlet-skin.jsp
DEBUG - RequestURI: /pluto/WEB-INF/fragments/template.jsp
DEBUG - QueryString:
DEBUG - Request Params:
DEBUG - Evaluated portletId to: /testsuite.TestPortlet1
DEBUG - Rendering Portlet Window:
org.apache.pluto.driver.services.impl.resource.PortletWindowConfig@eb9f0d
DEBUG - getContext: /testsuite, context:
com.meterware.servletunit.ServletUnitServletContext@5dc268
DEBUG - Portlet Container [Pluto Portal Driver]: Render request recieved.
DEBUG - Portlet Container [Pluto Portal Driver]: Invoker Created.
DEBUG - Performing Render Invocation
DEBUG - Loading PortletAppDD for context: /testsuite
DEBUG - getContext: /testsuite, context:
com.meterware.servletunit.ServletUnitServletContext@5dc268
DEBUG - Retrieved context:
com.meterware.servletunit.ServletUnitServletContext@5dc268
DEBUG - PortletRequestDispatcher requested: /jsp/introduction.jsp
DEBUG - Parent class loader is: sun.misc.Launcher$AppClassLoader@92e78c
DEBUG - Scratch dir for the JSP engine is: C:\DOCUME~1\Graham\LOCALS~1\Temp
DEBUG - IMPORTANT: Do not modify the generated servlets
DEBUG - JspEngine --> /jsp/introduction.jsp
DEBUG - ServletPath: /WEB-INF/fragments/portlet-skin.jsp
DEBUG - PathInfo: null
DEBUG - RealPath:
D:\Work\OxfordCS\Pluto-1.1\pluto-unittest\src\test\testsuite\jsp\introduction.jsp
DEBUG - RequestURI: /pluto/WEB-INF/fragments/portlet-skin.jsp
DEBUG - QueryString:
DEBUG - Request Params:
DEBUG - Portlet Container [Pluto Portal Driver]: Portlet rendered.
DEBUG - Render status: 1, null
DEBUG - JspEngine --> /WEB-INF/fragments/portlet-skin.jsp
DEBUG - ServletPath: /WEB-INF/fragments/template.jsp
DEBUG - PathInfo: null
DEBUG - RealPath:
D:\Work\OxfordCS\Pluto-1.1\pluto-unittest\src\test\portal\WEB-INF\fragments\portlet-skin.jsp
DEBUG - RequestURI: /pluto/WEB-INF/fragments/template.jsp
DEBUG - QueryString:
DEBUG - Request Params:
DEBUG - Evaluated portletId to: /testsuite.TestPortlet2
DEBUG - Rendering Portlet Window:
org.apache.pluto.driver.services.impl.resource.PortletWindowConfig@b4b0a4
DEBUG - getContext: /testsuite, context:
com.meterware.servletunit.ServletUnitServletContext@5dc268
DEBUG - Portlet Container [Pluto Portal Driver]: Render request recieved.
DEBUG - Portlet Container [Pluto Portal Driver]: Invoker Created.
DEBUG - Performing Render Invocation
INFO - Unable to locate Resource Bundle TestPortlet: Can't find bundle for base
name TestPortlet, locale en_GB
DEBUG - Loading PortletAppDD for context: /testsuite
DEBUG - getContext: /testsuite, context:
com.meterware.servletunit.ServletUnitServletContext@5dc268
DEBUG - Retrieved context:
com.meterware.servletunit.ServletUnitServletContext@5dc268
DEBUG - PortletRequestDispatcher requested: /jsp/introduction.jsp
DEBUG - JspEngine --> /jsp/introduction.jsp
DEBUG - ServletPath: /WEB-INF/fragments/portlet-skin.jsp
DEBUG - PathInfo: null
DEBUG - RealPath:
D:\Work\OxfordCS\Pluto-1.1\pluto-unittest\src\test\testsuite\jsp\introduction.jsp
DEBUG - RequestURI: /pluto/WEB-INF/fragments/portlet-skin.jsp
DEBUG - QueryString:
DEBUG - Request Params:
DEBUG - Portlet Container [Pluto Portal Driver]: Portlet rendered.
DEBUG - Render status: 1, null
]]
--
Graham Klyne
Research Technology Service
Oxford University Computing Services
Unit testing of portals, another update
Posted by Graham Klyne <gr...@oucs.ox.ac.uk>.
(This message is based on my update to the Pluto list.)
What follows is a bit rambling. In summary: I've managed to get the test
portlets to render in the unit test framework by copying the tld files to the
/testsuite area, and modifying the testsuit web.xml. I feel there's a better
way, but for now I think it does what I need. I'll continue to build unit tests
to check the rendered content returned, then to run and check (some of) the
actual tests.
> It looks like you're not picking up the tld. We have a similar bug
> logged in which this happens with JBoss. My guess is that it's a result
> of the fact that the jar containing the tlds is either not referenced
> within web.xmol (which it doesn't have to be) or within a jar in
> WEB-INF/lib. Instead, it's in the taglib jar which is included in
> common along with the container libraries.
>
> However, now that I've seperated the classes into their own jar - they
> don't have to be deployed that way. . .perhaps we can think through the
> reprecussions of adding that jar to web-inf/lib . . .
>
> Play around with different possibilities and let me know what you find.
> I think this is probably something that's not just an issue you get
> past but more of an issue we as a pluto team need to think about.
Unfortunately, I only half understand what you say here. I think you're right
that its to do with the TLD. I'm not aware of a jar containing the tlds -- in
my test environment they are in directory "test/portal/WEB-INF/tld", which
contains two files: "pluto.tld" and "portlet.tld". I'm also not sure what you
mean by "the taglib jar which is included in common along with the container
libraries" (I'm still pretty new to the details of servlets, so there are
certainly gaps between what I know and what I should know here).
On closer examination of the stack at the point of the exception (repeated here
for convenience)
>> [[
>> Nested Exception is org.apache.jasper.JasperException: The absolute uri:
>> http://java.sun.com/portlet cannot be resolved in either web.xml or
>> the jar
>> files deployed with this application
>> ]]
I find:
The first occurrence of "http://java.sun.com/portlet" that I see is this:
uri= "http://java.sun.com/portlet"
in org.apache.jasper.compiler.Parser. The code is at line 418, in the call of
addTagLib about here:
[[
if (pageInfo.getTaglib(uri) == null) {
String[] location = ctxt.getTldLocation(uri);
pageInfo.addTaglib(uri,
new TagLibraryInfoImpl(ctxt,
parserController,
prefix,
uri,
location,
err));
}
]]
The value of uri is determined somewhere in this code:
[[
Attributes attrs = parseAttributes();
String uri = attrs.getValue("uri");
String prefix = attrs.getValue("prefix");
if (prefix != null) {
Mark prevMark = pageInfo.getNonCustomTagPrefix(prefix);
if (prevMark != null) {
err.jspError(reader.mark(), "jsp.error.prefix.use_before_dcl",
prefix, prevMark.getFile(), "" + prevMark.getLineNumber());
}
if (uri != null) {
String uriPrev = pageInfo.getURI(prefix);
if (uriPrev != null && !uriPrev.equals(uri)) {
err.jspError(reader.mark(), "jsp.error.prefix.refined",
prefix, uri, uriPrev);
}
]]
The line:
String uri = attrs.getValue("uri");
returns uri= "http://java.sun.com/portlet"
It appears to be processing file introduction.jsp at this point, and I note that
this contains:
[[
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>
<portlet:defineObjects/>
]]
So it appears that "http://java.sun.com/portlet" is a reasonable resource to be
looking for here.
I'm digging around the running installation to see if I can find a candidate for
this. The only possibility I find is portlet.tld irtself, which is deployed
into directory /pluto/WEB-INF/tld. Further, the file /pluto/WEB-INF/web.xml
contains:
[[
<taglib>
<taglib-uri>http://java.sun.com/portlet</taglib-uri>
<taglib-location>/WEB-INF/tld/portlet.tld</taglib-location>
</taglib>
]]
But I note that the file being processed here is
"testsuite/jsp/introduction.jsp", so I guess that somehow the system is now
failing to see tag library definitions in the pluto web application directory.
To test this, I'll copy the files and web.xml entry into /testsuite. No joy
there, so I'll transfer the <taglib> entries into testsuite/WEB-INF/web.xml.
Success! (I still need to examine the content in some more detail to confirm
that the rendered content is correct, but I'm no longer getting the portlet
exception and a previous problem with the test result seems to be overcome.
This isn't pretty, but it does suggest to me that the information needed to
access tag libraries in the pluto web application area is not being passed to
the servlet that runs the portlet. (How is this information usually passed to
the portlet servlet context?)
#g
--
Graham Klyne
Research Technology Service
Oxford University Computing Services
Re: Doubts about strategy of ServletUnit testing (retract previous
report)
Posted by "David H. DeWolf" <dd...@apache.org>.
Nice progress! You're almost there :)
It looks like you're not picking up the tld. We have a similar bug
logged in which this happens with JBoss. My guess is that it's a result
of the fact that the jar containing the tlds is either not referenced
within web.xmol (which it doesn't have to be) or within a jar in
WEB-INF/lib. Instead, it's in the taglib jar which is included in
common along with the container libraries.
However, now that I've seperated the classes into their own jar - they
don't have to be deployed that way. . .perhaps we can think through the
reprecussions of adding that jar to web-inf/lib . . .
Play around with different possibilities and let me know what you find.
I think this is probably something that's not just an issue you get
past but more of an issue we as a pluto team need to think about.
David
Graham Klyne wrote:
> David H. DeWolf wrote:
>
>>You're finding some interesting things. If you find anything that
>>would be easier to implement by changing an implementation of pluto,
>>let us know. It's possible that any enhancements you'd need would
>>also make someone else's life easier.
>
>
> In an attempt to document more carefully what I had done, I was looking at my
> code and noticed a subtle bug that was causing me to wrongly interpret the
> symptoms I was seeing. It turned out that the null 'driverConfig' value was
> not a cross-context problem as I suspected, but was heing caused because the
> ServletContext value was being created twice by the initializer, and the saved
> attributes were being lost in the process.
>
> Having fixed that code, the test portlet appears to be properly dispatched, and
> somewhere around the rendering of portlet-skin.jsp I am getting an exception:
>
> [[
> Nested Exception is org.apache.jasper.JasperException: The absolute uri:
> http://java.sun.com/portlet cannot be resolved in either web.xml or the jar
> files deployed with this application
> ]]
>
> I am at a loss to understand why the system is attempting to resolve
> http://java.sun.com/portlet: any ideas?
>
> #g
> --
>
> A full console log of the run to this point, and a copy of the stack, are below.
> The code has been stopped on a "PortletException" breakpoint, about here:
> [[
> } catch (javax.servlet.ServletException e) {
> String message = EXCEPTIONS.getString("error.portlet.invoke");
> if(LOG.isErrorEnabled()) {
> LOG.error(message);
> }
> ]]
> in file pluto/core/PortletInvoker.java.
>
> (Some line numbers may differ from the current codebase, as I have been
> inserting some additional log statements.)
>
> [[
> DEBUG - ServletContext created: path: /pluto
> DEBUG - WebApplication path: /pluto, context:
> com.meterware.servletunit.ServletUnitServletContext@82d37
> INFO - Starting up Pluto Portal Driver...
> DEBUG - * Retreaving portal driver configuration...
> DEBUG - Retrieving driver configuration from:
> /WEB-INF/pluto-portal-driver-services-config.xml
> INFO - Loading XML bean definitions from (no description)
> DEBUG - Using JAXP implementation
> [org.apache.xerces.jaxp.DocumentBuilderFactoryImpl@15d17d7]
> DEBUG - Trying to resolve XML entity with public ID [-//SPRING//DTD BEAN//EN]
> and system ID [http://www.springframework.org/dtd/spring-beans.dtd]
> DEBUG - Trying to locate [spring-beans.dtd] under
> [/org/springframework/beans/factory/xml/]
> DEBUG - Found beans DTD [http://www.springframework.org/dtd/spring-beans.dtd] in
> classpath
> DEBUG - Loading bean definitions
> DEBUG - Default lazy init 'false'
> DEBUG - Default dependency check 'none'
> DEBUG - Default autowire 'no'
> DEBUG - No XML 'id' specified - using 'DriverConfiguration' as ID and [] as aliases
> DEBUG - Registering bean definition with id 'DriverConfiguration'
> DEBUG - No XML 'id' specified - using 'PropertyConfigService' as ID and [] as
> aliases
> DEBUG - Registering bean definition with id 'PropertyConfigService'
> DEBUG - No XML 'id' specified - using 'PortletRegistryService' as ID and [] as
> aliases
> DEBUG - Registering bean definition with id 'PortletRegistryService'
> DEBUG - No XML 'id' specified - using 'RenderConfigService' as ID and [] as aliases
> DEBUG - Registering bean definition with id 'RenderConfigService'
> DEBUG - Found 4 <bean> elements defining beans
> INFO - Creating shared instance of singleton bean 'DriverConfiguration'
> DEBUG - Creating instance of bean 'DriverConfiguration' with merged definition
> [Root bean with class
> [org.apache.pluto.driver.config.impl.DriverConfigurationImpl] defined in (no
> description)]
> DEBUG - Resolving reference from property 'constructor argument' in bean
> 'DriverConfiguration' to bean 'PortletRegistryService'
> INFO - Creating shared instance of singleton bean 'PortletRegistryService'
> DEBUG - Creating instance of bean 'PortletRegistryService' with merged
> definition [Root bean with class
> [org.apache.pluto.driver.services.impl.resource.ResourceServicesImpl] defined in
> (no description)]
> DEBUG - Getting BeanInfo for class
> [org.apache.pluto.driver.services.impl.resource.ResourceServicesImpl]
> DEBUG - Caching PropertyDescriptors for class
> [org.apache.pluto.driver.services.impl.resource.ResourceServicesImpl]
> DEBUG - Found property 'class' of type [class java.lang.Class]; editor=[null]
> DEBUG - Found property 'containerName' of type [class java.lang.String];
> editor=[null]
> DEBUG - Found property 'defaultPage' of type [class
> org.apache.pluto.driver.services.impl.resource.PageConfig]; editor=[null]
> DEBUG - Found property 'pages' of type [interface java.util.List]; editor=[null]
> DEBUG - Found property 'portalName' of type [class java.lang.String]; editor=[null]
> DEBUG - Found property 'portalVersion' of type [class java.lang.String];
> editor=[null]
> DEBUG - Found property 'portletApplications' of type [interface java.util.Set];
> editor=[null]
> DEBUG - Found property 'supportedPortletModes' of type [interface
> java.util.Set]; editor=[null]
> DEBUG - Found property 'supportedWindowStates' of type [interface
> java.util.Set]; editor=[null]
> DEBUG - Class
> [org.apache.pluto.driver.services.impl.resource.ResourceServicesImpl] is cache-safe
> DEBUG - Invoking BeanPostProcessors before initialization of bean
> 'PortletRegistryService'
> DEBUG - Invoking BeanPostProcessors after initialization of bean
> 'PortletRegistryService'
> DEBUG - Resolving reference from property 'constructor argument' in bean
> 'DriverConfiguration' to bean 'RenderConfigService'
> INFO - Creating shared instance of singleton bean 'RenderConfigService'
> DEBUG - Creating instance of bean 'RenderConfigService' with merged definition
> [Root bean with class
> [org.apache.pluto.driver.services.impl.resource.ResourceServicesImpl] defined in
> (no description)]
> DEBUG - Using cached introspection results for class
> [org.apache.pluto.driver.services.impl.resource.ResourceServicesImpl]
> DEBUG - Invoking BeanPostProcessors before initialization of bean
> 'RenderConfigService'
> DEBUG - Invoking BeanPostProcessors after initialization of bean
> 'RenderConfigService'
> DEBUG - Resolving reference from property 'constructor argument' in bean
> 'DriverConfiguration' to bean 'PropertyConfigService'
> INFO - Creating shared instance of singleton bean 'PropertyConfigService'
> DEBUG - Creating instance of bean 'PropertyConfigService' with merged definition
> [Root bean with class
> [org.apache.pluto.driver.services.impl.resource.ResourceServicesImpl] defined in
> (no description)]
> DEBUG - Using cached introspection results for class
> [org.apache.pluto.driver.services.impl.resource.ResourceServicesImpl]
> DEBUG - Invoking BeanPostProcessors before initialization of bean
> 'PropertyConfigService'
> DEBUG - Invoking BeanPostProcessors after initialization of bean
> 'PropertyConfigService'
> DEBUG - Getting BeanInfo for class
> [org.apache.pluto.driver.config.impl.DriverConfigurationImpl]
> DEBUG - Caching PropertyDescriptors for class
> [org.apache.pluto.driver.config.impl.DriverConfigurationImpl]
> DEBUG - Found property 'class' of type [class java.lang.Class]; editor=[null]
> DEBUG - Found property 'containerName' of type [class java.lang.String];
> editor=[null]
> DEBUG - Found property 'pages' of type [interface java.util.Collection];
> editor=[null]
> DEBUG - Found property 'portalName' of type [class java.lang.String]; editor=[null]
> DEBUG - Found property 'portalVersion' of type [class java.lang.String];
> editor=[null]
> DEBUG - Found property 'portletApplications' of type [interface
> java.util.Collection]; editor=[null]
> DEBUG - Found property 'supportedPortletModes' of type [interface
> java.util.Collection]; editor=[null]
> DEBUG - Found property 'supportedWindowStates' of type [interface
> java.util.Collection]; editor=[null]
> DEBUG - Class [org.apache.pluto.driver.config.impl.DriverConfigurationImpl] is
> cache-safe
> INFO - Bean 'DriverConfiguration' instantiated via constructor [public
> org.apache.pluto.driver.config.impl.DriverConfigurationImpl(org.apache.pluto.driver.config.impl.PropertyConfigService,org.apache.pluto.driver.config.impl.PortletRegistryService,org.apache.pluto.driver.config.impl.RenderConfigService)]
> DEBUG - Invoking BeanPostProcessors before initialization of bean
> 'DriverConfiguration'
> DEBUG - Invoking BeanPostProcessors after initialization of bean
> 'DriverConfiguration'
> DEBUG - Setting up digester...
> DEBUG - - - Adding PortletApp Configuration for: /testsuite
> DEBUG - Driver Configuration of type class
> org.apache.pluto.driver.config.impl.DriverConfigurationImpl Initialized and
> Ready For Service
> DEBUG - * Creating portal context [pluto-portal-driver/1.1.0-ALPHA]...
> DEBUG - * Creating container services...
> DEBUG - * Creating portlet container...
> INFO - Portlet Container [Pluto Portal Driver] created.
> DEBUG - * Initializing portlet container...
> DEBUG - Portlet Container [Pluto Portal Driver] successfully initialized.
> INFO - Pluto Portal Driver started.
> DEBUG - ServletContext.setAttribute: path: /pluto,
> driverConfig=org.apache.pluto.driver.config.impl.DriverConfigurationImpl@1367e28
> DEBUG - ServletContext.setAttribute: path: /pluto,
> portletContainer=org.apache.pluto.core.PortletContainerImpl@19a0203
> DEBUG - ServletContext created: path: /testsuite
> DEBUG - WebApplication path: /testsuite, context:
> com.meterware.servletunit.ServletUnitServletContext@28305d
> DEBUG - String Manager Created for package: org.apache.pluto.core
> DEBUG - Using Descriptor Service Impl:
> org.apache.pluto.descriptors.services.castor.PortletAppDescriptorServiceImpl
> DEBUG - PortalDriverServlet.doGet: PortalURL: http://localhost:0/pluto/portal?
> DEBUG - PortalDriverServlet.doGet: actionWindowId: null
> DEBUG - PortalDriverServlet.doGet: driverConfig:
> org.apache.pluto.driver.config.impl.DriverConfigurationImpl@1367e28
> DEBUG - Rendering Portal: Requested Page: null
> DEBUG - Requested page is null. Returning default: Test Page
> DEBUG - Parent class loader is: sun.misc.Launcher$AppClassLoader@92e78c
> DEBUG - Scratch dir for the JSP engine is: C:\DOCUME~1\Graham\LOCALS~1\Temp
> DEBUG - IMPORTANT: Do not modify the generated servlets
> DEBUG - JspEngine --> /WEB-INF/fragments/portlet.jsp
> DEBUG - ServletPath: /WEB-INF/fragments/portlet.jsp
> DEBUG - PathInfo: null
> DEBUG - RealPath:
> D:\Work\OxfordCS\Pluto-1.1\pluto-unittest\src\test\portal\WEB-INF\fragments\portlet.jsp
> DEBUG - RequestURI: /pluto/WEB-INF/fragments/portlet.jsp
> DEBUG - QueryString:
> DEBUG - Request Params:
> DEBUG - JspEngine --> /WEB-INF/fragments/template.jsp
> DEBUG - ServletPath: /WEB-INF/fragments/template.jsp
> DEBUG - PathInfo: null
> DEBUG - RealPath:
> D:\Work\OxfordCS\Pluto-1.1\pluto-unittest\src\test\portal\WEB-INF\fragments\template.jsp
> DEBUG - RequestURI: /pluto/WEB-INF/fragments/template.jsp
> DEBUG - QueryString:
> DEBUG - Request Params:
> DEBUG - JspEngine --> /WEB-INF/fragments/portlet-page.jsp
> DEBUG - ServletPath: /WEB-INF/fragments/template.jsp
> DEBUG - PathInfo: null
> DEBUG - RealPath:
> D:\Work\OxfordCS\Pluto-1.1\pluto-unittest\src\test\portal\WEB-INF\fragments\portlet-page.jsp
> DEBUG - RequestURI: /pluto/WEB-INF/fragments/template.jsp
> DEBUG - QueryString:
> DEBUG - Request Params:
> DEBUG - JspEngine --> /WEB-INF/fragments/portlet-skin.jsp
> DEBUG - ServletPath: /WEB-INF/fragments/template.jsp
> DEBUG - PathInfo: null
> DEBUG - RealPath:
> D:\Work\OxfordCS\Pluto-1.1\pluto-unittest\src\test\portal\WEB-INF\fragments\portlet-skin.jsp
> DEBUG - RequestURI: /pluto/WEB-INF/fragments/template.jsp
> DEBUG - QueryString:
> DEBUG - Request Params:
> DEBUG - Evaluated portletId to: /testsuite.TestPortlet1
> DEBUG - Rendering Portlet Window:
> org.apache.pluto.driver.services.impl.resource.PortletWindowConfig@c5f468
> DEBUG - getContext: /testsuite, context:
> com.meterware.servletunit.ServletUnitServletContext@28305d
> DEBUG - Portlet Container [Pluto Portal Driver]: Render request recieved.
> DEBUG - String Manager Created for package: org.apache.pluto.core.impl
> DEBUG - Portlet Container [Pluto Portal Driver]: Invoker Created.
> DEBUG - Performing Render Invocation
> DEBUG - Loading PortletAppDD for context: /testsuite
> DEBUG - getContext: /testsuite, context:
> com.meterware.servletunit.ServletUnitServletContext@28305d
> DEBUG - Retrieved context:
> com.meterware.servletunit.ServletUnitServletContext@28305d
> DEBUG - PortletRequestDispatcher requested: /jsp/introduction.jsp
> DEBUG - Parent class loader is: sun.misc.Launcher$AppClassLoader@92e78c
> DEBUG - Scratch dir for the JSP engine is: C:\DOCUME~1\Graham\LOCALS~1\Temp
> DEBUG - IMPORTANT: Do not modify the generated servlets
> DEBUG - JspEngine --> /jsp/introduction.jsp
> DEBUG - ServletPath: /WEB-INF/fragments/portlet-skin.jsp
> DEBUG - PathInfo: null
> DEBUG - RealPath:
> D:\Work\OxfordCS\Pluto-1.1\pluto-unittest\src\test\testsuite\jsp\introduction.jsp
> DEBUG - RequestURI: /pluto/WEB-INF/fragments/portlet-skin.jsp
> DEBUG - QueryString:
> DEBUG - Request Params:
> javax.portlet.PortletException
> at
> org.apache.pluto.core.impl.PortletRequestDispatcherImpl.include(PortletRequestDispatcherImpl.java:80)
> at org.apache.pluto.testsuite.TestPortlet.doView(TestPortlet.java:171)
> at javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:247)
> at javax.portlet.GenericPortlet.render(GenericPortlet.java:175)
> at org.apache.pluto.core.PortletServlet.dispatch(PortletServlet.java:162)
> at org.apache.pluto.core.PortletServlet.doGet(PortletServlet.java:113)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
> com.meterware.servletunit.RequestDispatcherImpl.include(RequestDispatcherImpl.java:59)
> at org.apache.pluto.core.PortletInvoker.invoke(PortletInvoker.java:156)
> at org.apache.pluto.core.PortletInvoker.render(PortletInvoker.java:103)
> at
> org.apache.pluto.core.PortletContainerImpl.doRender(PortletContainerImpl.java:140)
> at org.apache.pluto.driver.tags.PortletTag.doStartTag(PortletTag.java:94)
> at
> org.apache.jsp.WEB_002dINF.fragments.portlet_002dskin_jsp._jspx_meth_pluto_portlet_0(org.apache.jsp.WEB_002dINF.fragments.portlet_002dskin_jsp:96)
> at
> org.apache.jsp.WEB_002dINF.fragments.portlet_002dskin_jsp._jspService(org.apache.jsp.WEB_002dINF.fragments.portlet_002dskin_jsp:71)
> at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
> at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
> at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
> com.meterware.servletunit.RequestDispatcherImpl.include(RequestDispatcherImpl.java:59)
> at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:966)
> at
> org.apache.jsp.WEB_002dINF.fragments.portlet_002dpage_jsp._jspx_meth_c_forEach_0(org.apache.jsp.WEB_002dINF.fragments.portlet_002dpage_jsp:108)
> at
> org.apache.jsp.WEB_002dINF.fragments.portlet_002dpage_jsp._jspService(org.apache.jsp.WEB_002dINF.fragments.portlet_002dpage_jsp:66)
> at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
> at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
> at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
> com.meterware.servletunit.RequestDispatcherImpl.include(RequestDispatcherImpl.java:59)
> at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:966)
> at
> org.apache.jsp.WEB_002dINF.fragments.template_jsp._jspService(org.apache.jsp.WEB_002dINF.fragments.template_jsp:108)
> at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
> at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
> at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
> com.meterware.servletunit.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:54)
> at org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:693)
> at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:660)
> at
> org.apache.jsp.WEB_002dINF.fragments.portlet_jsp._jspService(org.apache.jsp.WEB_002dINF.fragments.portlet_jsp:59)
> at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
> at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
> at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
> com.meterware.servletunit.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:54)
> at org.apache.pluto.driver.PortalDriverServlet.doGet(PortalDriverServlet.java:123)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
> com.meterware.servletunit.InvocationContextImpl.service(InvocationContextImpl.java:80)
> at
> com.meterware.servletunit.ServletUnitClient.newResponse(ServletUnitClient.java:118)
> at com.meterware.httpunit.WebWindow.getResource(WebWindow.java:164)
> at com.meterware.httpunit.WebWindow.getSubframeResponse(WebWindow.java:128)
> at com.meterware.httpunit.WebWindow.getResponse(WebWindow.java:121)
> at com.meterware.httpunit.WebClient.getResponse(WebClient.java:113)
> at
> org.apache.pluto.unittest.TestPortletAccess.testDoGetHttpServletRequestHttpServletResponse(TestPortletAccess.java:96)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at junit.framework.TestCase.runTest(TestCase.java:154)
> at junit.framework.TestCase.runBare(TestCase.java:127)
> at junit.framework.TestResult$1.protect(TestResult.java:106)
> at junit.framework.TestResult.runProtected(TestResult.java:124)
> at junit.framework.TestResult.run(TestResult.java:109)
> at junit.framework.TestCase.run(TestCase.java:118)
> at junit.framework.TestSuite.runTest(TestSuite.java:208)
> at junit.framework.TestSuite.run(TestSuite.java:203)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> Caused by: org.apache.jasper.JasperException: The absolute uri:
> http://java.sun.com/portlet cannot be resolved in either web.xml or the jar
> files deployed with this application
> at
> org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:50)
> at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
> at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:114)
> at
> org.apache.jasper.compiler.TagLibraryInfoImpl.generateTLDLocation(TagLibraryInfoImpl.java:316)
> at
> org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:147)
> at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:418)
> at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:483)
> at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1543)
> at org.apache.jasper.compiler.Parser.parse(Parser.java:126)
> at org.apache.jasper.compiler.ParserController.doParse(ParserController.java:211)
> at org.apache.jasper.compiler.ParserController.parse(ParserController.java:100)
> at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:146)
> at org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
> at org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
> at org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
> at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)
> at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
> at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
> at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
> com.meterware.servletunit.RequestDispatcherImpl.include(RequestDispatcherImpl.java:59)
> at
> org.apache.pluto.core.impl.PortletRequestDispatcherImpl.include(PortletRequestDispatcherImpl.java:71)
> ... 75 more
>
> Nested Exception is org.apache.jasper.JasperException: The absolute uri:
> http://java.sun.com/portlet cannot be resolved in either web.xml or the jar
> files deployed with this application
> at
> org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:50)
> at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
> at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:114)
> at
> org.apache.jasper.compiler.TagLibraryInfoImpl.generateTLDLocation(TagLibraryInfoImpl.java:316)
> at
> org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:147)
> at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:418)
> at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:483)
> at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1543)
> at org.apache.jasper.compiler.Parser.parse(Parser.java:126)
> at org.apache.jasper.compiler.ParserController.doParse(ParserController.java:211)
> at org.apache.jasper.compiler.ParserController.parse(ParserController.java:100)
> at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:146)
> at org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
> at org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
> at org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
> at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)
> at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
> at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
> at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
> com.meterware.servletunit.RequestDispatcherImpl.include(RequestDispatcherImpl.java:59)
> at
> org.apache.pluto.core.impl.PortletRequestDispatcherImpl.include(PortletRequestDispatcherImpl.java:71)
> at org.apache.pluto.testsuite.TestPortlet.doView(TestPortlet.java:171)
> at javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:247)
> at javax.portlet.GenericPortlet.render(GenericPortlet.java:175)
> at org.apache.pluto.core.PortletServlet.dispatch(PortletServlet.java:162)
> at org.apache.pluto.core.PortletServlet.doGet(PortletServlet.java:113)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
> com.meterware.servletunit.RequestDispatcherImpl.include(RequestDispatcherImpl.java:59)
> at org.apache.pluto.core.PortletInvoker.invoke(PortletInvoker.java:156)
> at org.apache.pluto.core.PortletInvoker.render(PortletInvoker.java:103)
> at
> org.apache.pluto.core.PortletContainerImpl.doRender(PortletContainerImpl.java:140)
> at org.apache.pluto.driver.tags.PortletTag.doStartTag(PortletTag.java:94)
> at
> org.apache.jsp.WEB_002dINF.fragments.portlet_002dskin_jsp._jspx_meth_pluto_portlet_0(org.apache.jsp.WEB_002dINF.fragments.portlet_002dskin_jsp:96)
> at
> org.apache.jsp.WEB_002dINF.fragments.portlet_002dskin_jsp._jspService(org.apache.jsp.WEB_002dINF.fragments.portlet_002dskin_jsp:71)
> at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
> at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
> at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
> com.meterware.servletunit.RequestDispatcherImpl.include(RequestDispatcherImpl.java:59)
> at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:966)
> at
> org.apache.jsp.WEB_002dINF.fragments.portlet_002dpage_jsp._jspx_meth_c_forEach_0(org.apache.jsp.WEB_002dINF.fragments.portlet_002dpage_jsp:108)
> at
> org.apache.jsp.WEB_002dINF.fragments.portlet_002dpage_jsp._jspService(org.apache.jsp.WEB_002dINF.fragments.portlet_002dpage_jsp:66)
> at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
> at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
> at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
> com.meterware.servletunit.RequestDispatcherImpl.include(RequestDispatcherImpl.java:59)
> at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:966)
> at
> org.apache.jsp.WEB_002dINF.fragments.template_jsp._jspService(org.apache.jsp.WEB_002dINF.fragments.template_jsp:108)
> at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
> at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
> at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
> com.meterware.servletunit.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:54)
> at org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:693)
> at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:660)
> at
> org.apache.jsp.WEB_002dINF.fragments.portlet_jsp._jspService(org.apache.jsp.WEB_002dINF.fragments.portlet_jsp:59)
> at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
> at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
> at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
> com.meterware.servletunit.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:54)
> at org.apache.pluto.driver.PortalDriverServlet.doGet(PortalDriverServlet.java:123)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
> com.meterware.servletunit.InvocationContextImpl.service(InvocationContextImpl.java:80)
> at
> com.meterware.servletunit.ServletUnitClient.newResponse(ServletUnitClient.java:118)
> at com.meterware.httpunit.WebWindow.getResource(WebWindow.java:164)
> at com.meterware.httpunit.WebWindow.getSubframeResponse(WebWindow.java:128)
> at com.meterware.httpunit.WebWindow.getResponse(WebWindow.java:121)
> at com.meterware.httpunit.WebClient.getResponse(WebClient.java:113)
> at
> org.apache.pluto.unittest.TestPortletAccess.testDoGetHttpServletRequestHttpServletResponse(TestPortletAccess.java:96)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at junit.framework.TestCase.runTest(TestCase.java:154)
> at junit.framework.TestCase.runBare(TestCase.java:127)
> at junit.framework.TestResult$1.protect(TestResult.java:106)
> at junit.framework.TestResult.runProtected(TestResult.java:124)
> at junit.framework.TestResult.run(TestResult.java:109)
> at junit.framework.TestCase.run(TestCase.java:118)
> at junit.framework.TestSuite.runTest(TestSuite.java:208)
> at junit.framework.TestSuite.run(TestSuite.java:203)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> ]]
>
> And a copy of the stack at the breakpoint:
> [[
> Thread [main] (Suspended)
> PortletInvoker.invoke(PortletRequestImpl, PortletResponseImpl, Integer) line: 171
> PortletInvoker.render(RenderRequestImpl, RenderResponseImpl) line: 103
> PortletContainerImpl.doRender(PortletWindow, HttpServletRequest,
> HttpServletResponse) line: 140
> PortletTag.doStartTag() line: 94
> portlet-skin.jsp line: 3
> portlet-skin.jsp line: 3
> portlet_002dskin_jsp(HttpJspBase).service(HttpServletRequest,
> HttpServletResponse) line: 97
> portlet_002dskin_jsp(HttpServlet).service(ServletRequest, ServletResponse)
> line: 853
> JspServletWrapper.service(HttpServletRequest, HttpServletResponse, boolean)
> line: 322
> JspServlet.serviceJspFile(HttpServletRequest, HttpServletResponse, String,
> Throwable, boolean) line: 291
> JspServlet.service(HttpServletRequest, HttpServletResponse) line: 241
> JspServlet(HttpServlet).service(ServletRequest, ServletResponse) line: 853
> RequestDispatcherImpl.include(ServletRequest, ServletResponse) line: 59
> JspRuntimeLibrary.include(ServletRequest, ServletResponse, String, JspWriter,
> boolean) line: 966
> portlet-page.jsp line: 8
> portlet-page.jsp line: 4
> portlet_002dpage_jsp(HttpJspBase).service(HttpServletRequest,
> HttpServletResponse) line: 97
> portlet_002dpage_jsp(HttpServlet).service(ServletRequest, ServletResponse)
> line: 853
> JspServletWrapper.service(HttpServletRequest, HttpServletResponse, boolean)
> line: 322
> JspServlet.serviceJspFile(HttpServletRequest, HttpServletResponse, String,
> Throwable, boolean) line: 291
> JspServlet.service(HttpServletRequest, HttpServletResponse) line: 241
> JspServlet(HttpServlet).service(ServletRequest, ServletResponse) line: 853
> RequestDispatcherImpl.include(ServletRequest, ServletResponse) line: 59
> JspRuntimeLibrary.include(ServletRequest, ServletResponse, String, JspWriter,
> boolean) line: 966
> template.jsp line: 40
> template_jsp(HttpJspBase).service(HttpServletRequest, HttpServletResponse) line: 97
> template_jsp(HttpServlet).service(ServletRequest, ServletResponse) line: 853
> JspServletWrapper.service(HttpServletRequest, HttpServletResponse, boolean)
> line: 322
> JspServlet.serviceJspFile(HttpServletRequest, HttpServletResponse, String,
> Throwable, boolean) line: 291
> JspServlet.service(HttpServletRequest, HttpServletResponse) line: 241
> JspServlet(HttpServlet).service(ServletRequest, ServletResponse) line: 853
> RequestDispatcherImpl.forward(ServletRequest, ServletResponse) line: 54
> PageContextImpl.doForward(String) line: 693
> PageContextImpl.forward(String) line: 660
> portlet.jsp line: 4
> portlet_jsp(HttpJspBase).service(HttpServletRequest, HttpServletResponse) line: 97
> portlet_jsp(HttpServlet).service(ServletRequest, ServletResponse) line: 853
> JspServletWrapper.service(HttpServletRequest, HttpServletResponse, boolean)
> line: 322
> JspServlet.serviceJspFile(HttpServletRequest, HttpServletResponse, String,
> Throwable, boolean) line: 291
> JspServlet.service(HttpServletRequest, HttpServletResponse) line: 241
> JspServlet(HttpServlet).service(ServletRequest, ServletResponse) line: 853
> RequestDispatcherImpl.forward(ServletRequest, ServletResponse) line: 54
> PortalDriverServlet.doGet(HttpServletRequest, HttpServletResponse) line: 123
> PortalDriverServlet(HttpServlet).service(HttpServletRequest,
> HttpServletResponse) line: 740
> PortalDriverServlet(HttpServlet).service(ServletRequest, ServletResponse) line: 853
> InvocationContextImpl.service() line: 80
> ServletUnitClient.newResponse(WebRequest, FrameSelector) line: 118
> WebWindow.getResource(WebRequest) line: 164
> WebWindow.getSubframeResponse(WebRequest, RequestContext) line: 128
> WebWindow.getResponse(WebRequest) line: 121
> ServletUnitClient(WebClient).getResponse(WebRequest) line: 113
> TestPortletAccess.testDoGetHttpServletRequestHttpServletResponse() line: 96
> NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available
> [native method]
> NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39
> DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
> Method.invoke(Object, Object...) line: 585
> TestPortletAccess(TestCase).runTest() line: 154
> TestPortletAccess(TestCase).runBare() line: 127
> TestResult$1.protect() line: 106
> TestResult.runProtected(Test, Protectable) line: 124
> TestResult.run(TestCase) line: 109
> TestPortletAccess(TestCase).run(TestResult) line: 118
> TestSuite.runTest(Test, TestResult) line: 208
> TestSuite.run(TestResult) line: 203
> RemoteTestRunner.runTests(String[], String) line: 478
> RemoteTestRunner.run() line: 344
> RemoteTestRunner.main(String[]) line: 196
> ]]
>
>
>
>
>
Re: Doubts about strategy of ServletUnit testing (retract previous
report)
Posted by Graham Klyne <GK...@ninebynine.org>.
David H. DeWolf wrote:
> You're finding some interesting things. If you find anything that
> would be easier to implement by changing an implementation of pluto,
> let us know. It's possible that any enhancements you'd need would
> also make someone else's life easier.
In an attempt to document more carefully what I had done, I was looking at my
code and noticed a subtle bug that was causing me to wrongly interpret the
symptoms I was seeing. It turned out that the null 'driverConfig' value was
not a cross-context problem as I suspected, but was heing caused because the
ServletContext value was being created twice by the initializer, and the saved
attributes were being lost in the process.
Having fixed that code, the test portlet appears to be properly dispatched, and
somewhere around the rendering of portlet-skin.jsp I am getting an exception:
[[
Nested Exception is org.apache.jasper.JasperException: The absolute uri:
http://java.sun.com/portlet cannot be resolved in either web.xml or the jar
files deployed with this application
]]
I am at a loss to understand why the system is attempting to resolve
http://java.sun.com/portlet: any ideas?
#g
--
A full console log of the run to this point, and a copy of the stack, are below.
The code has been stopped on a "PortletException" breakpoint, about here:
[[
} catch (javax.servlet.ServletException e) {
String message = EXCEPTIONS.getString("error.portlet.invoke");
if(LOG.isErrorEnabled()) {
LOG.error(message);
}
]]
in file pluto/core/PortletInvoker.java.
(Some line numbers may differ from the current codebase, as I have been
inserting some additional log statements.)
[[
DEBUG - ServletContext created: path: /pluto
DEBUG - WebApplication path: /pluto, context:
com.meterware.servletunit.ServletUnitServletContext@82d37
INFO - Starting up Pluto Portal Driver...
DEBUG - * Retreaving portal driver configuration...
DEBUG - Retrieving driver configuration from:
/WEB-INF/pluto-portal-driver-services-config.xml
INFO - Loading XML bean definitions from (no description)
DEBUG - Using JAXP implementation
[org.apache.xerces.jaxp.DocumentBuilderFactoryImpl@15d17d7]
DEBUG - Trying to resolve XML entity with public ID [-//SPRING//DTD BEAN//EN]
and system ID [http://www.springframework.org/dtd/spring-beans.dtd]
DEBUG - Trying to locate [spring-beans.dtd] under
[/org/springframework/beans/factory/xml/]
DEBUG - Found beans DTD [http://www.springframework.org/dtd/spring-beans.dtd] in
classpath
DEBUG - Loading bean definitions
DEBUG - Default lazy init 'false'
DEBUG - Default dependency check 'none'
DEBUG - Default autowire 'no'
DEBUG - No XML 'id' specified - using 'DriverConfiguration' as ID and [] as aliases
DEBUG - Registering bean definition with id 'DriverConfiguration'
DEBUG - No XML 'id' specified - using 'PropertyConfigService' as ID and [] as
aliases
DEBUG - Registering bean definition with id 'PropertyConfigService'
DEBUG - No XML 'id' specified - using 'PortletRegistryService' as ID and [] as
aliases
DEBUG - Registering bean definition with id 'PortletRegistryService'
DEBUG - No XML 'id' specified - using 'RenderConfigService' as ID and [] as aliases
DEBUG - Registering bean definition with id 'RenderConfigService'
DEBUG - Found 4 <bean> elements defining beans
INFO - Creating shared instance of singleton bean 'DriverConfiguration'
DEBUG - Creating instance of bean 'DriverConfiguration' with merged definition
[Root bean with class
[org.apache.pluto.driver.config.impl.DriverConfigurationImpl] defined in (no
description)]
DEBUG - Resolving reference from property 'constructor argument' in bean
'DriverConfiguration' to bean 'PortletRegistryService'
INFO - Creating shared instance of singleton bean 'PortletRegistryService'
DEBUG - Creating instance of bean 'PortletRegistryService' with merged
definition [Root bean with class
[org.apache.pluto.driver.services.impl.resource.ResourceServicesImpl] defined in
(no description)]
DEBUG - Getting BeanInfo for class
[org.apache.pluto.driver.services.impl.resource.ResourceServicesImpl]
DEBUG - Caching PropertyDescriptors for class
[org.apache.pluto.driver.services.impl.resource.ResourceServicesImpl]
DEBUG - Found property 'class' of type [class java.lang.Class]; editor=[null]
DEBUG - Found property 'containerName' of type [class java.lang.String];
editor=[null]
DEBUG - Found property 'defaultPage' of type [class
org.apache.pluto.driver.services.impl.resource.PageConfig]; editor=[null]
DEBUG - Found property 'pages' of type [interface java.util.List]; editor=[null]
DEBUG - Found property 'portalName' of type [class java.lang.String]; editor=[null]
DEBUG - Found property 'portalVersion' of type [class java.lang.String];
editor=[null]
DEBUG - Found property 'portletApplications' of type [interface java.util.Set];
editor=[null]
DEBUG - Found property 'supportedPortletModes' of type [interface
java.util.Set]; editor=[null]
DEBUG - Found property 'supportedWindowStates' of type [interface
java.util.Set]; editor=[null]
DEBUG - Class
[org.apache.pluto.driver.services.impl.resource.ResourceServicesImpl] is cache-safe
DEBUG - Invoking BeanPostProcessors before initialization of bean
'PortletRegistryService'
DEBUG - Invoking BeanPostProcessors after initialization of bean
'PortletRegistryService'
DEBUG - Resolving reference from property 'constructor argument' in bean
'DriverConfiguration' to bean 'RenderConfigService'
INFO - Creating shared instance of singleton bean 'RenderConfigService'
DEBUG - Creating instance of bean 'RenderConfigService' with merged definition
[Root bean with class
[org.apache.pluto.driver.services.impl.resource.ResourceServicesImpl] defined in
(no description)]
DEBUG - Using cached introspection results for class
[org.apache.pluto.driver.services.impl.resource.ResourceServicesImpl]
DEBUG - Invoking BeanPostProcessors before initialization of bean
'RenderConfigService'
DEBUG - Invoking BeanPostProcessors after initialization of bean
'RenderConfigService'
DEBUG - Resolving reference from property 'constructor argument' in bean
'DriverConfiguration' to bean 'PropertyConfigService'
INFO - Creating shared instance of singleton bean 'PropertyConfigService'
DEBUG - Creating instance of bean 'PropertyConfigService' with merged definition
[Root bean with class
[org.apache.pluto.driver.services.impl.resource.ResourceServicesImpl] defined in
(no description)]
DEBUG - Using cached introspection results for class
[org.apache.pluto.driver.services.impl.resource.ResourceServicesImpl]
DEBUG - Invoking BeanPostProcessors before initialization of bean
'PropertyConfigService'
DEBUG - Invoking BeanPostProcessors after initialization of bean
'PropertyConfigService'
DEBUG - Getting BeanInfo for class
[org.apache.pluto.driver.config.impl.DriverConfigurationImpl]
DEBUG - Caching PropertyDescriptors for class
[org.apache.pluto.driver.config.impl.DriverConfigurationImpl]
DEBUG - Found property 'class' of type [class java.lang.Class]; editor=[null]
DEBUG - Found property 'containerName' of type [class java.lang.String];
editor=[null]
DEBUG - Found property 'pages' of type [interface java.util.Collection];
editor=[null]
DEBUG - Found property 'portalName' of type [class java.lang.String]; editor=[null]
DEBUG - Found property 'portalVersion' of type [class java.lang.String];
editor=[null]
DEBUG - Found property 'portletApplications' of type [interface
java.util.Collection]; editor=[null]
DEBUG - Found property 'supportedPortletModes' of type [interface
java.util.Collection]; editor=[null]
DEBUG - Found property 'supportedWindowStates' of type [interface
java.util.Collection]; editor=[null]
DEBUG - Class [org.apache.pluto.driver.config.impl.DriverConfigurationImpl] is
cache-safe
INFO - Bean 'DriverConfiguration' instantiated via constructor [public
org.apache.pluto.driver.config.impl.DriverConfigurationImpl(org.apache.pluto.driver.config.impl.PropertyConfigService,org.apache.pluto.driver.config.impl.PortletRegistryService,org.apache.pluto.driver.config.impl.RenderConfigService)]
DEBUG - Invoking BeanPostProcessors before initialization of bean
'DriverConfiguration'
DEBUG - Invoking BeanPostProcessors after initialization of bean
'DriverConfiguration'
DEBUG - Setting up digester...
DEBUG - - - Adding PortletApp Configuration for: /testsuite
DEBUG - Driver Configuration of type class
org.apache.pluto.driver.config.impl.DriverConfigurationImpl Initialized and
Ready For Service
DEBUG - * Creating portal context [pluto-portal-driver/1.1.0-ALPHA]...
DEBUG - * Creating container services...
DEBUG - * Creating portlet container...
INFO - Portlet Container [Pluto Portal Driver] created.
DEBUG - * Initializing portlet container...
DEBUG - Portlet Container [Pluto Portal Driver] successfully initialized.
INFO - Pluto Portal Driver started.
DEBUG - ServletContext.setAttribute: path: /pluto,
driverConfig=org.apache.pluto.driver.config.impl.DriverConfigurationImpl@1367e28
DEBUG - ServletContext.setAttribute: path: /pluto,
portletContainer=org.apache.pluto.core.PortletContainerImpl@19a0203
DEBUG - ServletContext created: path: /testsuite
DEBUG - WebApplication path: /testsuite, context:
com.meterware.servletunit.ServletUnitServletContext@28305d
DEBUG - String Manager Created for package: org.apache.pluto.core
DEBUG - Using Descriptor Service Impl:
org.apache.pluto.descriptors.services.castor.PortletAppDescriptorServiceImpl
DEBUG - PortalDriverServlet.doGet: PortalURL: http://localhost:0/pluto/portal?
DEBUG - PortalDriverServlet.doGet: actionWindowId: null
DEBUG - PortalDriverServlet.doGet: driverConfig:
org.apache.pluto.driver.config.impl.DriverConfigurationImpl@1367e28
DEBUG - Rendering Portal: Requested Page: null
DEBUG - Requested page is null. Returning default: Test Page
DEBUG - Parent class loader is: sun.misc.Launcher$AppClassLoader@92e78c
DEBUG - Scratch dir for the JSP engine is: C:\DOCUME~1\Graham\LOCALS~1\Temp
DEBUG - IMPORTANT: Do not modify the generated servlets
DEBUG - JspEngine --> /WEB-INF/fragments/portlet.jsp
DEBUG - ServletPath: /WEB-INF/fragments/portlet.jsp
DEBUG - PathInfo: null
DEBUG - RealPath:
D:\Work\OxfordCS\Pluto-1.1\pluto-unittest\src\test\portal\WEB-INF\fragments\portlet.jsp
DEBUG - RequestURI: /pluto/WEB-INF/fragments/portlet.jsp
DEBUG - QueryString:
DEBUG - Request Params:
DEBUG - JspEngine --> /WEB-INF/fragments/template.jsp
DEBUG - ServletPath: /WEB-INF/fragments/template.jsp
DEBUG - PathInfo: null
DEBUG - RealPath:
D:\Work\OxfordCS\Pluto-1.1\pluto-unittest\src\test\portal\WEB-INF\fragments\template.jsp
DEBUG - RequestURI: /pluto/WEB-INF/fragments/template.jsp
DEBUG - QueryString:
DEBUG - Request Params:
DEBUG - JspEngine --> /WEB-INF/fragments/portlet-page.jsp
DEBUG - ServletPath: /WEB-INF/fragments/template.jsp
DEBUG - PathInfo: null
DEBUG - RealPath:
D:\Work\OxfordCS\Pluto-1.1\pluto-unittest\src\test\portal\WEB-INF\fragments\portlet-page.jsp
DEBUG - RequestURI: /pluto/WEB-INF/fragments/template.jsp
DEBUG - QueryString:
DEBUG - Request Params:
DEBUG - JspEngine --> /WEB-INF/fragments/portlet-skin.jsp
DEBUG - ServletPath: /WEB-INF/fragments/template.jsp
DEBUG - PathInfo: null
DEBUG - RealPath:
D:\Work\OxfordCS\Pluto-1.1\pluto-unittest\src\test\portal\WEB-INF\fragments\portlet-skin.jsp
DEBUG - RequestURI: /pluto/WEB-INF/fragments/template.jsp
DEBUG - QueryString:
DEBUG - Request Params:
DEBUG - Evaluated portletId to: /testsuite.TestPortlet1
DEBUG - Rendering Portlet Window:
org.apache.pluto.driver.services.impl.resource.PortletWindowConfig@c5f468
DEBUG - getContext: /testsuite, context:
com.meterware.servletunit.ServletUnitServletContext@28305d
DEBUG - Portlet Container [Pluto Portal Driver]: Render request recieved.
DEBUG - String Manager Created for package: org.apache.pluto.core.impl
DEBUG - Portlet Container [Pluto Portal Driver]: Invoker Created.
DEBUG - Performing Render Invocation
DEBUG - Loading PortletAppDD for context: /testsuite
DEBUG - getContext: /testsuite, context:
com.meterware.servletunit.ServletUnitServletContext@28305d
DEBUG - Retrieved context:
com.meterware.servletunit.ServletUnitServletContext@28305d
DEBUG - PortletRequestDispatcher requested: /jsp/introduction.jsp
DEBUG - Parent class loader is: sun.misc.Launcher$AppClassLoader@92e78c
DEBUG - Scratch dir for the JSP engine is: C:\DOCUME~1\Graham\LOCALS~1\Temp
DEBUG - IMPORTANT: Do not modify the generated servlets
DEBUG - JspEngine --> /jsp/introduction.jsp
DEBUG - ServletPath: /WEB-INF/fragments/portlet-skin.jsp
DEBUG - PathInfo: null
DEBUG - RealPath:
D:\Work\OxfordCS\Pluto-1.1\pluto-unittest\src\test\testsuite\jsp\introduction.jsp
DEBUG - RequestURI: /pluto/WEB-INF/fragments/portlet-skin.jsp
DEBUG - QueryString:
DEBUG - Request Params:
javax.portlet.PortletException
at
org.apache.pluto.core.impl.PortletRequestDispatcherImpl.include(PortletRequestDispatcherImpl.java:80)
at org.apache.pluto.testsuite.TestPortlet.doView(TestPortlet.java:171)
at javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:247)
at javax.portlet.GenericPortlet.render(GenericPortlet.java:175)
at org.apache.pluto.core.PortletServlet.dispatch(PortletServlet.java:162)
at org.apache.pluto.core.PortletServlet.doGet(PortletServlet.java:113)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
com.meterware.servletunit.RequestDispatcherImpl.include(RequestDispatcherImpl.java:59)
at org.apache.pluto.core.PortletInvoker.invoke(PortletInvoker.java:156)
at org.apache.pluto.core.PortletInvoker.render(PortletInvoker.java:103)
at
org.apache.pluto.core.PortletContainerImpl.doRender(PortletContainerImpl.java:140)
at org.apache.pluto.driver.tags.PortletTag.doStartTag(PortletTag.java:94)
at
org.apache.jsp.WEB_002dINF.fragments.portlet_002dskin_jsp._jspx_meth_pluto_portlet_0(org.apache.jsp.WEB_002dINF.fragments.portlet_002dskin_jsp:96)
at
org.apache.jsp.WEB_002dINF.fragments.portlet_002dskin_jsp._jspService(org.apache.jsp.WEB_002dINF.fragments.portlet_002dskin_jsp:71)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
com.meterware.servletunit.RequestDispatcherImpl.include(RequestDispatcherImpl.java:59)
at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:966)
at
org.apache.jsp.WEB_002dINF.fragments.portlet_002dpage_jsp._jspx_meth_c_forEach_0(org.apache.jsp.WEB_002dINF.fragments.portlet_002dpage_jsp:108)
at
org.apache.jsp.WEB_002dINF.fragments.portlet_002dpage_jsp._jspService(org.apache.jsp.WEB_002dINF.fragments.portlet_002dpage_jsp:66)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
com.meterware.servletunit.RequestDispatcherImpl.include(RequestDispatcherImpl.java:59)
at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:966)
at
org.apache.jsp.WEB_002dINF.fragments.template_jsp._jspService(org.apache.jsp.WEB_002dINF.fragments.template_jsp:108)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
com.meterware.servletunit.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:54)
at org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:693)
at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:660)
at
org.apache.jsp.WEB_002dINF.fragments.portlet_jsp._jspService(org.apache.jsp.WEB_002dINF.fragments.portlet_jsp:59)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
com.meterware.servletunit.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:54)
at org.apache.pluto.driver.PortalDriverServlet.doGet(PortalDriverServlet.java:123)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
com.meterware.servletunit.InvocationContextImpl.service(InvocationContextImpl.java:80)
at
com.meterware.servletunit.ServletUnitClient.newResponse(ServletUnitClient.java:118)
at com.meterware.httpunit.WebWindow.getResource(WebWindow.java:164)
at com.meterware.httpunit.WebWindow.getSubframeResponse(WebWindow.java:128)
at com.meterware.httpunit.WebWindow.getResponse(WebWindow.java:121)
at com.meterware.httpunit.WebClient.getResponse(WebClient.java:113)
at
org.apache.pluto.unittest.TestPortletAccess.testDoGetHttpServletRequestHttpServletResponse(TestPortletAccess.java:96)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: org.apache.jasper.JasperException: The absolute uri:
http://java.sun.com/portlet cannot be resolved in either web.xml or the jar
files deployed with this application
at
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:50)
at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:114)
at
org.apache.jasper.compiler.TagLibraryInfoImpl.generateTLDLocation(TagLibraryInfoImpl.java:316)
at
org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:147)
at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:418)
at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:483)
at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1543)
at org.apache.jasper.compiler.Parser.parse(Parser.java:126)
at org.apache.jasper.compiler.ParserController.doParse(ParserController.java:211)
at org.apache.jasper.compiler.ParserController.parse(ParserController.java:100)
at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:146)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
com.meterware.servletunit.RequestDispatcherImpl.include(RequestDispatcherImpl.java:59)
at
org.apache.pluto.core.impl.PortletRequestDispatcherImpl.include(PortletRequestDispatcherImpl.java:71)
... 75 more
Nested Exception is org.apache.jasper.JasperException: The absolute uri:
http://java.sun.com/portlet cannot be resolved in either web.xml or the jar
files deployed with this application
at
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:50)
at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:114)
at
org.apache.jasper.compiler.TagLibraryInfoImpl.generateTLDLocation(TagLibraryInfoImpl.java:316)
at
org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:147)
at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:418)
at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:483)
at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1543)
at org.apache.jasper.compiler.Parser.parse(Parser.java:126)
at org.apache.jasper.compiler.ParserController.doParse(ParserController.java:211)
at org.apache.jasper.compiler.ParserController.parse(ParserController.java:100)
at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:146)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
com.meterware.servletunit.RequestDispatcherImpl.include(RequestDispatcherImpl.java:59)
at
org.apache.pluto.core.impl.PortletRequestDispatcherImpl.include(PortletRequestDispatcherImpl.java:71)
at org.apache.pluto.testsuite.TestPortlet.doView(TestPortlet.java:171)
at javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:247)
at javax.portlet.GenericPortlet.render(GenericPortlet.java:175)
at org.apache.pluto.core.PortletServlet.dispatch(PortletServlet.java:162)
at org.apache.pluto.core.PortletServlet.doGet(PortletServlet.java:113)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
com.meterware.servletunit.RequestDispatcherImpl.include(RequestDispatcherImpl.java:59)
at org.apache.pluto.core.PortletInvoker.invoke(PortletInvoker.java:156)
at org.apache.pluto.core.PortletInvoker.render(PortletInvoker.java:103)
at
org.apache.pluto.core.PortletContainerImpl.doRender(PortletContainerImpl.java:140)
at org.apache.pluto.driver.tags.PortletTag.doStartTag(PortletTag.java:94)
at
org.apache.jsp.WEB_002dINF.fragments.portlet_002dskin_jsp._jspx_meth_pluto_portlet_0(org.apache.jsp.WEB_002dINF.fragments.portlet_002dskin_jsp:96)
at
org.apache.jsp.WEB_002dINF.fragments.portlet_002dskin_jsp._jspService(org.apache.jsp.WEB_002dINF.fragments.portlet_002dskin_jsp:71)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
com.meterware.servletunit.RequestDispatcherImpl.include(RequestDispatcherImpl.java:59)
at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:966)
at
org.apache.jsp.WEB_002dINF.fragments.portlet_002dpage_jsp._jspx_meth_c_forEach_0(org.apache.jsp.WEB_002dINF.fragments.portlet_002dpage_jsp:108)
at
org.apache.jsp.WEB_002dINF.fragments.portlet_002dpage_jsp._jspService(org.apache.jsp.WEB_002dINF.fragments.portlet_002dpage_jsp:66)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
com.meterware.servletunit.RequestDispatcherImpl.include(RequestDispatcherImpl.java:59)
at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:966)
at
org.apache.jsp.WEB_002dINF.fragments.template_jsp._jspService(org.apache.jsp.WEB_002dINF.fragments.template_jsp:108)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
com.meterware.servletunit.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:54)
at org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:693)
at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:660)
at
org.apache.jsp.WEB_002dINF.fragments.portlet_jsp._jspService(org.apache.jsp.WEB_002dINF.fragments.portlet_jsp:59)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
com.meterware.servletunit.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:54)
at org.apache.pluto.driver.PortalDriverServlet.doGet(PortalDriverServlet.java:123)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
com.meterware.servletunit.InvocationContextImpl.service(InvocationContextImpl.java:80)
at
com.meterware.servletunit.ServletUnitClient.newResponse(ServletUnitClient.java:118)
at com.meterware.httpunit.WebWindow.getResource(WebWindow.java:164)
at com.meterware.httpunit.WebWindow.getSubframeResponse(WebWindow.java:128)
at com.meterware.httpunit.WebWindow.getResponse(WebWindow.java:121)
at com.meterware.httpunit.WebClient.getResponse(WebClient.java:113)
at
org.apache.pluto.unittest.TestPortletAccess.testDoGetHttpServletRequestHttpServletResponse(TestPortletAccess.java:96)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
]]
And a copy of the stack at the breakpoint:
[[
Thread [main] (Suspended)
PortletInvoker.invoke(PortletRequestImpl, PortletResponseImpl, Integer) line: 171
PortletInvoker.render(RenderRequestImpl, RenderResponseImpl) line: 103
PortletContainerImpl.doRender(PortletWindow, HttpServletRequest,
HttpServletResponse) line: 140
PortletTag.doStartTag() line: 94
portlet-skin.jsp line: 3
portlet-skin.jsp line: 3
portlet_002dskin_jsp(HttpJspBase).service(HttpServletRequest,
HttpServletResponse) line: 97
portlet_002dskin_jsp(HttpServlet).service(ServletRequest, ServletResponse)
line: 853
JspServletWrapper.service(HttpServletRequest, HttpServletResponse, boolean)
line: 322
JspServlet.serviceJspFile(HttpServletRequest, HttpServletResponse, String,
Throwable, boolean) line: 291
JspServlet.service(HttpServletRequest, HttpServletResponse) line: 241
JspServlet(HttpServlet).service(ServletRequest, ServletResponse) line: 853
RequestDispatcherImpl.include(ServletRequest, ServletResponse) line: 59
JspRuntimeLibrary.include(ServletRequest, ServletResponse, String, JspWriter,
boolean) line: 966
portlet-page.jsp line: 8
portlet-page.jsp line: 4
portlet_002dpage_jsp(HttpJspBase).service(HttpServletRequest,
HttpServletResponse) line: 97
portlet_002dpage_jsp(HttpServlet).service(ServletRequest, ServletResponse)
line: 853
JspServletWrapper.service(HttpServletRequest, HttpServletResponse, boolean)
line: 322
JspServlet.serviceJspFile(HttpServletRequest, HttpServletResponse, String,
Throwable, boolean) line: 291
JspServlet.service(HttpServletRequest, HttpServletResponse) line: 241
JspServlet(HttpServlet).service(ServletRequest, ServletResponse) line: 853
RequestDispatcherImpl.include(ServletRequest, ServletResponse) line: 59
JspRuntimeLibrary.include(ServletRequest, ServletResponse, String, JspWriter,
boolean) line: 966
template.jsp line: 40
template_jsp(HttpJspBase).service(HttpServletRequest, HttpServletResponse) line: 97
template_jsp(HttpServlet).service(ServletRequest, ServletResponse) line: 853
JspServletWrapper.service(HttpServletRequest, HttpServletResponse, boolean)
line: 322
JspServlet.serviceJspFile(HttpServletRequest, HttpServletResponse, String,
Throwable, boolean) line: 291
JspServlet.service(HttpServletRequest, HttpServletResponse) line: 241
JspServlet(HttpServlet).service(ServletRequest, ServletResponse) line: 853
RequestDispatcherImpl.forward(ServletRequest, ServletResponse) line: 54
PageContextImpl.doForward(String) line: 693
PageContextImpl.forward(String) line: 660
portlet.jsp line: 4
portlet_jsp(HttpJspBase).service(HttpServletRequest, HttpServletResponse) line: 97
portlet_jsp(HttpServlet).service(ServletRequest, ServletResponse) line: 853
JspServletWrapper.service(HttpServletRequest, HttpServletResponse, boolean)
line: 322
JspServlet.serviceJspFile(HttpServletRequest, HttpServletResponse, String,
Throwable, boolean) line: 291
JspServlet.service(HttpServletRequest, HttpServletResponse) line: 241
JspServlet(HttpServlet).service(ServletRequest, ServletResponse) line: 853
RequestDispatcherImpl.forward(ServletRequest, ServletResponse) line: 54
PortalDriverServlet.doGet(HttpServletRequest, HttpServletResponse) line: 123
PortalDriverServlet(HttpServlet).service(HttpServletRequest,
HttpServletResponse) line: 740
PortalDriverServlet(HttpServlet).service(ServletRequest, ServletResponse) line: 853
InvocationContextImpl.service() line: 80
ServletUnitClient.newResponse(WebRequest, FrameSelector) line: 118
WebWindow.getResource(WebRequest) line: 164
WebWindow.getSubframeResponse(WebRequest, RequestContext) line: 128
WebWindow.getResponse(WebRequest) line: 121
ServletUnitClient(WebClient).getResponse(WebRequest) line: 113
TestPortletAccess.testDoGetHttpServletRequestHttpServletResponse() line: 96
NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available
[native method]
NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
Method.invoke(Object, Object...) line: 585
TestPortletAccess(TestCase).runTest() line: 154
TestPortletAccess(TestCase).runBare() line: 127
TestResult$1.protect() line: 106
TestResult.runProtected(Test, Protectable) line: 124
TestResult.run(TestCase) line: 109
TestPortletAccess(TestCase).run(TestResult) line: 118
TestSuite.runTest(Test, TestResult) line: 208
TestSuite.run(TestResult) line: 203
RemoteTestRunner.runTests(String[], String) line: 478
RemoteTestRunner.run() line: 344
RemoteTestRunner.main(String[]) line: 196
]]
--
Graham Klyne
For email:
http://www.ninebynine.org/#Contact
Re: Doubts about strategy of ServletUnit testing
Posted by "David H. DeWolf" <dd...@apache.org>.
You're finding some interesting things. If you find anything that
would be easier to implement by changing an implementation of pluto,
let us know. It's possible that any enhancements you'd need would
also make someone else's life easier.
David
On 12/5/05, Graham Klyne <GK...@ninebynine.org> wrote:
> David,
>
> Thanks for your thoughts on my unit testing problems.
>
> This message is for information, in case anyone else should tread the same path...
>
> David H. DeWolf wrote:
> > You are correct. I'm not sure what your solution should be, but can't
> > you do one of the following:
> >
> > 1) create your own ServletContext implementation and tell ServletUnit to
> > use it
>
> I tried this, but ended up with another problem; this is an excerpt from my
> notes at [http://wiki.oss-watch.ac.uk/PlutoNotes]:
>
> I tried modifying ServletUnitServletContext.getServletContext to return 'this'
> in conjunction with a revised 'ServletRunner' setup that registers the portlets
> with the original 'ServletRunner' class, but this fails because it looks for the
> 'WEB-INF/portlet.xml' file in the 'portal' directory, when it is actually in
> 'testsuite'. Further analysis of 'ServletRunner' shows that it contains a
> single 'WebApplication' value, which in turn contains the context directory and
> path values.
>
> I also note that the 'ServletContext' implementation in uses a 'WebApplication'
> value to determine the location of a resource for 'getResourceAsStream', so the
> strategy of item (2) above cannot be used to serve different servlets from
> different context directories. This suggests that multiple 'WebApplication's
> must be created, and a common directory of path->'ServletContext' values be
> maintained. A static 'Hashtable' value in 'WebApplication' could serve this
> purpose, 'getServletContext' using this map returning a context value.
>
> I tried doing the change noted above, and the application ran a good deal
> further. But, eventually, the portal driver uses 'getServletContext'
> implemented by 'javax.servlet.GenericServlet.getServletContext()', meaning that
> attributes are not carried over from the ServletUnit environment. Consequently,
> the 'driverConfig' value set up for the testsuite is not defined, which
> eventually results in a null pointer exception. (The Pluto portal driver
> catches this and uses the exception stack-trace for the portlet rendering in
> place of the intended portlet content; this is more difficult to detect than,
> say, raising an exception when the target portlet cannot be located.)
>
> ...
>
> I am now reconsidering my options -- I'm not sure if it will be fruitful to
> pursue this path. (Replacing the javax.servlet.GenericServlet implementation
> that is accessed up by the Pluto portal driver might be an option...)
>
> #g
> --
>
> > 2) explicitly set ServletContext attributes during test initialization
> >
> > 3) Submit a patch to ServletUnit to let you do one of the above.
> >
> > David
> >
> > Graham Klyne wrote:
> >
> >> I seem to have run into a limitation of ServletUnit for testing Pluto
> >> code. It
> >> appears that when the portal driver attempts to retrieve a
> >> ServerContext value
> >> for the target portlet, ServletUnit simply returns a hard-coded null,
> >> which
> >> (unsurprisingly) results in portlet invocation failure. Also, it is
> >> not clear
> >> to me that ServletUnit has the ability to deal with more than one
> >> servlet and/or
> >> context in a single run (i.e. it reads a single application's web.xml
> >> file,
> >> without any obvious provision for dealing with more).
> >>
> >> I may take a little while longer to look at the ServletUnit code, but
> >> it is
> >> looking as if I may have to fall back on using HTTPUnit to test via a
> >> running
> >> Tomcat instance, which will make the tests slower to run than I would
> >> have liked.
> >>
> >> Does anyone have any edifying thoughts, comments or pointers?
> >>
> >> #g
> >>
> >
>
> --
> Graham Klyne
> For email:
> http://www.ninebynine.org/#Contact
>
>
Re: Doubts about strategy of ServletUnit testing
Posted by Graham Klyne <GK...@ninebynine.org>.
David,
Thanks for your thoughts on my unit testing problems.
This message is for information, in case anyone else should tread the same path...
David H. DeWolf wrote:
> You are correct. I'm not sure what your solution should be, but can't
> you do one of the following:
>
> 1) create your own ServletContext implementation and tell ServletUnit to
> use it
I tried this, but ended up with another problem; this is an excerpt from my
notes at [http://wiki.oss-watch.ac.uk/PlutoNotes]:
I tried modifying ServletUnitServletContext.getServletContext to return 'this'
in conjunction with a revised 'ServletRunner' setup that registers the portlets
with the original 'ServletRunner' class, but this fails because it looks for the
'WEB-INF/portlet.xml' file in the 'portal' directory, when it is actually in
'testsuite'. Further analysis of 'ServletRunner' shows that it contains a
single 'WebApplication' value, which in turn contains the context directory and
path values.
I also note that the 'ServletContext' implementation in uses a 'WebApplication'
value to determine the location of a resource for 'getResourceAsStream', so the
strategy of item (2) above cannot be used to serve different servlets from
different context directories. This suggests that multiple 'WebApplication's
must be created, and a common directory of path->'ServletContext' values be
maintained. A static 'Hashtable' value in 'WebApplication' could serve this
purpose, 'getServletContext' using this map returning a context value.
I tried doing the change noted above, and the application ran a good deal
further. But, eventually, the portal driver uses 'getServletContext'
implemented by 'javax.servlet.GenericServlet.getServletContext()', meaning that
attributes are not carried over from the ServletUnit environment. Consequently,
the 'driverConfig' value set up for the testsuite is not defined, which
eventually results in a null pointer exception. (The Pluto portal driver
catches this and uses the exception stack-trace for the portlet rendering in
place of the intended portlet content; this is more difficult to detect than,
say, raising an exception when the target portlet cannot be located.)
...
I am now reconsidering my options -- I'm not sure if it will be fruitful to
pursue this path. (Replacing the javax.servlet.GenericServlet implementation
that is accessed up by the Pluto portal driver might be an option...)
#g
--
> 2) explicitly set ServletContext attributes during test initialization
>
> 3) Submit a patch to ServletUnit to let you do one of the above.
>
> David
>
> Graham Klyne wrote:
>
>> I seem to have run into a limitation of ServletUnit for testing Pluto
>> code. It
>> appears that when the portal driver attempts to retrieve a
>> ServerContext value
>> for the target portlet, ServletUnit simply returns a hard-coded null,
>> which
>> (unsurprisingly) results in portlet invocation failure. Also, it is
>> not clear
>> to me that ServletUnit has the ability to deal with more than one
>> servlet and/or
>> context in a single run (i.e. it reads a single application's web.xml
>> file,
>> without any obvious provision for dealing with more).
>>
>> I may take a little while longer to look at the ServletUnit code, but
>> it is
>> looking as if I may have to fall back on using HTTPUnit to test via a
>> running
>> Tomcat instance, which will make the tests slower to run than I would
>> have liked.
>>
>> Does anyone have any edifying thoughts, comments or pointers?
>>
>> #g
>>
>
--
Graham Klyne
For email:
http://www.ninebynine.org/#Contact
Re: Doubts about strategy of ServletUnit testing
Posted by "David H. DeWolf" <dd...@apache.org>.
You are correct. I'm not sure what your solution should be, but can't
you do one of the following:
1) create your own ServletContext implementation and tell ServletUnit to
use it
2) explicitly set ServletContext attributes during test initialization
3) Submit a patch to ServletUnit to let you do one of the above.
David
Graham Klyne wrote:
> I seem to have run into a limitation of ServletUnit for testing Pluto code. It
> appears that when the portal driver attempts to retrieve a ServerContext value
> for the target portlet, ServletUnit simply returns a hard-coded null, which
> (unsurprisingly) results in portlet invocation failure. Also, it is not clear
> to me that ServletUnit has the ability to deal with more than one servlet and/or
> context in a single run (i.e. it reads a single application's web.xml file,
> without any obvious provision for dealing with more).
>
> I may take a little while longer to look at the ServletUnit code, but it is
> looking as if I may have to fall back on using HTTPUnit to test via a running
> Tomcat instance, which will make the tests slower to run than I would have liked.
>
> Does anyone have any edifying thoughts, comments or pointers?
>
> #g
>