java.lang.NullPointerException

Sakai JIRA | Tien Luong | 7 years ago
  1. 0

    Steps to reproduce: 1) Login as admin 2) Click "Administration Workspace" tab 3) Click on "Users" link on left hand menu The following error appears in the log: [12/17/09 21:06:09:882 EST] 00000017 ErrorReporter W org.sakaiproject.portal.util.ErrorReporter logAndMail Bug Report bug-id: 4fc7606d-8810-4813-943a-4020d462b567 user: null usage-session: null time: Dec 17, 2009 21:05:59 user comment: null stack trace org.sakaiproject.portal.api.PortalHandlerException: java.lang.NullPointerException at org.sakaiproject.portal.charon.SkinnableCharonPortal.doGet(SkinnableCharonPortal.java:768) caused by: java.lang.NullPointerException at com.ibm.ws.webcontainer.srt.SRTServletResponse.setContentType(SRTServletResponse.java:1335) at javax.servlet.ServletResponseWrapper.setContentType(ServletResponseWrapper.java:140) at org.sakaiproject.portal.charon.handlers.StaticHandler.sendContent(StaticHandler.java:294) at org.sakaiproject.portal.charon.handlers.StaticHandler.doStatic(StaticHandler.java:145) at org.sakaiproject.portal.charon.handlers.StaticStylesHandler.doGet(StaticStylesHandler.java:55) at org.sakaiproject.portal.charon.SkinnableCharonPortal.doGet(SkinnableCharonPortal.java:768) at javax.servlet.http.HttpServlet.service(HttpServlet.java:718) at javax.servlet.http.HttpServlet.service(HttpServlet.java:831) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1583) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1523) at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:131) at org.sakaiproject.util.RequestFilter.doFilter(RequestFilter.java:616) 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:885) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:865) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:475) at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:175) at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3799) at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:276) at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:930) at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1583) at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:182) 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) Tool Placement: No Placement Request: : AuthType:null : CharEncoding:UTF-8 : ContentLength:-1 : ContentType:null : ContextPath:/portal : LocalAddress:10.10.2.105 : LocalName:10.10.2.105 : LocalPort:9080 : Method:GET : PathInfo:/styles/portalstyles.css : Protocol:HTTP/1.1 : QueryString:null : RemoteAddress:10.6.20.107 : RemoteHost:10.6.20.107 : RemotePort:3708 : Requested URL:http://10.10.2.105:9080/portal/styles/portalstyles.css : Scheme:http : ServerName:10.10.2.105 : Headers: : Header:Accept:*/* : Header:Referer:http://10.10.2.105:9080/portal : Header:Accept-Language:en-us : Header:UA-CPU:x86 : Header:Accept-Encoding:gzip, deflate : Header:User-Agent:Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729) : Header:Host:10.10.2.105:9080 : Header:Connection:Keep-Alive : Header:Cookie:sessionCode=0; JSESSIONID=2057a01a-9a8d-48a8-8879-9e6860795136.localhost : Parameters: : Attributes: : Attribute:sakai.filtered:sakai.filtered : Attribute:com.ibm.websphere.servlet.uri_non_decoded:/portal/styles/portalstyles.css : Attribute:sakai.session:org.sakaiproject.tool.impl.SessionComponent$MySession@b4acdaed : Attribute:sakai.character.encoding.done:sakai.character.encoding.done Session: : Created:1261101958728 : LastAccess:1261101969841 : MaxInactive:3600 : Attributes: : Attribute:portalskin:defaultskin [12/17/09 21:06:09:899 EST] 00000017 BasicEmailSer W org.sakaiproject.email.impl.BasicEmailService send send: javax.mail.internet.AddressException: Illegal address in string ``'' [12/17/09 21:06:15:317 EST] 00000016 ErrorReporter W org.sakaiproject.portal.util.ErrorReporter logAndMail Bug Report bug-id: bf1f9cf5-7387-4e5f-b6c8-b881d2702a03 user: null usage-session: null time: Dec 17, 2009 21:06:10 user comment: null stack trace org.sakaiproject.portal.api.PortalHandlerException: java.lang.NullPointerException at org.sakaiproject.portal.charon.SkinnableCharonPortal.doGet(SkinnableCharonPortal.java:768) caused by: java.lang.NullPointerException at com.ibm.ws.webcontainer.srt.SRTServletResponse.setContentType(SRTServletResponse.java:1335) at javax.servlet.ServletResponseWrapper.setContentType(ServletResponseWrapper.java:140) at org.sakaiproject.portal.charon.handlers.StaticHandler.sendContent(StaticHandler.java:294) at org.sakaiproject.portal.charon.handlers.StaticHandler.doStatic(StaticHandler.java:145) at org.sakaiproject.portal.charon.handlers.StaticScriptsHandler.doGet(StaticScriptsHandler.java:55) at org.sakaiproject.portal.charon.SkinnableCharonPortal.doGet(SkinnableCharonPortal.java:768) at javax.servlet.http.HttpServlet.service(HttpServlet.java:718) at javax.servlet.http.HttpServlet.service(HttpServlet.java:831) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1583) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1523) at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:131) at org.sakaiproject.util.RequestFilter.doFilter(RequestFilter.java:616) 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:885) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:865) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:475) at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:175) at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3799) at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:276) at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:930) at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1583) at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:182) 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) Tool Placement: No Placement Request: : AuthType:null : CharEncoding:UTF-8 : ContentLength:-1 : ContentType:null : ContextPath:/portal : LocalAddress:10.10.2.105 : LocalName:10.10.2.105 : LocalPort:9080 : Method:GET : PathInfo:/scripts/portalscripts.js : Protocol:HTTP/1.1 : QueryString:null : RemoteAddress:10.6.20.107 : RemoteHost:10.6.20.107 : RemotePort:3706 : Requested URL:http://10.10.2.105:9080/portal/scripts/portalscripts.js : Scheme:http : ServerName:10.10.2.105 : Headers: : Header:Accept:*/* : Header:Referer:http://10.10.2.105:9080/portal : Header:Accept-Language:en-us : Header:UA-CPU:x86 : Header:Accept-Encoding:gzip, deflate : Header:User-Agent:Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729) : Header:Host:10.10.2.105:9080 : Header:Connection:Keep-Alive : Header:Cookie:sessionCode=0; JSESSIONID=2057a01a-9a8d-48a8-8879-9e6860795136.localhost : Parameters: : Attributes: : Attribute:sakai.filtered:sakai.filtered : Attribute:com.ibm.websphere.servlet.uri_non_decoded:/portal/scripts/portalscripts.js : Attribute:sakai.session:org.sakaiproject.tool.impl.SessionComponent$MySession@b4acdaed : Attribute:sakai.character.encoding.done:sakai.character.encoding.done Session: : Created:1261101958728 : LastAccess:1261101975302 : MaxInactive:3600 : Attributes: : Attribute:portalskin:defaultskin

    Sakai JIRA | 7 years ago | Tien Luong
    java.lang.NullPointerException
  2. Speed up your debug routine!

    Automated exception search integrated into your IDE

  3. 0

    This happens when serving web resources in Atlassian Gadgets (which, notably, do not always specify a content-type param for every resource). The problem seems to be that it's passing {{null}} to {{HttpServletResponse.setContentType}}: {noformat} [11/18/09 20:43:45:251 CST] 000001bc WebApp E [Servlet Error]-[noop]: java.lang.NullPointerException at com.ibm.ws.webcontainer.srt.SRTServletResponse.setContentType(SRTServletResponse.java:1050) at javax.servlet.ServletResponseWrapper.setContentType(ServletResponseWrapper.java:175) at com.atlassian.plugin.servlet.PluginResourceDownload.serveFile(PluginResourceDownload.java:69) at com.atlassian.plugin.servlet.AbstractFileServerServlet.doGet(AbstractFileServerServlet.java:32) at javax.servlet.http.HttpServlet.service(HttpServlet.java:743) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:989) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:930) 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:761) at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:673) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:498) at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:464) at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:308) at org.tuckey.web.filters.urlrewrite.RewrittenUrl.doRewrite(RewrittenUrl.java:176) at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:728) at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190) at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:46) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:55) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:41) at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190) at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130) at com.atlassian.plugin.refimpl.webresource.RequestCacheCleaner.doFilter(RequestCacheCleaner.java:28) 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:761) at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:673) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:498) at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:464) at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3168) at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:254) at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:811) at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1433) at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:96) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:465) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:394) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:274) 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:152) at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:213) at com.ibm.io.async.AbstractAsyncFuture.fireCompletionActions(AbstractAsyncFuture.java:195) at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136) at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:194) at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:741) at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:863) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1469) {noformat} I think there are two bugs here: # {{PluginResourceDownload}} should not call {{setContentType}} if it gets {{null}} as the content type for the resource it's serving # {{ContainerManager.SimpleContentTypeResolver}} should not be returning {{null}} for the resources in question

    Ecosystem JIRA | 7 years ago | Tim Moore
    java.lang.NullPointerException

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at com.ibm.ws.webcontainer.srt.SRTServletResponse.setContentType()
    2. com.ibm.ws
      SRTServletResponse.setContentType
      1. com.ibm.ws.webcontainer.srt.SRTServletResponse.setContentType(SRTServletResponse.java:1335)
      1 frame
    3. JavaServlet
      ServletResponseWrapper.setContentType
      1. javax.servlet.ServletResponseWrapper.setContentType(ServletResponseWrapper.java:140)
      1 frame
    4. sakai-portal-impl
      SkinnableCharonPortal.doGet
      1. org.sakaiproject.portal.charon.handlers.StaticHandler.sendContent(StaticHandler.java:294)
      2. org.sakaiproject.portal.charon.handlers.StaticHandler.doStatic(StaticHandler.java:145)
      3. org.sakaiproject.portal.charon.handlers.StaticScriptsHandler.doGet(StaticScriptsHandler.java:55)
      4. org.sakaiproject.portal.charon.SkinnableCharonPortal.doGet(SkinnableCharonPortal.java:768)
      4 frames
    5. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:718)
      2. javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
      2 frames
    6. WebSphere
      WebAppFilterChain.doFilter
      1. com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1583)
      2. com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1523)
      3. com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:131)
      3 frames
    7. Sakai Component Manager
      RequestFilter.doFilter
      1. org.sakaiproject.util.RequestFilter.doFilter(RequestFilter.java:616)
      1 frame
    8. WebSphere
      WSWebContainer.handleRequest
      1. com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
      2. com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
      3. com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:77)
      4. com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:885)
      5. com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:865)
      6. com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:475)
      7. com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:175)
      8. com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3799)
      9. com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:276)
      10. com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:930)
      11. com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1583)
      11 frames
    9. com.ibm.ws
      WCChannelLink.ready
      1. com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:182)
      1 frame
    10. WebSphere
      AioReadCompletionListener.futureCompleted
      1. com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:455)
      2. com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:384)
      3. com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:83)
      4. com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
      4 frames
    11. com.ibm.io
      ResultHandler$2.run
      1. com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
      2. com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
      3. com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
      4. com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
      5. com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
      6. com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
      6 frames
    12. com.ibm.ws
      ThreadPool$Worker.run
      1. com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1550)
      1 frame