Problem in logging site analysis event from serveResource method

The Logging custom business event using Site Analysis entry explains how you can use the com.ibm.portal.portlet.service.siteanalyzer.PortletSiteAnalyzerLoggingServiceHome for logging custom business event. As per WPS documentation we should be able to use this service from serveResource() method also but when i tried logging a sample event in the serverResource i get exception.

This is the code that i used

public void serveResource(ResourceRequest request, ResourceResponse response)
throws PortletException, IOException {
response.setContentType("text/html");
response.getWriter().println(
"Hello from SiteAnalyticsDebugPortlet.serveResource()");
PortletSiteAnalyzerLogger logger = portletSiteAnalyzerLoggingServiceHome
.getLogger(request, response);
if (logger.isLogging()) {
logger.log("Sample serveResource event");
}



This is the exception that i am getting. I might have to open a PMR with IBM for this

.9752766554500952709231.txt com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter 82
[9/9/10 7:01:19:036 PDT] 00000068 FfdcProvider W com.ibm.ws.ffdc.impl.FfdcProvider logIncident FFDC1003I: FFDC Incident emitted on /software/IBM/WebSphere/wp_profile/logs/ffdc/WebSphere_Portal_4ca34ca3_10.09.09_07.01.19.0214564302438912793218.txt com.ibm.ws.portletcontainer.invoker.impl.PortletInvokerImpl.invoke 117
[9/9/10 7:01:19:042 PDT] 00000068 FfdcProvider W com.ibm.ws.ffdc.impl.FfdcProvider logIncident FFDC1003I: FFDC Incident emitted on /software/IBM/WebSphere/wp_profile/logs/ffdc/WebSphere_Portal_4ca34ca3_10.09.09_07.01.19.0393828157149487255541.txt com.ibm.ws.portletcontainer.invoker.collaborator.impl.PortletInvokerPerformanceCollaborator.invokePMI 141
[9/9/10 7:01:19:051 PDT] 00000068 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 javax.servlet.http.HttpServlet.service(HttpServlet.java:718)
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.HttpInboundLink.ready(HttpInboundLink.java:272)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
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$1.run(AsyncChannelFuture.java:205)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1550)
Caused by: java.lang.NullPointerException
at com.ibm.wps.services.siteanalyzer.PortletSiteAnalyzerLoggerImpl.(PortletSiteAnalyzerLoggerImpl.java:239)
at com.ibm.wps.portlet.service.siteanalyzer.PortletSiteAnalyzerLoggingServiceHomeImpl.getLogger(PortletSiteAnalyzerLoggingServiceHomeImpl.java:138)
at com.webspherenotes.wps70.sa.SiteAnalyticsDebugPortlet.serveResource(SiteAnalyticsDebugPortlet.java:86)
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)

2 comments:

srjwebsolutions said...

We are leading responsive website designing and development company in Noida.
We are offering mobile friendly responsive website designing, website development, e-commerce website, seo service and sem services in Noida.

Responsive Website Designing Company in Noida
Website Designing Company in Noida
SEO Services in Noida
SMO Services in Noida

EG MEDI said...

Egmedi.com is online medical store pharmacy in laxmi nagar Delhi. You can Order prescription/OTC medicines online.
Cash on Delivery available. Free Home Delivery


Online Pharmacy in Delhi
Buy Online medicine in Delhi
Online Pharmacy in laxmi nagar
Buy Online medicine in laxmi nagar
Onine Medical Store in Delhi
Online Medical store in laxmi nagar
Online medicine store in delhi
online medicine store in laxmi nagar
Purchase Medicine Online
Online Pharmacy India
Online Medical Store