0 Replies Latest reply on Sep 12, 2011 8:53 AM by Claudio Tasso

    generalSizeFont using EM [RichFaces 4.0]

    Claudio Tasso Newbie

      Hi all,

      it seems that it's impossible to configure a skin using the EM unit of measure for the generalSizeFont.

      For example, using the following in a skin.properties file:

       

      generalSizeFont=1em

       

      causes the following exception:

       

      SEVERE: Servlet.service() for servlet [Faces Servlet] in context with path [/BAC] threw exception

      java.lang.IllegalArgumentException: Width (2000) and height (0) cannot be <= 0

          at java.awt.image.DirectColorModel.createCompatibleWritableRaster(DirectColorModel.java:999)

          at java.awt.image.BufferedImage.<init>(BufferedImage.java:321)

          at org.richfaces.resource.ImageType.createARGBImage(ImageType.java:103)

          at org.richfaces.resource.ImageType.access$200(ImageType.java:34)

          at org.richfaces.resource.ImageType$2.createImage(ImageType.java:44)

          at org.richfaces.resource.ImageType.createImage(ImageType.java:118)

          at org.richfaces.resource.Java2DUserResourceWrapperImpl.paintAndWrite(Java2DUserResourceWrapperImpl.java:155)

          at org.richfaces.resource.Java2DUserResourceWrapperImpl.getInputStream(Java2DUserResourceWrapperImpl.java:65)

          at org.richfaces.resource.CachedResourceImpl.initialize(CachedResourceImpl.java:178)

          at org.richfaces.resource.ResourceHandlerImpl.handleResourceRequest(ResourceHandlerImpl.java:171)

          at javax.faces.webapp.FacesServlet.service(FacesServlet.java:407)

          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)

          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)

          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164)

          at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)

          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)

          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)

          at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:562)

          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)

          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:395)

          at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:250)

          at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:188)

          at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:166)

          at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:302)

          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

          at java.lang.Thread.run(Thread.java:662)

      Sep 12, 2011 2:50:18 PM org.apache.catalina.core.StandardWrapperValve invoke

      SEVERE: Servlet.service() for servlet [Faces Servlet] in context with path [/BAC] threw exception

      java.lang.IllegalArgumentException: Width (1) and height (0) cannot be <= 0

          at java.awt.image.DirectColorModel.createCompatibleWritableRaster(DirectColorModel.java:999)

          at java.awt.image.BufferedImage.<init>(BufferedImage.java:321)

          at org.richfaces.resource.ImageType.createARGBImage(ImageType.java:103)

          at org.richfaces.resource.ImageType.access$200(ImageType.java:34)

          at org.richfaces.resource.ImageType$2.createImage(ImageType.java:44)

          at org.richfaces.resource.ImageType.createImage(ImageType.java:118)

          at org.richfaces.resource.Java2DUserResourceWrapperImpl.paintAndWrite(Java2DUserResourceWrapperImpl.java:155)

          at org.richfaces.resource.Java2DUserResourceWrapperImpl.getInputStream(Java2DUserResourceWrapperImpl.java:65)

          at org.richfaces.resource.CachedResourceImpl.initialize(CachedResourceImpl.java:178)

          at org.richfaces.resource.ResourceHandlerImpl.handleResourceRequest(ResourceHandlerImpl.java:171)

          at javax.faces.webapp.FacesServlet.service(FacesServlet.java:407)

          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)

          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)

          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164)

          at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)

          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)

          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)

          at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:562)

          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)

          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:395)

          at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:250)

          at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:188)

          at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:302)

          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

          at java.lang.Thread.run(Thread.java:662)

       

      Is it a RichFaces bug? Does any workaround exist for using EM?

      Thanks in advance