Topic
  • 3 replies
  • Latest Post - ‏2011-12-22T13:30:29Z by defiant42
sp33dy
sp33dy
3 Posts

Pinned topic getActionURL() fails on Portal server but not in local WASCE test env

‏2009-08-26T22:23:14Z |
Hi,

Googled around and can't find an answer to my problem. Anyone encountered a problem with getActionURL() ?

If I deploy my model and helper class to WASCE, all is fine. getActionURL(<Action>) is found and my code generates links in a table. All well and good. If I deploy the same code to Portal 6.1 I get the following error:

===========================
An error has occurred.
The error message returned was: "Error in method CallSearchAction. Error in method SearchAL. Error in method SearchResultHelperLJO.formatXMLResults. com.ibm.ws.portletcontainer.core.impl.ActionResponseImpl incompatible with javax.portlet.RenderResponse".

Please refer to the logs folder in your deployed application for additional error information.

Click here for a detailed error message. Click here to hide the detailed error message.

ExceptionError in method CallSearchAction. Error in method SearchAL. Error in method SearchResultHelperLJO.formatXMLResults. com.ibm.ws.portletcontainer.core.impl.ActionResponseImpl incompatible with javax.portlet.RenderResponse

Stack Trace
java.lang.ClassCastException: com.ibm.ws.portletcontainer.core.impl.ActionResponseImpl incompatible with javax.portlet.RenderResponse
at com.bowstreet.portlet.util.PortalURLMapper.createActionURL(PortalURLMapper.java:369)
at com.bowstreet.portlet.util.PortalURLMapper.getURL(PortalURLMapper.java:110)
at com.bowstreet.webapp.engine.WrappedURLMapper.getURL(WrappedURLMapper.java:71)
at com.bowstreet.webapp.engine.WrappedURLMapper.getURL(WrappedURLMapper.java:92)
at com.bowstreet.webapp.engine.WebAppAccessImpl.getActionURL(WebAppAccessImpl.java:858)
at com.ibm.dmi2.SearchResultHelper.formatXMLResults(SearchResultHelper.java:116)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:618)
at com.bowstreet.webapp.engine.actions.MethodAction.callAction(MethodAction.java:90)
at com.bowstreet.webapp.engine.WebAppAccessImpl.callMethod(WebAppAccessImpl.java:405)
at genjava._SearchAssetPortlet.SearchAL(_SearchAssetPortlet.java:186)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:618)
at com.bowstreet.webapp.engine.actions.MethodAction.callAction(MethodAction.java:90)
at com.bowstreet.webapp.engine.WebAppAccessImpl.callMethod(WebAppAccessImpl.java:405)
at genjava._SearchAssetPortlet.CallSearchAction(_SearchAssetPortlet.java:114)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:618)
at com.bowstreet.webapp.engine.actions.MethodAction.callAction(MethodAction.java:90)
at com.bowstreet.webapp.engine.WebAppAccessImpl.callMethod(WebAppAccessImpl.java:405)
at com.bowstreet.webapp.engine.WebAppAccessImpl.processAction(WebAppAccessImpl.java:1063)
at com.bowstreet.webapp.engine.WebAppAccessImpl.processAction(WebAppAccessImpl.java:1163)
at com.bowstreet.webapp.engine.WebAppRequestRunner.doRequest(WebAppRequestRunner.java:364)
at com.bowstreet.webapp.engine.WebAppRunner.doActualRequest(WebAppRunner.java:923)
at com.bowstreet.webapp.engine.WebAppRunner.doRequest(WebAppRunner.java:535)
at com.bowstreet.portlet.adapter.WebAppRunnerPortlet.runModel(WebAppRunnerPortlet.java:1386)
at com.bowstreet.portlet.adapter.WebAppRunnerPortlet.runModel(WebAppRunnerPortlet.java:1341)
at com.bowstreet.portlet.adapter.WebAppRunnerPortlet.runModel(WebAppRunnerPortlet.java:1313)
at com.bowstreet.portlet.adapter.WebAppRunnerPortlet.processAction(WebAppRunnerPortlet.java:341)
at com.ibm.ws.portletcontainer.invoker.impl.PortletFilterChainImpl.doFilter(PortletFilterChainImpl.java:77)
at com.ibm.wps.propertybroker.standard.filter.PropertyBrokerActionFilter.doFilter(PropertyBrokerActionFilter.java:731)
at com.ibm.ws.portletcontainer.invoker.impl.PortletFilterChainImpl.doFilter(PortletFilterChainImpl.java:69)
at com.ibm.wps.propertybroker.standard.filter.C2APortletFilter.doFilter(C2APortletFilter.java:168)
at com.ibm.ws.portletcontainer.invoker.impl.PortletFilterChainImpl.doFilter(PortletFilterChainImpl.java:69)
at com.ibm.wps.engine.dpr.portlet.impl.ProcessActionMemoFilter.doFilter(ProcessActionMemoFilter.java:88)
at com.ibm.ws.portletcontainer.invoker.impl.PortletFilterChainImpl.doFilter(PortletFilterChainImpl.java:69)
at com.ibm.ws.portletcontainer.invoker.impl.PortletServlet.doDispatch(PortletServlet.java:527)
at com.ibm.ws.portletcontainer.invoker.impl.PortletServletCollaboratorChainImpl.doCollaborator(PortletServletCollaboratorChainImpl.java:114)
at com.ibm.isclite.container.collaborator.PortletServletCollaborator.doAction(PortletServletCollaborator.java:56)
at com.ibm.ws.portletcontainer.invoker.impl.PortletServletCollaboratorChainImpl.doCollaborator(PortletServletCollaboratorChainImpl.java:101)
at com.ibm.ws.portletcontainer.rrd.RRDServerPortletServletCollaborator.doAction(RRDServerPortletServletCollaborator.java:117)
at com.ibm.ws.portletcontainer.invoker.impl.PortletServletCollaboratorChainImpl.doCollaborator(PortletServletCollaboratorChainImpl.java:101)
at com.ibm.ws.portletcontainer.cache.CacheCollaborator.doAction(CacheCollaborator.java:84)
at com.ibm.ws.portletcontainer.invoker.impl.PortletServletCollaboratorChainImpl.doCollaborator(PortletServletCollaboratorChainImpl.java:101)
at com.ibm.wps.pe.pc.waspc.core.impl.PortletServletCollaboratorImpl.doAction(PortletServletCollaboratorImpl.java:146)
at com.ibm.ws.portletcontainer.invoker.impl.PortletServletCollaboratorChainImpl.doCollaborator(PortletServletCollaboratorChainImpl.java:101)
at com.ibm.ws.portletcontainer.invoker.impl.PortletServlet.doDispatch(PortletServlet.java:301)
at com.ibm.ws.portletcontainer.invoker.impl.PortletServletCollaboratorChainImpl.doCollaborator(PortletServletCollaboratorChainImpl.java:82)
at com.ibm.isclite.container.collaborator.PortletServletCollaborator.doDispatch(PortletServletCollaborator.java:124)
at com.ibm.ws.portletcontainer.invoker.impl.PortletServletCollaboratorChainImpl.doCollaborator(PortletServletCollaboratorChainImpl.java:74)
at com.ibm.ws.portletcontainer.rrd.RRDServerPortletServletCollaborator.doDispatch(RRDServerPortletServletCollaborator.java:60)
at com.ibm.ws.portletcontainer.invoker.impl.PortletServletCollaboratorChainImpl.doCollaborator(PortletServletCollaboratorChainImpl.java:74)
at com.ibm.ws.portletcontainer.cache.CacheCollaborator.doDispatch(CacheCollaborator.java:74)
at com.ibm.ws.portletcontainer.invoker.impl.PortletServletCollaboratorChainImpl.doCollaborator(PortletServletCollaboratorChainImpl.java:74)
at com.ibm.wps.pe.pc.waspc.core.impl.PortletServletCollaboratorImpl.doDispatch(PortletServletCollaboratorImpl.java:121)
at com.ibm.ws.portletcontainer.invoker.impl.PortletServletCollaboratorChainImpl.doCollaborator(PortletServletCollaboratorChainImpl.java:74)
at com.ibm.ws.portletcontainer.invoker.impl.PortletServlet.dispatch(PortletServlet.java:208)
at com.ibm.ws.portletcontainer.invoker.impl.PortletServlet.service(PortletServlet.java:165)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1068)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1009)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:118)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:771)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:679)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:539)
at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)
at com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(GenericServletWrapper.java:122)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.include(WebAppRequestDispatcher.java:639)
at com.ibm.ws.portletcontainer.invoker.impl.PortletInvokerImpl.invoke(PortletInvokerImpl.java:235)
at com.ibm.ws.portletcontainer.invoker.impl.PortletInvokerCollaboratorChainImpl.doCollaborator(PortletInvokerCollaboratorChainImpl.java:76)
at com.ibm.ws.portletcontainer.cache.PortletInvokerCacheCollaborator.doAction(PortletInvokerCacheCollaborator.java:50)
at com.ibm.ws.portletcontainer.invoker.impl.PortletInvokerCollaboratorChainImpl.doCollaborator(PortletInvokerCollaboratorChainImpl.java:65)
at com.ibm.ws.portletcontainer.ext.PortletInvokerPerformanceCollaborator.invoke(PortletInvokerPerformanceCollaborator.java:313)
at com.ibm.ws.portletcontainer.ext.PortletInvokerPerformanceCollaborator.doInvoke(PortletInvokerPerformanceCollaborator.java:101)
at com.ibm.ws.portletcontainer.ext.PortletInvokerPerformanceCollaborator.invokePMI(PortletInvokerPerformanceCollaborator.java:163)
at com.ibm.ws.portletcontainer.ext.PortletInvokerPerformanceCollaborator.doInvoke(PortletInvokerPerformanceCollaborator.java:91)
at com.ibm.ws.portletcontainer.ext.PortletInvokerPerformanceCollaborator.doAction(PortletInvokerPerformanceCollaborator.java:62)
at com.ibm.ws.portletcontainer.invoker.impl.PortletInvokerCollaboratorChainImpl.doCollaborator(PortletInvokerCollaboratorChainImpl.java:65)
at com.ibm.ws.portletcontainer.invoker.impl.PortletInvokerImpl.action(PortletInvokerImpl.java:77)
at com.ibm.ws.portletcontainer.PortletContainerImpl.doAction(PortletContainerImpl.java:186)
at com.ibm.ws.portletcontainer.PortletContainerInvokerCollaboratorChainImpl.doCollaborator(PortletContainerInvokerCollaboratorChainImpl.java:78)
at com.ibm.ws.portletcontainer.ext.ExtCollaborator.doAction(ExtCollaborator.java:54)
at com.ibm.ws.portletcontainer.PortletContainerInvokerCollaboratorChainImpl.doCollaborator(PortletContainerInvokerCollaboratorChainImpl.java:65)
at com.ibm.ws.portletcontainer.cache.CacheInvokerCollaborator.doAction(CacheInvokerCollaborator.java:76)
at com.ibm.ws.portletcontainer.PortletContainerInvokerCollaboratorChainImpl.doCollaborator(PortletContainerInvokerCollaboratorChainImpl.java:65)
at com.ibm.ws.portletcontainer.PortletContainerImpl.processPortletAction(PortletContainerImpl.java:152)
at com.ibm.ws.portletcontainer.pcinvoker.PortletInvokerImpl$1.run(PortletInvokerImpl.java:59)
at java.security.AccessController.doPrivileged(AccessController.java:246)
at com.ibm.ws.portletcontainer.pcinvoker.PortletInvokerImpl.invokeProcessAction(PortletInvokerImpl.java:55)
at com.ibm.wps.pe.pc.waspc.core.impl.PortletInvokerImpl$3.invoke(PortletInvokerImpl.java:116)
at com.ibm.wps.pe.pc.waspc.core.impl.PortletInvokerImpl.invoke(PortletInvokerImpl.java:176)
at com.ibm.wps.pe.pc.waspc.core.impl.PortletInvokerImpl.invokeProcessAction(PortletInvokerImpl.java:114)
at com.ibm.wps.pe.pc.waspc.event.ActionEvent.execute(ActionEvent.java:78)
at com.ibm.wps.pe.pc.waspc.event.EventQueueManager.processEventLoop(EventQueueManager.java:112)
at com.ibm.wps.pe.pc.waspc.PortletContainerImpl.performEvents(PortletContainerImpl.java:206)
at com.ibm.wps.pe.pc.PortletContainerImpl.performEvents(PortletContainerImpl.java:298)
at com.ibm.wps.engine.phases.WPActionPhase.processPortlets(WPActionPhase.java:2461)
at com.ibm.wps.engine.phases.WPActionPhase.execute(WPActionPhase.java:678)
at com.ibm.wps.state.phases.AbstractActionPhase.next(AbstractActionPhase.java:130)
at com.ibm.wps.engine.Servlet.callPortal(Servlet.java:800)
at com.ibm.wps.engine.Servlet.doGet(Servlet.java:607)
at com.ibm.wps.engine.Servlet.doPost(Servlet.java:833)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
at com.ibm.wps.engine.Servlet.doFilter(Servlet.java:1184)
at com.ibm.wps.resolver.servlet.ContentHandlerCleanup.doFilter(ContentHandlerCleanup.java:648)
at com.ibm.wps.resolver.servlet.AbstractFilter.doFilter(AbstractFilter.java:82)
at com.ibm.wps.engine.Servlet.service(Servlet.java:1175)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1068)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1009)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:145)
at com.ibm.wps.engine.ExtendedLocaleFilter.doFilter(ExtendedLocaleFilter.java:93)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
at com.ibm.wps.state.filter.StateCleanup.doFilter(StateCleanup.java:89)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
at com.ibm.wps.resolver.friendly.servlet.FriendlySelectionFilter.doFilter(FriendlySelectionFilter.java:189)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
at com.ibm.wps.engine.VirtualPortalFilter.doFilter(VirtualPortalFilter.java:88)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
at com.ibm.wps.mappingurl.impl.URLAnalyzer.doFilter(URLAnalyzer.java:282)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:771)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:679)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:539)
at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3365)
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:267)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:814)
at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1455)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:115)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:454)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:383)
at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:195)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:743)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:873)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1473)
========================

The incompatibility I guess is class issue with in Portlet factory. Anyone able to advise me on what to do? I'm pulling my hair out and have a customer demo next week.

I've tried generating portlet as a JSR168 and JSR286 with no luck.

Thanks and kind regards

Carl
Updated on 2011-12-22T13:30:29Z at 2011-12-22T13:30:29Z by defiant42
  • mburati
    mburati
    352 Posts

    Re: getActionURL() fails on Portal server but not in local WASCE test env

    ‏2009-08-26T22:34:10Z  
    Unfortunately, that's a limitation of the jsr portlet specs.

    From the jsr168 portlet spec:

    A portlet creates PortletURL objects invoking the createActionURL and the createRenderURL methods of the RenderResponse interface

    Note, it says it does this via the RenderResponse interface. You only get that during a portlet "render" (it assumes you would only need to generate URLs when you're rendering a page to put the URLs on), not during an action. It appears that you are trying to create the URL during an action. If you do it during a render (eg, via method call from a Link builder) you'll probably have better luck.

    ..mb1
  • sp33dy
    sp33dy
    3 Posts

    Re: getActionURL() fails on Portal server but not in local WASCE test env

    ‏2009-08-26T22:42:01Z  
    • mburati
    • ‏2009-08-26T22:34:10Z
    Unfortunately, that's a limitation of the jsr portlet specs.

    From the jsr168 portlet spec:

    A portlet creates PortletURL objects invoking the createActionURL and the createRenderURL methods of the RenderResponse interface

    Note, it says it does this via the RenderResponse interface. You only get that during a portlet "render" (it assumes you would only need to generate URLs when you're rendering a page to put the URLs on), not during an action. It appears that you are trying to create the URL during an action. If you do it during a render (eg, via method call from a Link builder) you'll probably have better luck.

    ..mb1
    mburati,

    Ah ok. Not totally familar what can and can't be done in the Portlet spec. Yes, I'm calling out to the helper java class to generate the html and sticking it in a var for an html builder to pick up. I can move it to a link builder instead as you mention. Thanks for the heads up!!! I'll post back when (ok if) I get it working.

    Thanks for your time, I've been panic'ing.

    Regards

    Carl
  • defiant42
    defiant42
    1 Post

    Re: getActionURL() fails on Portal server but not in local WASCE test env

    ‏2011-12-22T13:30:29Z  
    • sp33dy
    • ‏2009-08-26T22:42:01Z
    mburati,

    Ah ok. Not totally familar what can and can't be done in the Portlet spec. Yes, I'm calling out to the helper java class to generate the html and sticking it in a var for an html builder to pick up. I can move it to a link builder instead as you mention. Thanks for the heads up!!! I'll post back when (ok if) I get it working.

    Thanks for your time, I've been panic'ing.

    Regards

    Carl
    I got this error when had a copy of portlet-api-2.0.jar, and should have been using portlet.jar from WPF. Switching .jars fixed the problem.