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

portal:captcha intermittantly throws NullPointerException when changing captcha image

    Details

      Description

      Additional Information

      *Note:* the `NullPointerException` seems benign. It does not seem to have any adverse affects.

      I have only tested this on Liferay 6.2 + JSF 2.2, but it should be tested on Liferay 7 (and potentially JSF 2.1) before this bug is closed.

      Steps to Reproduce:

      1. Deploy the portal-showcase-portlet.
      2. Navigate to the `portal:captcha` General example.
      3. Click the green arrow buttons to change the captcha image (you may need to do this many times to reproduce the error).

      Expected Results

      The server log does not contain any error messages.

      Actual Results

      The server log contains the following stacktrace:

      java.lang.NullPointerException
              at com.jhlabs.image.ShadowFilter.imageComplete(ShadowFilter.java)
              at sun.awt.image.OffScreenImageSource.produce(OffScreenImageSource.java:189)
              at sun.awt.image.OffScreenImageSource.addConsumer(OffScreenImageSource.java:66)
              at sun.awt.image.OffScreenImageSource.startProduction(OffScreenImageSource.java:80)
              at java.awt.image.FilteredImageSource.startProduction(FilteredImageSource.java:183)
              at sun.awt.image.ImageRepresentation.startProduction(ImageRepresentation.java:732)
              at sun.awt.image.ImageRepresentation.drawToBufImage(ImageRepresentation.java:807)
              at sun.java2d.pipe.DrawImage.copyImage(DrawImage.java:1021)
              at sun.java2d.pipe.ValidatePipe.copyImage(ValidatePipe.java:186)
              at sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:3318)
              at nl.captcha.util.ImageUtil.applyFilter(Unknown Source)
              at nl.captcha.gimpy.DropShadowGimpyRenderer.gimp(Unknown Source)
              at nl.captcha.Captcha$Builder.gimp(Unknown Source)
              at com.liferay.portal.captcha.simplecaptcha.SimpleCaptchaImpl.getSimpleCaptcha(SimpleCaptchaImpl.java:245)
              at com.liferay.portal.captcha.simplecaptcha.SimpleCaptchaImpl.serveImage(SimpleCaptchaImpl.java:142)
              at com.liferay.portal.captcha.CaptchaImpl.serveImage(CaptchaImpl.java:90)
              at com.liferay.portal.kernel.captcha.CaptchaUtil.serveImage(CaptchaUtil.java:71)
              at com.liferay.faces.portal.resource.internal.CaptchaResource.getInputStream(CaptchaResource.java:75)
              at com.liferay.faces.bridge.application.internal.ResourceHandlerBridgeImpl.handleResource(ResourceHandlerBridgeImpl.java:208)
              at com.liferay.faces.bridge.application.internal.ResourceHandlerBridgeImpl.handleResourceRequest(ResourceHandlerBridgeImpl.java:141)
              at com.liferay.faces.bridge.application.internal.ResourceHandlerInnerImpl.handleResourceRequest(ResourceHandlerInnerImpl.java:108)
              at javax.faces.application.ResourceHandlerWrapper.handleResourceRequest(ResourceHandlerWrapper.java:153)
              at javax.faces.application.ResourceHandlerWrapper.handleResourceRequest(ResourceHandlerWrapper.java:153)
              at com.liferay.faces.bridge.internal.BridgePhaseCompat_2_0_Impl.handleJSF2ResourceRequest(BridgePhaseCompat_2_0_Impl.java:109)
              at com.liferay.faces.bridge.internal.BridgePhaseResourceImpl.execute(BridgePhaseResourceImpl.java:93)
              at com.liferay.faces.bridge.internal.BridgeImpl.doFacesRequest(BridgeImpl.java:158)
              at javax.portlet.faces.GenericFacesPortlet.serveResource(GenericFacesPortlet.java:546)
              at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:122)
              at com.liferay.portlet.ScriptDataPortletFilter.doFilter(ScriptDataPortletFilter.java:82)
              at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:116)
              at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.java:71)
              at com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:112)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
              at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:119)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
              at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:748)
              at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:486)
              at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:411)
              at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:338)
              at com.liferay.portlet.InvokerPortletImpl.invoke(InvokerPortletImpl.java:580)
              at com.liferay.portlet.InvokerPortletImpl.invokeResource(InvokerPortletImpl.java:675)
              at com.liferay.portlet.InvokerPortletImpl.serveResource(InvokerPortletImpl.java:441)
              at com.liferay.portlet.PortletContainerImpl._doServeResource(PortletContainerImpl.java:775)
              at com.liferay.portlet.PortletContainerImpl.serveResource(PortletContainerImpl.java:149)
              at com.liferay.portlet.SecurityPortletContainerWrapper.serveResource(SecurityPortletContainerWrapper.java:166)
              at com.liferay.portlet.RestrictPortletContainerWrapper.serveResource(RestrictPortletContainerWrapper.java:166)
              at com.liferay.portal.kernel.portlet.PortletContainerUtil.serveResource(PortletContainerUtil.java:164)
              at com.liferay.portal.action.LayoutAction.processLayout(LayoutAction.java:394)
              at com.liferay.portal.action.LayoutAction.doExecute(LayoutAction.java:200)
              at com.liferay.portal.action.LayoutAction.execute(LayoutAction.java:95)
              at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
              at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
              at com.liferay.portal.struts.PortalRequestProcessor.process(PortalRequestProcessor.java:168)
              at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
              at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:624)
              at com.liferay.portal.servlet.MainServlet.callParentService(MainServlet.java:557)
              at com.liferay.portal.servlet.MainServlet.service(MainServlet.java:534)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
              at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
              at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169)
              at com.liferay.portal.servlet.filters.uploadservletrequest.UploadServletRequestFilter.processFilter(UploadServletRequestFilter.java:93)
              at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
              at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169)
              at com.liferay.portal.servlet.filters.secure.SecureFilter.processFilter(SecureFilter.java:308)
              at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
              at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169)
              at com.liferay.portal.servlet.filters.jsoncontenttype.JSONContentTypeFilter.processFilter(JSONContentTypeFilter.java:42)
              at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:119)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
              at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:748)
              at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:486)
              at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:411)
              at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:338)
              at com.liferay.portal.servlet.FriendlyURLServlet.service(FriendlyURLServlet.java:161)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
              at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
              at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169)
              at com.liferay.portal.servlet.filters.uploadservletrequest.UploadServletRequestFilter.processFilter(UploadServletRequestFilter.java:93)
              at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
              at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169)
              at com.liferay.portal.servlet.filters.gzip.GZipFilter.processFilter(GZipFilter.java:123)
              at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
              at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169)
              at com.liferay.portal.servlet.filters.secure.SecureFilter.processFilter(SecureFilter.java:308)
              at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
              at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169)
              at com.liferay.portal.servlet.filters.i18n.I18nFilter.processFilter(I18nFilter.java:254)
              at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
              at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169)
              at com.liferay.portal.servlet.filters.etag.ETagFilter.processFilter(ETagFilter.java:86)
              at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
              at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169)
              at com.liferay.portal.servlet.filters.jsoncontenttype.JSONContentTypeFilter.processFilter(JSONContentTypeFilter.java:42)
              at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
              at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169)
              at com.liferay.portal.servlet.filters.autologin.AutoLoginFilter.processFilter(AutoLoginFilter.java:268)
              at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
              at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169)
              at com.liferay.portal.servlet.filters.sso.ntlm.NtlmPostFilter.processFilter(NtlmPostFilter.java:83)
              at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
              at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169)
              at com.liferay.portal.sharepoint.SharepointFilter.processFilter(SharepointFilter.java:88)
              at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
              at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169)
              at com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.processFilter(VirtualHostFilter.java:226)
              at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:185)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
              at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:738)
              at com.liferay.portal.servlet.filters.urlrewrite.UrlRewriteFilter.processFilter(UrlRewriteFilter.java:57)
              at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:165)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:165)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:185)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:119)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
              at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
              at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:957)
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423)
              at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079)
              at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:620)
              at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318)
              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

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Packages

                  Version Package
                  portal-2.0.1
                  portal-3.0.1