Uploaded image for project: 'PUBLIC - Liferay Faces'
  1. PUBLIC - Liferay Faces
  2. FACES-3168

NullPointerException thrown when null is passed to ExternalContext.getMimeType(String)

    Details

      Description

      Cross Reference

      See BootsFaces Issue#831.

      Steps to Reproduce

      1. Deploy the bootsfaces-applicant-portlet to Pluto 3.0 + Mojarra 2.3

      2. Visit the following URL:
      http://localhost:9080/pluto/portal/bootsfaces-applicant

      3. Enter any value in the "First Name" field and press the TAB key.

      Expected Results

      The portlet displays correctly.

      Actual Results

      The following stacktrace appears in the server log:

       
      31-Jul-2017 14:07:34.770 SEVERE [http-nio-8180-exec-6] com.sun.faces.context.AjaxExceptionHandlerImpl.handlePartialResponseError java.lang.NullPointerException 
          at com.liferay.faces.bridge.util.internal.FileNameUtil.getFileNameExtension(FileNameUtil.java:70) 
          at com.liferay.faces.bridge.util.internal.FileNameUtil.getFileNameMimeType(FileNameUtil.java:80) 
          at com.liferay.faces.bridge.context.internal.ExternalContextCompat_2_0_Impl.getMimeType(ExternalContextCompat_2_0_Impl.java:207)
          at com.sun.faces.application.resource.ResourceHandlerImpl.getContentType(ResourceHandlerImpl.java:549) 
          at com.sun.faces.application.resource.ResourceHandlerImpl.getRendererTypeForResourceName(ResourceHandlerImpl.java:260) 
          at javax.faces.application.ResourceHandlerWrapper.getRendererTypeForResourceName(ResourceHandlerWrapper.java:218) 
          at javax.faces.application.ResourceHandlerWrapper.getRendererTypeForResourceName(ResourceHandlerWrapper.java:218) 
          at com.sun.faces.context.PartialViewContextImpl.renderComponentResources(PartialViewContextImpl.java:505) 
          at com.sun.faces.context.PartialViewContextImpl.processPartial(PartialViewContextImpl.java:337) 
          at javax.faces.context.PartialViewContextWrapper.processPartial(PartialViewContextWrapper.java:252) 
          at javax.faces.component.UIViewRoot.encodeChildren(UIViewRoot.java:1124) 
          at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1905) 
          at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:465) 
          at javax.faces.view.ViewDeclarationLanguageWrapper.renderView(ViewDeclarationLanguageWrapper.java:126) 
          at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:194) 
          at com.liferay.faces.bridge.application.internal.ViewHandlerCompatImpl.renderView(ViewHandlerCompatImpl.java:95) 
          at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:151) 
          at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:126) 
          at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100) 
          at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:223) 
          at com.liferay.faces.bridge.internal.BridgePhaseResourceImpl.execute(BridgePhaseResourceImpl.java:266) 
          at com.liferay.faces.bridge.internal.BridgeImpl.doFacesRequest(BridgeImpl.java:179) 
          at javax.portlet.faces.GenericFacesPortlet.serveResource(GenericFacesPortlet.java:618) 
          at sun.reflect.GeneratedMethodAccessor1161.invoke(Unknown Source) 
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
          at java.lang.reflect.Method.invoke(Method.java:498) 
          at org.apache.pluto.container.bean.processor.AnnotatedMethod.invoke(AnnotatedMethod.java:187) 
          at org.apache.pluto.container.bean.processor.PortletInvoker.invokePortletMethod(PortletInvoker.java:137) 
          at org.apache.pluto.container.bean.processor.PortletInvoker.serveResource(PortletInvoker.java:285) 
          at org.apache.pluto.driver.services.container.FilterChainImpl.doFilter(FilterChainImpl.java:292) 
          at org.apache.pluto.driver.services.container.FilterChainImpl.processFilter(FilterChainImpl.java:145) 
          at org.apache.pluto.driver.services.container.FilterManagerImpl.processFilter(FilterManagerImpl.java:118) 
          at org.apache.pluto.container.driver.PortletServlet3.dispatch(PortletServlet3.java:510) 
          at org.apache.pluto.container.driver.PortletServlet3.doPost(PortletServlet3.java:338) 
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:648) 
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) 
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292) 
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) 
          at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) 
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) 
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) 
          at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:720) 
          at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:466) 
          at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:391) 
          at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:318) 
          at org.apache.pluto.driver.container.DefaultPortletInvokerService.invoke(DefaultPortletInvokerService.java:243) 
          at org.apache.pluto.driver.container.DefaultPortletInvokerService.serveResource(DefaultPortletInvokerService.java:162) 
          at org.apache.pluto.container.impl.PortletContainerImpl.doServeResource(PortletContainerImpl.java:275) 
          at org.apache.pluto.driver.PortalDriverServlet.doGet(PortalDriverServlet.java:182) 
          at org.apache.pluto.driver.PortalDriverServlet.doPost(PortalDriverServlet.java:254) 
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:648) 
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) 
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292) 
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) 
          at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) 
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) 
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) 
          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212) 
          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106) 
          at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:614) 
          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141) 
          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) 
          at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616) 
          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) 
          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:528) 
          at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1100) 
          at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:687) 
          at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1520) 
          at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1476) 
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 
          at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) 
          at java.lang.Thread.run(Thread.java:745) 
      

        Attachments

          Activity

            People

            Assignee:
            neil.griffin Neil Griffin
            Reporter:
            neil.griffin Neil Griffin
            Participants of an Issue:
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Packages

                Version Package
                bridge-impl-3.1.0
                bridge-impl-4.1.0