aspose file tools*
The moose likes JSF and the fly likes problem in using richfaces Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "problem in using richfaces" Watch "problem in using richfaces" New topic
Author

problem in using richfaces

ahmed osman
Greenhorn

Joined: May 28, 2008
Posts: 5
dear every body .

i have this problem when use richfaces framework .

when request first page (index.jsf) i get this error :


02/07/2008 03:39:57 ص org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet Faces Servlet threw exception
java.lang.IllegalArgumentException: Parameter "size" for convert from HTML to java can not be decoded: [11px], reason: Unparseable number: "11px"
at org.ajax4jsf.util.HtmlDimensions.decode(HtmlDimensions.java:65)
at org.richfaces.renderkit.html.images.BaseControlBackgroundImage.getHeight(BaseControlBackgroundImage.java:113)
at org.richfaces.renderkit.html.images.BaseControlBackgroundImage.getHeight(BaseControlBackgroundImage.java:120)
at org.richfaces.renderkit.html.images.BaseControlBackgroundImage.getDataToStore(BaseControlBackgroundImage.java:136)
at org.ajax4jsf.resource.InternetResourceBase.getUri(InternetResourceBase.java:211)
at org.ajax4jsf.renderkit.compiler.ResourceElement.getString(ResourceElement.java:83)
at org.ajax4jsf.renderkit.compiler.ClassElement.getString(ClassElement.java:94)
at org.ajax4jsf.renderkit.compiler.ClassElement.encode(ClassElement.java:59)
at org.ajax4jsf.renderkit.compiler.ElementBase.encode(ElementBase.java:105)
at org.ajax4jsf.renderkit.compiler.ElementBase.encode(ElementBase.java:105)
at org.ajax4jsf.renderkit.compiler.RootElement.encode(RootElement.java:64)
at org.ajax4jsf.renderkit.compiler.ElementBase.encode(ElementBase.java:73)
at org.ajax4jsf.resource.TemplateCSSRenderer.send(TemplateCSSRenderer.java:91)
at org.ajax4jsf.resource.InternetResourceBase.send(InternetResourceBase.java:369)
at org.ajax4jsf.resource.ResourceLifecycle.sendResource(ResourceLifecycle.java:221)
at org.ajax4jsf.resource.ResourceLifecycle.send(ResourceLifecycle.java:146)
at org.ajax4jsf.resource.InternetResourceService.load(InternetResourceService.java:333)
at org.ajax4jsf.cache.LRUMapCache.load(LRUMapCache.java:116)
at org.ajax4jsf.cache.LRUMapCache.get(LRUMapCache.java:87)
at org.ajax4jsf.resource.InternetResourceService.serviceResource(InternetResourceService.java:195)
at org.ajax4jsf.resource.InternetResourceService.serviceResource(InternetResourceService.java:141)
at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:481)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:147)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:856)
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:565)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1509)
at java.lang.Thread.run(Unknown Source)


web.xml :
*********

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.4"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">

<!-- rich faces param -->
<context-param>
<param-name>org.richfaces.SKIN</param-name>
<param-value>DEFAULT</param-value>
</context-param>
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>server</param-value>
</context-param>



<!-- Tiles ViewHandler config file -->
<context-param>
<description>
Tiles configuration definition files and a listener need to
be defined. the listener will initialize
JspTilesViewHandlerImpl with tiles definitions.
</description>
<param-name>tiles-definitions</param-name>
<param-value>/WEB-INF/tiles.xml</param-value>
</context-param>


<!-- richfaces filter -->
<filter>
<display-name>RichFaces Filter</display-name>
<filter-name>richfaces</filter-name>
<filter-class>org.ajax4jsf.Filter</filter-class>
</filter>
<filter-mapping>
<filter-name>richfaces</filter-name>
<servlet-name>Faces Servlet</servlet-name>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
<dispatcher>INCLUDE</dispatcher>
</filter-mapping>




<!-- for uploading files -->
<filter>
<filter-name>extensionsFilter</filter-name>
<filter-class>
org.apache.myfaces.webapp.filter.ExtensionsFilter
</filter-class>
<init-param>
<description>
Size limit for uploaded files. 10 - 10 bytes, 10k - 10
KB, 10m - 10 MB, 1g - 1 GB
</description>
<param-name>uploadMaxFileSize</param-name>
<param-value>100m</param-value>
</init-param>
<init-param>
<description>
Set the threshold size - files below this limit are
stored in memory, files above this limit are stored on
disk. 10 - 10 bytes, 10k - 10 KB, 10m - 10 MB, 1g - 1 GB
</description>
<param-name>uploadThresholdSize</param-name>
<param-value>100k</param-value>
</init-param>
</filter>


<filter-mapping>
<filter-name>extensionsFilter</filter-name>
<servlet-name>Faces Servlet</servlet-name>
</filter-mapping>
<filter-mapping>
<filter-name>extensionsFilter</filter-name>
<url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>extensionsFilter</filter-name>
<url-pattern>*.jsf</url-pattern>
</filter-mapping>

<!-- jsf sevlets -->
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>

<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>

<!-- tiles servlets -->
<servlet>
<servlet-name>Tiles Servlet</servlet-name>
<servlet-class>
org.apache.tiles.servlets.TilesServlet
</servlet-class>
<load-on-startup>2</load-on-startup>
</servlet>

<!-- wellcome page -->
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
<welcome-file>index.html</welcome-file>
</welcome-file-list>


<!-- error page -->
<error-page>
<error-code>500</error-code>
<location>/ErrorPage.jsp</location>
</error-page>
</web-app>

lib jars :
*********

antlr-2.7.6.jar
asm.jar
asm-attrs.jar
cglib-2.1.3.jar
classes12.jar
commons-beanutils-1.7.0.jar
commons-codec-1.3.jar
commons-collections-3.2.jar
commons-digester-1.8.jar
commons-discovery-0.4.jar
commons-el-1.0.jar
commons-fileupload-1.0.jar
commons-lang-2.1.jar
commons-logging-1.1.1.jar
dom4j-1.6.1.jar
ehcache-1.1.jar
hibernate3.jar
itext-2.0.6.jar
jasperreports-2.0.5.jar
jasperreports-extensions-1.3.1.jar
jstl.jar
jta.jar
junit.jar
log4j-1.2.15.jar
myfaces-api-1.2.3.jar
myfaces-impl-1.2.3.jar
richfaces-api-3.2.0.SR1.jar
richfaces-impl-3.2.0.SR1.jar
richfaces-ui-3.2.0.SR1.jar
standard.jar
tiles-core-SNAPSHOT.jar
tomahawk-1.1.6.jar

am using :
hibernate for db
tiles.
jasperreport.

can any one help me please ??? iam going crazy .
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16142
    
  21

It would be nice if they'd told you what the offending tag was, but here's the problem: you've specified a tag with the attribute of 'size="11px"'.

If that was for an input form, the HTML input tag has a size attribute, but it's a purely numeric value equal to the number of columns that the field is expected to make displayable - which causes the width of the rendered input textbox to be set accordingly.

If you want a width in pixels, you need to use a CSS width style setting, which you could do with 'style="width: 11px;"' - although 11 pixels isn't very wide. I usually define a set of style classes for this kind of stuff, since it helps me make the forms look more consistent.


Customer surveys are for companies who didn't pay proper attention to begin with.
ahmed osman
Greenhorn

Joined: May 28, 2008
Posts: 5
thank you Mr. Tim for your attention .

i allready searched for tag with parameter size 11px ; but i never found it ;

my user login page :
<%@ page language="java" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>

<title>Login Page</title>
<link rel="stylesheet" type="text/css" href="styles.css">

</head>

<body >

<br>
<br>
<center>
<f:view>

<f:loadBundle basename="labels" var="msg" />

<h:form dir="#{local.dir}" >

<h:graphicImage value="images/TargetPreview_01.jpg" />
<h:panelGrid dir="#{local.rdir}" columns="5">
<h:commandLink dir="#{local.rdir}" immediate="true" action="#{local.changeLangauge}" style="text-decoration:none;border:0px;">
<h:graphicImage url="images/#{local.dir}.png" style="border:0px;" />
</h:commandLink>

<hutputText value="Welcome Welcome Welcome Welcome Welcome" style="color:white" />


</h:panelGrid>

<!-- fieldset style="height: 30%; width: 50%" -->
<fieldset style="height: 35%; width: 40%">
<legend style="color: #0080FF; text-transform: uppercase">
<hutputText value="#{msg.Login}" />
</legend>


<h:panelGrid border="0" columns="1" >
<hutputLabel value="#{msg.Bank_Name}" style="font-weight: bold; color: #808080; font-family: Tahoma, Verdana, Arial, Sans-Serif; font-size: 12px; text-transform: capitalize" />
<h:panelGroup>
<f:verbatim>  </f:verbatim>
<hutputLabel value="#{msg.Payment_Office}" style="font-weight: bold; color: #FFA87D; font-family: Tahoma, Verdana, Arial, Sans-Serif; font-size: 12px" />
</h:panelGroup>
</h:panelGrid>

<f:verbatim>
<br>

</f:verbatim>

<h:panelGrid border="0" columns="2" >

<h:panelGroup></h:panelGroup>

<h:panelGrid border="0" columns="3" style="border-right-color: #C0C0C0; border-right-style: solid; border-bottom-color: #C0C0C0; border-top-width: 1px; border-top-color: #C0C0C0; border-bottom-style: solid; border-right-width: 1px; border-left-width: 1px; border-left-style: solid; border-top-style: solid; border-left-color: #C0C0C0; border-bottom-width: 1px; background-color: #EAEAEA">
<h:panelGroup >
<hutputLabel value="#{msg.User_Name}" />
<hutputText value="*" style="color:red" />
</h:panelGroup>
<h:panelGroup style="width: 227px">
<hutputText value="" style="width: 16px;" />
<h:inputText value="#{User.userId}" id="user_name" required="true" style="width: 191px; text-transform: uppercase"/>
</h:panelGroup>
<h:message for="user_name" style="color:red" />
</h:panelGrid>

<h:panelGroup></h:panelGroup>

<h:panelGrid border="0" columns="3" style="border-right-color: #C0C0C0; border-right-style: solid; border-bottom-color: #C0C0C0; border-top-width: 1px; border-top-color: #C0C0C0; border-bottom-style: solid; border-right-width: 1px; border-left-width: 1px; border-left-style: solid; border-top-style: solid; border-left-color: #C0C0C0; border-bottom-width: 1px; background-color: #EAEAEA">
<h:panelGroup>
<hutputLabel value="#{msg.Password}" />
<hutputText value="*" style="color:red" />
</h:panelGroup>
<h:panelGroup style="width: 233px">
<hutputText value="" style="width: 22px;" />
<h:inputSecret value="#{User.userPass}" id="password" required="true" style="width: 192px"/>
</h:panelGroup>
<h:message for="password" style="color:red"/>
</h:panelGrid>

<h:panelGroup></h:panelGroup>

<h:panelGrid border="0" columns="3" style="border-right-color: #C0C0C0; border-right-style: solid; border-bottom-color: #C0C0C0; border-top-width: 1px; border-top-color: #C0C0C0; border-bottom-style: solid; border-right-width: 1px; border-left-width: 1px; border-left-style: solid; border-top-style: solid; border-left-color: #C0C0C0; border-bottom-width: 1px; background-color: #EAEAEA">
<h:panelGroup>
<hutputLabel value="#{msg.Session_Code}" />
<hutputText value="*" style="color:red" />
</h:panelGroup>
<h:panelGroup style="width: 209px">
<h:inputText value="#{User.loginCode}" id="session_code" required="true" style="width: 192px" />
</h:panelGroup>
<h:message for="session_code" style="color:red" />
</h:panelGrid>

<h:panelGroup></h:panelGroup>
<h:panelGroup>
<hutputText value="#{User.errorDesc}" style="color:red" />
</h:panelGroup>
<h:panelGroup></h:panelGroup>

<h:panelGrid columns="4">

<h:panelGroup style="width: 110px"></h:panelGroup>
<h:panelGroup></h:panelGroup>
<h:commandButton value="#{msg.Enter}" action="#{User.logIn}" style="width:102px;background-color:#265988;color:#FFFFFF" />
<h:commandButton immediate="true" value="#{msg.Cancel}" action="failure" style="width:102px;background-color:#265988;color:#FFFFFF" />

</h:panelGrid>
</h:panelGrid>

</fieldset>
</h:form>
</f:view>
</center>
</body>
</html>


on another hand i get this statement before any request :
a4j_3_2_0.SR1-SNAPSHOTorg/richfaces/renderkit/html/css/basic_classes.xcss/DATB/eAF7l.tFHgAHCgJv.jsf

i dont no what this meaning .

and thank you again for helping me .
Bassam Al-Sarori
Greenhorn

Joined: Aug 23, 2008
Posts: 10
Ahmed,
I faced this error before
java.lang.IllegalArgumentException: Parameter "size" for convert from HTML to java can not be decoded: [11px], reason: Unparseable number:
.......

I know that this will seem not making sense but this problem only happens when running richfaces under Windows with Language set to Arabic. And as I can see from your error trace your Windows Regional Option is set to Arabic so, try changing this setting to maybe English US.

I hope this solves the problem.
[ August 23, 2008: Message edited by: Bassam Al-Sarori ]
haitham saif
Greenhorn

Joined: Oct 13, 2008
Posts: 1
dear all

i facing the same problem here, but i faced it in just one page although i am using richfaces in all other pages

please i need your help urgently

Thanks 4u all
 
Don't get me started about those stupid light bulbs.
 
subject: problem in using richfaces