Topic
11 replies Latest Post - ‏2012-12-06T07:08:56Z by anu$123
BARMan
BARMan
10 Posts
ACCEPTED ANSWER

Pinned topic jQuery-Ajax call to GenericPortlet.serveResource() in WebSphere Portal 6.1

‏2011-02-11T22:00:20Z |
I'm trying to call a portlet's serveResource() method using jQuery/ajax. I managed to get a simple JSR-286 portlet working in Pluto 2.0 that is able to read a JSON string from the request body, create a Java object from the JSON, and return that object's toString() to my calling JavaScript. However when I deploy the same portlet to my WebSphere environment (WAS7 running a WSRP Producer, consumed by WebSphere Portal 6.1) the request body is empty by the time it reaches serveResource().

I'm assuming I'm missing something basic/fundamental so any advice would be appreciated. I think I could get my sample working if I pushed the JSON string onto the URL parameters but would prefer to avoid that approach for now, unless I'm given a reason why my current approach is "bad".

Javascript Snippet:

function ajaxPost() {
var url = "<%= testServiceURL %>";
var current = $("input.current").val();
$.ajax(
{
url: url,
contentType: 'application/json; charset=utf-8',
dataType: 'html',
data: "{data: " + current + "}",
type: 'POST',
success: testSuccess,
error: testError
}
);
$("div.trace").append("ajax post fired
");
}

function testSuccess(data, textStatus, XMLHttpRequest)
{
$("div.trace").append("testSuccess(): " + data + "
");
}

Portlet Snippet:

public class TestPortlet extends GenericPortlet {
...
@Override
public void serveResource(ResourceRequest request, ResourceResponse response) throws PortletException, IOException {
String res = "Failed to read body";

boolean bodyRead = true;
StringBuffer sb = new StringBuffer();
String line = null;
try {
BufferedReader reader = request.getReader();
line = reader.readLine();
while (line != null) {
sb.append(line);
line = reader.readLine();
}
reader.close();
} catch (Exception e) {
bodyRead = false;
}

Foo f = null;
if (bodyRead) {
try {
Gson gson = new Gson();
f = gson.fromJson(sb.toString(), Foo.class);
res = "Received: " + f.toString();
} catch (Exception e) {
res = "Failed to convert body into Foo: '" + sb.toString() + "'";
}
}

response.setContentType("text/html");
response.getWriter().println(res);
}
}
Updated on 2012-12-06T07:08:56Z at 2012-12-06T07:08:56Z by anu$123
  • jwbarnes
    jwbarnes
    872 Posts
    ACCEPTED ANSWER

    Re: jQuery-Ajax call to GenericPortlet.serveResource() in WebSphere Portal 6.1

    ‏2011-02-14T17:36:50Z  in response to BARMan
    when it is rendering through the provided portal, is it pointing to the wsrp ajax proxy or back to your own portlet on the was 7 producer


    IBM Certified System Administrator -- WebSphere Portal V6.0, V5.1, V5.0
    IBM Certified Solution Developer -- WebSphere Portal V5.1, v6.0

    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM
  • BARMan
    BARMan
    10 Posts
    ACCEPTED ANSWER

    Re: jQuery-Ajax call to GenericPortlet.serveResource() in WebSphere Portal 6.1

    ‏2011-02-14T18:18:28Z  in response to BARMan
    I performed the following in my JSP to construct the URL...

    <%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet"%>
    <portlet:defineObjects/>
    <portlet:resourceURL id="testService" var="testServiceURL" escapeXml="false"/>

    Is this enough to answer your question?

    Comparatively I use...
    <%=renderResponse.encodeURL( renderRequest.getContextPath()) +"/www/js/jquery.js" %>
    to load the jQuery file which hits "wps/WsrpProxyPortlet/ResourceProxy/..." as opposed to "wps/myportal/..."
    • jwbarnes
      jwbarnes
      872 Posts
      ACCEPTED ANSWER

      Re: jQuery-Ajax call to GenericPortlet.serveResource() in WebSphere Portal 6.1

      ‏2011-02-14T18:26:43Z  in response to BARMan
      I was more asking what are you seeing happen in reality once it is rendered

      IBM Certified System Administrator -- WebSphere Portal V6.0, V5.1, V5.0
      IBM Certified Solution Developer -- WebSphere Portal V5.1, v6.0

      The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM
      • BARMan
        BARMan
        10 Posts
        ACCEPTED ANSWER

        Re: jQuery-Ajax call to GenericPortlet.serveResource() in WebSphere Portal 6.1

        ‏2011-02-14T18:44:11Z  in response to jwbarnes
        I have a feeling I'm not understanding your original question but here goes again...

        The result of my post "logs"/renders the following line to my trace
        ...
        setSuccess: Failed to convert body into Foo: ''
        • BARMan
          BARMan
          10 Posts
          ACCEPTED ANSWER

          Re: jQuery-Ajax call to GenericPortlet.serveResource() in WebSphere Portal 6.1

          ‏2011-02-14T18:46:10Z  in response to BARMan
          Sorry, that should be...
          testSuccess(): Failed to convert body into Foo: ''

          Failed to quickly find an edit button in this forum.
          • jwbarnes
            jwbarnes
            872 Posts
            ACCEPTED ANSWER

            Re: jQuery-Ajax call to GenericPortlet.serveResource() in WebSphere Portal 6.1

            ‏2011-02-14T18:49:22Z  in response to BARMan
            what I was asking is in the actual html once rendered in a browser, what the urls looked like, if they actually looked like they were pointing to a proxy or to your producer


            IBM Certified System Administrator -- WebSphere Portal V6.0, V5.1, V5.0
            IBM Certified Solution Developer -- WebSphere Portal V5.1, v6.0

            The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM
            • BARMan
              BARMan
              10 Posts
              ACCEPTED ANSWER

              Re: jQuery-Ajax call to GenericPortlet.serveResource() in WebSphere Portal 6.1

              ‏2011-02-14T19:03:09Z  in response to jwbarnes
              In my response showing how I constructed the URL I started to say how it looked in the browser...

              /wps/myportal/!ut/p/c5/encoded-gobbledegook

              And thanks for putting up with my confusion.
              • BARMan
                BARMan
                10 Posts
                ACCEPTED ANSWER

                Re: jQuery-Ajax call to GenericPortlet.serveResource() in WebSphere Portal 6.1

                ‏2011-02-15T21:21:05Z  in response to BARMan
                Finally got it working...sort of.

                By changing the contentType parameter in my ajax call to 'application/x-www-form-urlencoded' (and playing with different methods of representing my data) I now have my data available in the post body in my WebSphere environment, albeit in a URL parameter form as opposed to JSON.

                Unfortunately, performing this change has resulted in breaking the functionality in Pluto. The request body in that environment is now empty.

                Now to either change the code to retrieve the data from request.getParameter() (which I believe works in both environments with my change but requires further testing) or finding a contentType that will result in a populated request body in both environments.
  • chung220
    chung220
    1 Post
    ACCEPTED ANSWER

    Re: jQuery-Ajax call to GenericPortlet.serveResource() in WebSphere Portal 6.1

    ‏2011-08-12T18:32:09Z  in response to BARMan
    Hi,

    I'm trying to do the same thing that you did. I want to create a JSP page which use AJAX/Jquery to call the the serveResource from a portlet to display some dynamic contents in WPS 6.1 environment. Since I'm a newbie to all of these I'd very much appreciate if you can allow me to look sample code that you wrote. That's would be a great help for me to understand how it works.

    Thanks & Regards.
    • Jasi
      Jasi
      67 Posts
      ACCEPTED ANSWER

      Re: jQuery-Ajax call to GenericPortlet.serveResource() in WebSphere Portal 6.1

      ‏2011-08-17T06:05:38Z  in response to chung220
      Check this out ... im attaching the portlet jsp.
      Here is how your portlet class serveResource method may look like ...

      public void serveResource(ResourceRequest resRequest, ResourceResponse resResp) throws PortletException, IOException {

      System.out.println(":: serveResource()");
      resResp.setContentType("text/html");
      PrintWriter writer = resResp.getWriter();
      System.out.println(":: serveResource()");
      writer.println("hello from serveResource");
      }
      Hope it helps.
      • anu$123
        anu$123
        4 Posts
        ACCEPTED ANSWER

        Re: jQuery-Ajax call to GenericPortlet.serveResource() in WebSphere Portal 6.1

        ‏2012-12-06T07:08:56Z  in response to Jasi
        Hi,

        I am using was7 as producer and wps7 as consumer. I am trying to make ajax calls using serveResource method.but i am getting the following exception stack trace. i am getting this exception at line response.getWriter().println("testing....");
        plz help me in resolving this
        12/4/12 11:12:18:251 IST 00000049 servlet E com.ibm.ws.webcontainer.servlet.ServletWrapper service SRVE0068E: Uncaught exception created in one of the service methods of the servlet WSRP proxy portlet in application PA_PortalWSRPProxy. Exception created : javax.servlet.ServletException: javax.portlet.PortletException: java.lang.NullPointerException
        at com.ibm.ws.portletcontainer.invoker.impl.PortletServlet.doDispatch(PortletServlet.java:369)
        at com.ibm.ws.portletcontainer.invoker.impl.PortletServletCollaboratorChainImpl.doCollaborator(PortletServletCollaboratorChainImpl.java:82)
        at com.ibm.isclite.container.collaborator.PortletServletCollaborator.doDispatch(PortletServletCollaborator.java:143)
        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:112)
        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:831)
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1655)
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1595)
        at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:104)
        at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:77)
        at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:908)
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:932)
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:500)
        at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
        at com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(GenericServletWrapper.java:121)
        at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:341)
        at com.ibm.ws.portletcontainer.invoker.impl.PortletInvokerImpl.invoke(PortletInvokerImpl.java:212)
        at com.ibm.ws.portletcontainer.invoker.impl.PortletInvokerCollaboratorChainImpl.doCollaboratorServeResource(PortletInvokerCollaboratorChainImpl.java:98)
        at com.ibm.ws.portletcontainer.invoker.impl.PortletInvokerCollaboratorChainImpl.doCollaborator(PortletInvokerCollaboratorChainImpl.java:54)
        at com.ibm.ws.portletcontainer.cache.PortletInvokerCacheCollaborator.doServeResource(PortletInvokerCacheCollaborator.java:75)
        at com.ibm.ws.portletcontainer.invoker.impl.PortletInvokerCollaboratorChainImpl.doCollaboratorServeResource(PortletInvokerCollaboratorChainImpl.java:92)
        at com.ibm.ws.portletcontainer.invoker.impl.PortletInvokerCollaboratorChainImpl.doCollaborator(PortletInvokerCollaboratorChainImpl.java:54)
        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.doServeResource(PortletInvokerPerformanceCollaborator.java:349)
        at com.ibm.ws.portletcontainer.invoker.impl.PortletInvokerCollaboratorChainImpl.doCollaboratorServeResource(PortletInvokerCollaboratorChainImpl.java:92)
        at com.ibm.ws.portletcontainer.invoker.impl.PortletInvokerCollaboratorChainImpl.doCollaborator(PortletInvokerCollaboratorChainImpl.java:54)
        at com.ibm.ws.portletcontainer.invoker.impl.PortletInvokerImpl.serveResource(PortletInvokerImpl.java:135)
        at com.ibm.ws.portletcontainer.PortletContainerImpl.doServeResource(PortletContainerImpl.java:415)
        at com.ibm.ws.portletcontainer.ResourcePortletContainerInvokerCollaboratorChainImpl.doCollaborator(ResourcePortletContainerInvokerCollaboratorChainImpl.java:62)
        at com.ibm.ws.portletcontainer.cache.CacheInvokerCollaborator.doServeResource(CacheInvokerCollaborator.java:101)
        at com.ibm.ws.portletcontainer.ResourcePortletContainerInvokerCollaboratorChainImpl.doCollaborator(ResourcePortletContainerInvokerCollaboratorChainImpl.java:53)
        at com.ibm.ws.portletcontainer.PortletContainerImpl.servePortletResource(PortletContainerImpl.java:386)
        at com.ibm.ws.portletcontainer.pcinvoker.PortletInvokerImpl$4.run(PortletInvokerImpl.java:185)
        at java.security.AccessController.doPrivileged(AccessController.java:251)
        at com.ibm.ws.portletcontainer.pcinvoker.PortletInvokerImpl.invokeServeResource(PortletInvokerImpl.java:181)
        at com.ibm.wps.pe.pc.waspc.core.impl.PortletInvokerImpl$2.invoke(PortletInvokerImpl.java:107)
        at com.ibm.wps.pe.pc.waspc.core.impl.PortletInvokerImpl.invoke(PortletInvokerImpl.java:182)
        at com.ibm.wps.pe.pc.waspc.core.impl.PortletInvokerImpl.invokeServeResource(PortletInvokerImpl.java:104)
        at com.ibm.wps.pe.pc.waspc.PortletContainerImpl.servePortletResource(PortletContainerImpl.java:174)
        at com.ibm.wps.pe.pc.PortletContainerImpl.servePortletResource(PortletContainerImpl.java:150)
        at com.ibm.wps.engine.extension.render.ResourceServingRenderer.render(ResourceServingRenderer.java:115)
        at com.ibm.wps.engine.extension.render.ResourceServingRenderer.render(ResourceServingRenderer.java:84)
        at com.ibm.wps.engine.phases.WPResourceRenderPhase.processRendering(WPResourceRenderPhase.java:139)
        at com.ibm.wps.engine.phases.WPResourceRenderPhase.processRendering(WPResourceRenderPhase.java:104)
        at com.ibm.wps.engine.phases.WPBaseRenderPhase.execute(WPBaseRenderPhase.java:230)
        at com.ibm.wps.state.phases.AbstractRenderPhase.next(AbstractRenderPhase.java:106)
        at com.ibm.wps.engine.phases.WPAbstractRenderPhase.next(WPAbstractRenderPhase.java:100)
        at com.ibm.wps.engine.phases.WPResourceRenderPhase.next(WPResourceRenderPhase.java:213)
        at com.ibm.wps.engine.Servlet.callPortal(Servlet.java:955)
        at com.ibm.wps.engine.Servlet.doGet(Servlet.java:677)
        at com.ibm.wps.engine.Servlet.doPost(Servlet.java:984)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:738)
        at com.ibm.wps.engine.Servlet.doFilter(Servlet.java:1429)
        at com.ibm.wps.resolver.servlet.ContentHandlerCleanup.doFilter(ContentHandlerCleanup.java:672)
        at com.ibm.wps.resolver.servlet.AbstractFilter.doFilter(AbstractFilter.java:93)
        at com.ibm.wps.engine.Servlet.service(Servlet.java:1417)
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1655)
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1595)
        at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:131)
        at com.ibm.wps.engine.ExtensionFilter$ExtendedFilterChain.doFilter(ExtensionFilter.java:91)
        at com.ibm.wps.engine.ExtensionFilter.doFilter(ExtensionFilter.java:178)
        at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
        at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
        at com.ibm.wps.engine.ExtendedLocaleFilter.doFilter(ExtendedLocaleFilter.java:113)
        at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
        at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
        at com.ibm.wps.resolver.friendly.servlet.FriendlySelectionFilter.doFilter(FriendlySelectionFilter.java:191)
        at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
        at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
        at com.ibm.wps.mappingurl.impl.URLAnalyzer.doFilter(URLAnalyzer.java:412)
        at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
        at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
        at com.ibm.wps.engine.VirtualPortalFilter.doFilter(VirtualPortalFilter.java:88)
        at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
        at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
        at com.ibm.wps.state.filter.StateCleanup.doFilter(StateCleanup.java:94)
        at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
        at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
        at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:77)
        at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:908)
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:932)
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:500)
        at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
        at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3826)
        at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:276)
        at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:931)
        at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1583)
        at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:186)
        at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:455)
        at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:384)
        at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:83)
        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:138)
        at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
        at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
        at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
        at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1550)
        Caused by: javax.portlet.PortletException: java.lang.NullPointerException
        ... 109 more
        Caused by: java.lang.NullPointerException
        at com.ibm.wps.wsrp.consumer.std.impl.ProxyPortlet.rewriteMarkup(ProxyPortlet.java:1594)
        at com.ibm.wps.wsrp.consumer.std.impl.ProxyPortlet.serveResource(ProxyPortlet.java:1318)
        at com.ibm.ws.portletcontainer.invoker.impl.PortletFilterChainImpl.doFilter(PortletFilterChainImpl.java:153)
        at com.ibm.wps.engine.el.init.AttributeCopyFilter.doFilter(AttributeCopyFilter.java:146)
        at com.ibm.ws.portletcontainer.invoker.impl.PortletFilterChainImpl.doFilter(PortletFilterChainImpl.java:146)
        at com.ibm.wps.resolver.iwidget.filter.IWidgetPortletFilter.doFilter(IWidgetPortletFilter.java:81)
        at com.ibm.ws.portletcontainer.invoker.impl.PortletFilterChainImpl.doFilter(PortletFilterChainImpl.java:146)
        at com.ibm.wps.pe.pc.waspc.plm.GlobalPortletLoadMonitoringFilter.doFilter(GlobalPortletLoadMonitoringFilter.java:173)
        at com.ibm.ws.portletcontainer.invoker.impl.PortletFilterChainImpl.doFilter(PortletFilterChainImpl.java:146)
        at com.ibm.ws.portletcontainer.invoker.impl.PortletServlet.doDispatch(PortletServlet.java:545)
        at com.ibm.ws.portletcontainer.invoker.impl.PortletServlet.doDispatch(PortletServlet.java:332)
        ... 108 more

        12/4/12 11:12:18:750 IST 00000049 FfdcProvider W com.ibm.ws.ffdc.impl.FfdcProvider logIncident FFDC1003I: FFDC Incident emitted on C:\IBM\WebSphere\wp_profile\logs\ffdc\WebSphere_Portal_14571457_12.12.04_11.12.18.5635691180741231435020.txt com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter 82
        12/4/12 11:12:19:249 IST 00000049 FfdcProvider W com.ibm.ws.ffdc.impl.FfdcProvider logIncident FFDC1003I: FFDC Incident emitted on C:\IBM\WebSphere\wp_profile\logs\ffdc\WebSphere_Portal_14571457_12.12.04_11.12.19.2335919570921970362107.txt com.ibm.ws.portletcontainer.invoker.impl.PortletInvokerImpl.invoke 117
        12/4/12 11:12:20:216 IST 00000049 FfdcProvider W com.ibm.ws.ffdc.impl.FfdcProvider logIncident FFDC1003I: FFDC Incident emitted on C:\IBM\WebSphere\wp_profile\logs\ffdc\WebSphere_Portal_14571457_12.12.04_11.12.20.2161566022252878865817.txt com.ibm.ws.portletcontainer.invoker.collaborator.impl.PortletInvokerPerformanceCollaborator.invokePMI 141
        12/4/12 11:12:20:450 IST 00000049 ResourceServi W com.ibm.wps.engine.extension.render.ResourceServingRenderer render EJPEJ0004E: An unexpected exception occurred.
        javax.portlet.PortletException: java.lang.NullPointerException
        at com.ibm.ws.portletcontainer.invoker.impl.PortletServlet.doDispatch(PortletServlet.java:369)
        at com.ibm.ws.portletcontainer.invoker.impl.PortletServletCollaboratorChainImpl.doCollaborator(PortletServletCollaboratorChainImpl.java:82)
        at com.ibm.isclite.container.collaborator.PortletServletCollaborator.doDispatch(PortletServletCollaborator.java:143)
        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:112)
        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:831)
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1655)
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1595)
        at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:104)
        at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:77)
        at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:908)
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:932)
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:500)
        at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
        at com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(GenericServletWrapper.java:121)
        at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:341)
        at com.ibm.ws.portletcontainer.invoker.impl.PortletInvokerImpl.invoke(PortletInvokerImpl.java:212)
        at com.ibm.ws.portletcontainer.invoker.impl.PortletInvokerCollaboratorChainImpl.doCollaboratorServeResource(PortletInvokerCollaboratorChainImpl.java:98)
        at com.ibm.ws.portletcontainer.invoker.impl.PortletInvokerCollaboratorChainImpl.doCollaborator(PortletInvokerCollaboratorChainImpl.java:54)
        at com.ibm.ws.portletcontainer.cache.PortletInvokerCacheCollaborator.doServeResource(PortletInvokerCacheCollaborator.java:75)
        at com.ibm.ws.portletcontainer.invoker.impl.PortletInvokerCollaboratorChainImpl.doCollaboratorServeResource(PortletInvokerCollaboratorChainImpl.java:92)
        at com.ibm.ws.portletcontainer.invoker.impl.PortletInvokerCollaboratorChainImpl.doCollaborator(PortletInvokerCollaboratorChainImpl.java:54)
        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.doServeResource(PortletInvokerPerformanceCollaborator.java:349)
        at com.ibm.ws.portletcontainer.invoker.impl.PortletInvokerCollaboratorChainImpl.doCollaboratorServeResource(PortletInvokerCollaboratorChainImpl.java:92)
        at com.ibm.ws.portletcontainer.invoker.impl.PortletInvokerCollaboratorChainImpl.doCollaborator(PortletInvokerCollaboratorChainImpl.java:54)
        at com.ibm.ws.portletcontainer.invoker.impl.PortletInvokerImpl.serveResource(PortletInvokerImpl.java:135)
        at com.ibm.ws.portletcontainer.PortletContainerImpl.doServeResource(PortletContainerImpl.java:415)
        at com.ibm.ws.portletcontainer.ResourcePortletContainerInvokerCollaboratorChainImpl.doCollaborator(ResourcePortletContainerInvokerCollaboratorChainImpl.java:62)
        at com.ibm.ws.portletcontainer.cache.CacheInvokerCollaborator.doServeResource(CacheInvokerCollaborator.java:101)
        at com.ibm.ws.portletcontainer.ResourcePortletContainerInvokerCollaboratorChainImpl.doCollaborator(ResourcePortletContainerInvokerCollaboratorChainImpl.java:53)
        at com.ibm.ws.portletcontainer.PortletContainerImpl.servePortletResource(PortletContainerImpl.java:386)
        at com.ibm.ws.portletcontainer.pcinvoker.PortletInvokerImpl$4.run(PortletInvokerImpl.java:185)
        at java.security.AccessController.doPrivileged(AccessController.java:251)
        at com.ibm.ws.portletcontainer.pcinvoker.PortletInvokerImpl.invokeServeResource(PortletInvokerImpl.java:181)
        at com.ibm.wps.pe.pc.waspc.core.impl.PortletInvokerImpl$2.invoke(PortletInvokerImpl.java:107)
        at com.ibm.wps.pe.pc.waspc.core.impl.PortletInvokerImpl.invoke(PortletInvokerImpl.java:182)
        at com.ibm.wps.pe.pc.waspc.core.impl.PortletInvokerImpl.invokeServeResource(PortletInvokerImpl.java:104)
        at com.ibm.wps.pe.pc.waspc.PortletContainerImpl.servePortletResource(PortletContainerImpl.java:174)
        at com.ibm.wps.pe.pc.PortletContainerImpl.servePortletResource(PortletContainerImpl.java:150)
        at com.ibm.wps.engine.extension.render.ResourceServingRenderer.render(ResourceServingRenderer.java:115)
        at com.ibm.wps.engine.extension.render.ResourceServingRenderer.render(ResourceServingRenderer.java:84)
        at com.ibm.wps.engine.phases.WPResourceRenderPhase.processRendering(WPResourceRenderPhase.java:139)
        at com.ibm.wps.engine.phases.WPResourceRenderPhase.processRendering(WPResourceRenderPhase.java:104)
        at com.ibm.wps.engine.phases.WPBaseRenderPhase.execute(WPBaseRenderPhase.java:230)
        at com.ibm.wps.state.phases.AbstractRenderPhase.next(AbstractRenderPhase.java:106)
        at com.ibm.wps.engine.phases.WPAbstractRenderPhase.next(WPAbstractRenderPhase.java:100)
        at com.ibm.wps.engine.phases.WPResourceRenderPhase.next(WPResourceRenderPhase.java:213)
        at com.ibm.wps.engine.Servlet.callPortal(Servlet.java:955)
        at com.ibm.wps.engine.Servlet.doGet(Servlet.java:677)
        at com.ibm.wps.engine.Servlet.doPost(Servlet.java:984)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:738)
        at com.ibm.wps.engine.Servlet.doFilter(Servlet.java:1429)
        at com.ibm.wps.resolver.servlet.ContentHandlerCleanup.doFilter(ContentHandlerCleanup.java:672)
        at com.ibm.wps.resolver.servlet.AbstractFilter.doFilter(AbstractFilter.java:93)
        at com.ibm.wps.engine.Servlet.service(Servlet.java:1417)
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1655)
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1595)
        at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:131)
        at com.ibm.wps.engine.ExtensionFilter$ExtendedFilterChain.doFilter(ExtensionFilter.java:91)
        at com.ibm.wps.engine.ExtensionFilter.doFilter(ExtensionFilter.java:178)
        at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
        at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
        at com.ibm.wps.engine.ExtendedLocaleFilter.doFilter(ExtendedLocaleFilter.java:113)
        at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
        at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
        at com.ibm.wps.resolver.friendly.servlet.FriendlySelectionFilter.doFilter(FriendlySelectionFilter.java:191)
        at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
        at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
        at com.ibm.wps.mappingurl.impl.URLAnalyzer.doFilter(URLAnalyzer.java:412)
        at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
        at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
        at com.ibm.wps.engine.VirtualPortalFilter.doFilter(VirtualPortalFilter.java:88)
        at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
        at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
        at com.ibm.wps.state.filter.StateCleanup.doFilter(StateCleanup.java:94)
        at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
        at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
        at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:77)
        at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:908)
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:932)
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:500)
        at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
        at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3826)
        at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:276)
        at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:931)
        at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1583)
        at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:186)
        at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:455)
        at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:384)
        at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:83)
        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:138)
        at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
        at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
        at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
        at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1550)
        Caused by: java.lang.NullPointerException
        at com.ibm.wps.wsrp.consumer.std.impl.ProxyPortlet.rewriteMarkup(ProxyPortlet.java:1594)
        at com.ibm.wps.wsrp.consumer.std.impl.ProxyPortlet.serveResource(ProxyPortlet.java:1318)
        at com.ibm.ws.portletcontainer.invoker.impl.PortletFilterChainImpl.doFilter(PortletFilterChainImpl.java:153)
        at com.ibm.wps.engine.el.init.AttributeCopyFilter.doFilter(AttributeCopyFilter.java:146)
        at com.ibm.ws.portletcontainer.invoker.impl.PortletFilterChainImpl.doFilter(PortletFilterChainImpl.java:146)
        at com.ibm.wps.resolver.iwidget.filter.IWidgetPortletFilter.doFilter(IWidgetPortletFilter.java:81)
        at com.ibm.ws.portletcontainer.invoker.impl.PortletFilterChainImpl.doFilter(PortletFilterChainImpl.java:146)
        at com.ibm.wps.pe.pc.waspc.plm.GlobalPortletLoadMonitoringFilter.doFilter(GlobalPortletLoadMonitoringFilter.java:173)
        at com.ibm.ws.portletcontainer.invoker.impl.PortletFilterChainImpl.doFilter(PortletFilterChainImpl.java:146)
        at com.ibm.ws.portletcontainer.invoker.impl.PortletServlet.doDispatch(PortletServlet.java:545)
        at com.ibm.ws.portletcontainer.invoker.impl.PortletServlet.doDispatch(PortletServlet.java:332)
        ... 108 more

        12/4/12 11:12:21:137 IST 00000049 webapp E com.ibm.ws.webcontainer.webapp.WebApp logServletError SRVE0293E: Servlet Error-portal: com.ibm.ws.webcontainer.webapp.WebAppErrorReport: SRVE0295E: Error reported: 500
        at com.ibm.ws.webcontainer.webapp.WebAppDispatcherContext.sendError(WebAppDispatcherContext.java:637)
        at com.ibm.ws.webcontainer.srt.SRTServletResponse.sendError(SRTServletResponse.java:1180)
        at com.ibm.ws.webcontainer.srt.SRTServletResponse.sendError(SRTServletResponse.java:1162)
        at javax.servlet.http.HttpServletResponseWrapper.sendError(HttpServletResponseWrapper.java:141)
        at com.ibm.wps.engine.extension.render.PortletFragmentRenderer.setError(PortletFragmentRenderer.java:121)
        at com.ibm.wps.engine.extension.render.ResourceServingRenderer.render(ResourceServingRenderer.java:87)
        at com.ibm.wps.engine.phases.WPResourceRenderPhase.processRendering(WPResourceRenderPhase.java:139)
        at com.ibm.wps.engine.phases.WPResourceRenderPhase.processRendering(WPResourceRenderPhase.java:104)
        at com.ibm.wps.engine.phases.WPBaseRenderPhase.execute(WPBaseRenderPhase.java:230)
        at com.ibm.wps.state.phases.AbstractRenderPhase.next(AbstractRenderPhase.java:106)
        at com.ibm.wps.engine.phases.WPAbstractRenderPhase.next(WPAbstractRenderPhase.java:100)
        at com.ibm.wps.engine.phases.WPResourceRenderPhase.next(WPResourceRenderPhase.java:213)
        at com.ibm.wps.engine.Servlet.callPortal(Servlet.java:955)
        at com.ibm.wps.engine.Servlet.doGet(Servlet.java:677)
        at com.ibm.wps.engine.Servlet.doPost(Servlet.java:984)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:738)
        at com.ibm.wps.engine.Servlet.doFilter(Servlet.java:1429)
        at com.ibm.wps.resolver.servlet.ContentHandlerCleanup.doFilter(ContentHandlerCleanup.java:672)
        at com.ibm.wps.resolver.servlet.AbstractFilter.doFilter(AbstractFilter.java:93)
        at com.ibm.wps.engine.Servlet.service(Servlet.java:1417)
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1655)
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1595)
        at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:131)
        at com.ibm.wps.engine.ExtensionFilter$ExtendedFilterChain.doFilter(ExtensionFilter.java:91)
        at com.ibm.wps.engine.ExtensionFilter.doFilter(ExtensionFilter.java:178)
        at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
        at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
        at com.ibm.wps.engine.ExtendedLocaleFilter.doFilter(ExtendedLocaleFilter.java:113)
        at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
        at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
        at com.ibm.wps.resolver.friendly.servlet.FriendlySelectionFilter.doFilter(FriendlySelectionFilter.java:191)
        at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
        at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
        at com.ibm.wps.mappingurl.impl.URLAnalyzer.doFilter(URLAnalyzer.java:412)
        at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
        at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
        at com.ibm.wps.engine.VirtualPortalFilter.doFilter(VirtualPortalFilter.java:88)
        at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
        at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
        at com.ibm.wps.state.filter.StateCleanup.doFilter(StateCleanup.java:94)
        at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
        at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
        at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:77)
        at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:908)
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:932)
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:500)
        at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
        at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3826)
        at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:276)
        at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:931)
        at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1583)
        at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:186)
        at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:455)
        at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:384)
        at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:83)
        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:138)
        at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
        at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
        at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
        at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1550)

        Thanks in advance!