Uploaded image for project: 'RichFaces'
  1. RichFaces
  2. RF-11103

org.richfaces.skin = plain causes java.lang.IllegalArgumentException: Width (2000) and height (0) cannot be <= 0

    Details

    • Sprint:
      5.0.0.Alpha2 - Sprint 1
    • Workaround:
      Workaround Exists
    • Workaround Description:
      Hide

      As pointed out in the thread by a user, you can avoid the exception with

      <context-param>
          <param-name>org.richfaces.enableControlSkinning</param-name>
          <param-value>false</param-value>
      </context-param>
      

      in WEB-INF.

      Maybe the code could be made more robust to avoid the exceptions when the user is unaware of the above context parameter.

      Show
      As pointed out in the thread by a user, you can avoid the exception with <context-param> <param-name>org.richfaces.enableControlSkinning</param-name> <param-value> false </param-value> </context-param> in WEB-INF. Maybe the code could be made more robust to avoid the exceptions when the user is unaware of the above context parameter.

      Description

      I tried

      <context-param>
              <param-name>org.richfaces.skin</param-name>
              <param-value>plain</param-value>
          </context-param>
      

      and the skinning seems to be disabled, but I get

      14:44:21,584 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/myapp].[Faces Servlet]] Servlet.service() para servlet Faces Servlet lanzó excepción: java.lang.IllegalArgumentException: Width (2000) and height (0) cannot be <= 0
          at java.awt.image.DirectColorModel.createCompatibleWritableRaster(DirectColorModel.java:999) [:1.6.0_24]
          at java.awt.image.BufferedImage.<init>(BufferedImage.java:321) [:1.6.0_24]
          at org.richfaces.resource.ImageType.createARGBImage(ImageType.java:103) [:4.0.0-SNAPSHOT]
          at org.richfaces.resource.ImageType.access$200(ImageType.java:34) [:4.0.0-SNAPSHOT]
          at org.richfaces.resource.ImageType$2.createImage(ImageType.java:44) [:4.0.0-SNAPSHOT]
          at org.richfaces.resource.ImageType.createImage(ImageType.java:118) [:4.0.0-SNAPSHOT]
          at org.richfaces.resource.Java2DUserResourceWrapperImpl.paintAndWrite(Java2DUserResourceWrapperImpl.java:155) [:4.0.0-SNAPSHOT]
          at org.richfaces.resource.Java2DUserResourceWrapperImpl.getInputStream(Java2DUserResourceWrapperImpl.java:65) [:4.0.0-SNAPSHOT]
          at org.richfaces.resource.CachedResourceImpl.initialize(CachedResourceImpl.java:178) [:4.0.0-SNAPSHOT]
          at org.richfaces.resource.ResourceHandlerImpl.handleResourceRequest(ResourceHandlerImpl.java:171) [:4.0.0-SNAPSHOT]
          at javax.faces.webapp.FacesServlet.service(FacesServlet.java:407) [:2.1.1-FCS]
      
      14:45:38,493 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/myapp].[Faces Servlet]] Servlet.service() para servlet Faces Servlet lanzó excepción: java.lang.IllegalArgumentException: Width (1) and height (0) cannot be <= 0
          at java.awt.image.DirectColorModel.createCompatibleWritableRaster(DirectColorModel.java:999) [:1.6.0_24]
          at java.awt.image.BufferedImage.<init>(BufferedImage.java:321) [:1.6.0_24]
          at org.richfaces.resource.ImageType.createARGBImage(ImageType.java:103) [:4.0.0-SNAPSHOT]
          at org.richfaces.resource.ImageType.access$200(ImageType.java:34) [:4.0.0-SNAPSHOT]
          at org.richfaces.resource.ImageType$2.createImage(ImageType.java:44) [:4.0.0-SNAPSHOT]
          at org.richfaces.resource.ImageType.createImage(ImageType.java:118) [:4.0.0-SNAPSHOT]
          at org.richfaces.resource.Java2DUserResourceWrapperImpl.paintAndWrite(Java2DUserResourceWrapperImpl.java:155) [:4.0.0-SNAPSHOT]
          at org.richfaces.resource.Java2DUserResourceWrapperImpl.getInputStream(Java2DUserResourceWrapperImpl.java:65) [:4.0.0-SNAPSHOT]
          at org.richfaces.resource.CachedResourceImpl.initialize(CachedResourceImpl.java:178) [:4.0.0-SNAPSHOT]
          at org.richfaces.resource.ResourceHandlerImpl.handleResourceRequest(ResourceHandlerImpl.java:171) [:4.0.0-SNAPSHOT]
          at javax.faces.webapp.FacesServlet.service(FacesServlet.java:407) [:2.1.1-FCS]
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:324) [:6.0.0.Final]
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.0.0.Final]
          at org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:67) [:6.0.0.Final]
      

      I found a note
      http://echelog.matzon.dk/logs/browse/richfaces/1306706400

      Thanks

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  bleathem Brian Leathem
                  Reporter:
                  bcn u j
                • Votes:
                  9 Vote for this issue
                  Watchers:
                  16 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Time Tracking

                    Estimated:
                    Original Estimate - 1 hour
                    1h
                    Remaining:
                    Remaining Estimate - 1 hour
                    1h
                    Logged:
                    Time Spent - Not Specified
                    Not Specified