Patrick, I ran into this problem as well. I believe it has to do with the wsrp4j-producer.xml file that is copied to the $CATALINA_HOME\conf\Catalina\localhost directory (see the question I posted to this list earlier in the month).
In my testing, this file caused problems on Tomcat 5.0.x, but not on Tomct 5.5.x. When I fixed the path value in this file, I was able to get things running on both versions of Tomcat. Brian -----Original Message----- From: Patrick [mailto:[EMAIL PROTECTED] Sent: Thursday, March 23, 2006 1:52 AM To: [email protected] Subject: Re: Unable to run WSRP4J portlet examples thanks to both for the help Julie I confirm I have the exact same libs you mentioned. Brian, that was very much it, Pluto is indeed much happier now that the web.xml has been populated. Apart from a slight problem, I had to replace <distributable>false</distributable> with <distributable></distributable> otherwise it gives you this: --------- 23-mar-2006 9.21.41 org.apache.commons.digester.Digester error GRAVE: Parse Error at line 29 column 38: The content of element type "distributable" must match "EMPTY". org.xml.sax.SAXParseException: The content of element type "distributable" must match "EMPTY". --------- I could go a bit further but not much :-( So eventually it went passed the initial problem ... but I keep having a problem running the test portlet though. Now it complains that it cannot find the ContextPath for the Test Portlet web app as weird as it sounds. I controlled with Tomcat manager, had a test call to the context /wsrp4j-testportlet, all fine. Again to understand a bit further why this all happens I just added some traces to Pluto where I dump the WeAppDefinition object before the call to getContextPath(). As you can see, at the end of the dump it even displays the actual web app context it is looking for: contextPath='/wsrp4j-testportlet' Any idea ? is there another config issue you may know about ? N.B.: I tried to run the Producer on both Tomcat 4.1 and 5.5 but got the same error each time. Here it goes (the dump is between the two "-------------------------------------") : ==== 2006-03-23 10:13:00,419 [http-8080-Processor5] ALL org.apache.wsrp4j.producer.provider.pluto.driver.PortletInvokerImpl: getPortletWindow - Exiting method. 2006-03-23 10:13:00,466 [http-8080-Processor5] DEBUG org.apache.pluto.PortletContainerImpl: PortletContainerImpl.portletService(proxyportletapp_row10_col10_p10) called. ------------------------------------------ 2006-03-23 10:13:00,778 [http-8080-Processor5] DEBUG org.apache.pluto.portalImpl: Web App Definition dump: ############## class org.apache.pluto.portalImpl.om.servlet.impl.WebApplicationDefinitionImpl : { id='' class org.apache.pluto.portalImpl.om.common.impl.DisplayNameSetImpl: class org.apache.pluto.portalImpl.om.common.impl.DisplayNameImpl: displayName='WSRP4J TestPortlet', locale='en' class org.apache.pluto.portalImpl.om.common.impl.DescriptionSetImpl: class org.apache.pluto.portalImpl.om.common.impl.ParameterSetImpl: class org.apache.pluto.portalImpl.om.servlet.impl.ServletDefinitionListImpl: class org.apache.pluto.portalImpl.om.servlet.impl.ServletDefinitionImpl: { id='' servletName='WSRP4JTestPortlet' class org.apache.pluto.portalImpl.om.common.impl.DescriptionSetImpl: class org.apache.pluto.portalImpl.om.common.impl.DescriptionImpl: description='Auto Generated Portlet Invoker Servlet', locale='en' class org.apache.pluto.portalImpl.om.common.impl.DisplayNameSetImpl: class org.apache.pluto.portalImpl.om.common.impl.DisplayNameImpl: displayName='WSRP4JTestPortletWrapper (Pluto Invoker)', locale='en'servletClass='org.apache.pluto.core.PortletServlet' class org.apache.pluto.portalImpl.om.common.impl.ParameterSetImpl: class org.apache.pluto.portalImpl.om.common.impl.ParameterImpl: name='portlet-class', value='org.apache.wsrp4j.testportlet.TestPortlet', descriptions=' class org.apache.pluto.portalImpl.om.common.impl.DescriptionSetImpl: ' class org.apache.pluto.portalImpl.om.common.impl.ParameterImpl: name='portlet-guid', value='wsrp4j-testportlet.WSRP4JTestPortlet', descriptions=' class org.apache.pluto.portalImpl.om.common.impl.DescriptionSetImpl: ' class org.apache.pluto.portalImpl.om.common.impl.SecurityRoleRefSetImpl: Linked ServletMapping: class org.apache.pluto.portalImpl.om.servlet.impl.ServletMappingImpl: { id='null' servletName='WSRP4JTestPortlet' urlPattern='/WSRP4JTestPortlet/*' } } ServletMappings: class org.apache.pluto.portalImpl.om.servlet.impl.ServletMappingImpl: { id='null' servletName='WSRP4JTestPortlet' urlPattern='/WSRP4JTestPortlet/*' } contextPath='/wsrp4j-testportlet' } ------------------------------------------ 2006-03-23 10:13:00,778 [http-8080-Processor5] DEBUG org.apache.pluto.portalImpl: Looking up ServletContext for path /wsrp4j-testportlet 2006-03-23 10:13:00,778 [http-8080-Processor5] ERROR org.apache.pluto.portalImpl: ServletContext '/wsrp4j-testportlet' not found! 2006-03-23 10:13:00,778 [http-8080-Processor5] ERROR org.apache.pluto.invoker.impl.PortletInvokerImpl: PortletInvokerImpl.action() - Unable to find RequestDispatcher. 2006-03-23 10:13:00,794 [http-8080-Processor5] ERROR org.apache.wsrp4j.producer.provider.pluto.driver.PortletInvokerImpl: invokeGetMarkup - Call of portletService() failed! javax.portlet.PortletException: Unable to find dispatcher for context: wsrp4j producer at org.apache.pluto.invoker.impl.PortletInvokerImpl.invoke(PortletInvokerIm pl.java:170) at org.apache.pluto.invoker.impl.PortletInvokerImpl.render(PortletInvokerIm pl.java:73) at org.apache.pluto.PortletContainerImpl.renderPortlet(PortletContainerImpl .java:119) at org.apache.pluto.portalImpl.core.PortletContainerWrapperImpl.renderPortl et(PortletContainerWrapperImpl.java:70) at org.apache.wsrp4j.producer.provider.pluto.driver.PortletInvokerImpl.invo keGetMarkup(PortletInvokerImpl.java:176) at org.apache.wsrp4j.commons.producer.driver.WSRPEngine.getMarkup(WSRPEngin e.java:750) at org.apache.wsrp4j.commons.producer.binding.WSRPMarkupBindingImpl.getMark up(WSRPMarkupBindingImpl.java:62) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav a:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor Impl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java :397) at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.ja va:186) at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323 ) at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.j ava:32) at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118) at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83) at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:453) at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281) at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699) at javax.servlet.http.HttpServlet.service(HttpServlet.java:716) at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.j ava:327) at javax.servlet.http.HttpServlet.service(HttpServlet.java:809) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tionFilterChain.java:200) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erChain.java:146) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv e.java:209) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i nvokeNext(StandardPipeline.java:596) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4 33) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv e.java:144) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i nvokeNext(StandardPipeline.java:596) at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.ja va:199) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i nvokeNext(StandardPipeline.java:594) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4 33) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:235 8) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java :133) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i nvokeNext(StandardPipeline.java:596) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherVa lve.java:118) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i nvokeNext(StandardPipeline.java:594) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java :116) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i nvokeNext(StandardPipeline.java:594) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4 33) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve. java:127) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i nvokeNext(StandardPipeline.java:596) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4 33) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:152) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:79 9) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC onnection(Http11Protocol.java:705) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:57 7) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool .java:683) at java.lang.Thread.run(Thread.java:534) 2006-03-23 10:13:00,810 [http-8080-Processor5] ALL org.apache.wsrp4j.producer.provider.pluto.driver.PortletInvokerImpl: invokeGetMarkup - Exiting method. 2006-03-23 10:13:00,810 [http-8080-Processor5] ALL org.apache.wsrp4j.commons.producer.driver.WSRPEngine: getMarkup - Exiting method. On 3/22/06, DeHamer, Brian <[EMAIL PROTECTED]> wrote: > Patrick, > > This occur because the web.xml file for the sample portlet is > incomplete > -- try replacing the contents of the web.xml file with the following: > > <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE web-app PUBLIC > "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" > "http://java.sun.com/dtd/web-app_2_3.dtd"> > <web-app> > <display-name>WSRP4J TestPortlet</display-name> > <distributable>false</distributable> > <servlet> > <servlet-name>WSRP4JTestPortlet</servlet-name> > <display-name>WSRP4JTestPortletWrapper (Pluto > Invoker)</display-name> > <description>Auto Generated Portlet Invoker Servlet</description> > <servlet-class>org.apache.pluto.core.PortletServlet</servlet-class> > <init-param> > <param-name>portlet-class</param-name> > > <param-value>org.apache.wsrp4j.testportlet.TestPortlet</param-value> > </init-param> > <init-param> > <param-name>portlet-guid</param-name> > <param-value>wsrp4j-testportlet.WSRP4JTestPortlet</param-value> > </init-param> > </servlet> > <servlet-mapping> > <servlet-name>WSRP4JTestPortlet</servlet-name> > <url-pattern>/WSRP4JTestPortlet/*</url-pattern> > </servlet-mapping> > </web-app> > > Brian > > -----Original Message----- > From: Patrick [mailto:[EMAIL PROTECTED] > Sent: Wednesday, March 22, 2006 9:31 AM > To: [email protected] > Subject: Unable to run WSRP4J portlet examples > > Hello there > > I've been trying with last night codeline (fresh check out from SVN) > to run the examples provided before trying my own. > To no extent.... > I compiled everything ok with Maven 1.0.2, then running the Producer > on Tomcat 4.1 and the SwingConsumer with JRE 1.5 (note that it does > not work with 1.4 - it complains about a missing > "org.xml.sax.ext.Attribute2" class). > > I'm getting a NullPointerException error as described at the bottom of > this mail... > > Then I had a look at Pluto's container code to understand a bit better > what's going on. > Basically the PortletInvoker gets a ServletDefinition NULL object from > the PortletDefinition object. > > Any idea why ? > Did someone ever face the same problem ? > Is this a configuration issue or a bug ? > > any help appreciated > tx > Patrick > ========================= > 2006-03-22 17:56:13,597 [http-8080-Processor5] INFO > org.apache.wsrp4j.producer.provider.pluto.driver.PortletInvokerImpl: > getPortletWindow - New portlet window created! > 2006-03-22 17:56:13,597 [http-8080-Processor5] ALL > org.apache.wsrp4j.producer.provider.pluto.driver.PortletInvokerImpl: > getPortletWindow - Exiting method. > 2006-03-22 17:56:13,644 [http-8080-Processor5] DEBUG > org.apache.pluto.PortletContainerImpl: > PortletContainerImpl.portletService(10.102.192.151_1143046563191_1) > called. > 2006-03-22 17:56:13,785 [http-8080-Processor5] ERROR > org.apache.wsrp4j.producer.provider.pluto.driver.PortletInvokerImpl: > invokeGetMarkup - Call of portletService() failed! > java.lang.NullPointerException > at > org.apache.pluto.invoker.impl.PortletInvokerImpl.invoke(PortletInvoker > Im > pl.java:113) > at > org.apache.pluto.invoker.impl.PortletInvokerImpl.render(PortletInvoker > Im > pl.java:73) > at > org.apache.pluto.PortletContainerImpl.renderPortlet(PortletContainerIm > pl > .java:119) > at > org.apache.pluto.portalImpl.core.PortletContainerWrapperImpl.renderPor > tl > et(PortletContainerWrapperImpl.java:70) > at > org.apache.wsrp4j.producer.provider.pluto.driver.PortletInvokerImpl.in > vo > keGetMarkup(PortletInvokerImpl.java:176) > at > org.apache.wsrp4j.commons.producer.driver.WSRPEngine.getMarkup(WSRPEng > in > e.java:750) > at > org.apache.wsrp4j.commons.producer.binding.WSRPMarkupBindingImpl.getMa > rk > up(WSRPMarkupBindingImpl.java:62) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.j > av > a:39) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccess > or > Impl.java:25) > at java.lang.reflect.Method.invoke(Method.java:324) > at > org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.ja > va > :397) > at > org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider. > ja > va:186) > at > org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:3 > 23 > ) > at > org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy > .j > ava:32) > at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118) > at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83) > at > org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:453) > at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281) > at > org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:716) > at > org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase > .j > ava:327) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:809) > at > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appli > ca > tionFilterChain.java:200) > at > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFi > lt > erChain.java:146) > at > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVa > lv > e.java:209) > at > org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext > .i > nvokeNext(StandardPipeline.java:596) > at > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java > :4 > 33) > at > org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948) > at > org.apache.catalina.core.StandardContextValve.invoke(StandardContextVa > lv > e.java:144) > at > org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext > .i > nvokeNext(StandardPipeline.java:596) > at > org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve. > ja > va:199) > at > org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext > .i > nvokeNext(StandardPipeline.java:594) > at > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java > :4 > 33) > at > org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948) > at > org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2 > 35 > 8) > at > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.ja > va > :133) > at > org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext > .i > nvokeNext(StandardPipeline.java:596) > at > org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcher > Va > lve.java:118) > at > org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext > .i > nvokeNext(StandardPipeline.java:594) > at > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.ja > va > :116) > at > org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext > .i > nvokeNext(StandardPipeline.java:594) > at > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java > :4 > 33) > at > org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948) > at > org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve. > java:127) > at > org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext > .i > nvokeNext(StandardPipeline.java:596) > at > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java > :4 > 33) > at > org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948) > at > org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:152) > at > org.apache.coyote.http11.Http11Processor.process(Http11Processor.java: > 79 > 9) > at > org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proces > sC > onnection(Http11Protocol.java:705) > at > org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java: > 57 > 7) > at > org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPo > ol > .java:683) > at java.lang.Thread.run(Thread.java:534) > 2006-03-22 17:56:13,785 [http-8080-Processor5] ALL > org.apache.wsrp4j.producer.provider.pluto.driver.PortletInvokerImpl: > invokeGetMarkup - Exiting method. > 2006-03-22 17:56:13,785 [http-8080-Processor5] ALL > org.apache.wsrp4j.commons.producer.driver.WSRPEngine: getMarkup - > Exiting method. >
