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

Win a copy of OCA Java SE 8 Programmer I Study Guide 1Z0-808 this week in the OCAJP forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "JSF - "Can Watch "JSF - "Can New topic

JSF - "Can't set property..."

Stefan Mackovik

Joined: Nov 21, 2007
Posts: 4

I've a very strange problem using JSF-RI 1.2, Spring 2.55 and Hibernate using Oracle OC4J as JEE conatiner. It is strange, because it only occuring on a Linux- platform, a standalone container running in windows does not show the problem.

If I try to set a number value in a JSF page, the following error shows up:

SEVERE: /blaetter/hBlatt.xhtml @171,81 value="#{hblattBean.hblattDTO.sehwertDTO.ferneRechtsSph}": Can't set property 'ferneRechtsSp' on class '' to value '1'.
java.lang.IllegalArgumentException: argument type mismatch
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(
at sun.reflect.DelegatingMethodAccessorImpl.invoke(
at java.lang.reflect.Method.invoke(
at javax.el.BeanELResolver.setValue(
at javax.el.CompositeELResolver.setValue(
at com.sun.faces.el.FacesCompositeELResolver.setValue(
at com.sun.el.parser.AstValue.setValue(
at com.sun.el.ValueExpressionImpl.setValue(
at com.sun.facelets.el.TagValueExpression.setValue(
at javax.faces.component.UIInput.updateModel(
at javax.faces.component.UIInput.processUpdates(
at javax.faces.component.UIComponentBase.processUpdates(
at javax.faces.component.UIComponentBase.processUpdates(
at javax.faces.component.UIForm.processUpdates(
at org.ajax4jsf.component.AjaxViewRoot$2.invokeContextCallback(
at org.ajax4jsf.component.AjaxViewRoot.processPhase(
at org.ajax4jsf.component.AjaxViewRoot.processUpdates(
at com.sun.faces.lifecycle.UpdateModelValuesPhase.execute(
at com.sun.faces.lifecycle.Phase.doPhase(
at com.sun.faces.lifecycle.LifecycleImpl.execute(
at javax.faces.webapp.FacesServlet.service(
at com.evermind.server.http.ResourceFilterChain.doFilter(
at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(
at org.ajax4jsf.webapp.BaseFilter.handleRequest(
at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(
at org.ajax4jsf.webapp.BaseFilter.doFilter(
at com.evermind.server.http.ServletRequestDispatcher.invoke(
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(
at com.evermind.server.http.HttpRequestHandler.doProcessRequest(
at com.evermind.server.http.HttpRequestHandler.processRequest(
at com.evermind.server.http.HttpRequestHandler.serveOneRequest(
at com.evermind.util.ReleasableResourcePooledExecutor$

But nothing special about this property:

The JSF property:

<h:inputText id="frsId" label="FRs" style="text-align:center" disabled="#{hblattBean.hblattDTO.readonly}" value="#{hblattBean.hblattDTO.sehwertDTO.ferneRechtsSph}" size="3" maxlength="8">
<f:convertNumber locale="de"/>

The object:

private Float ferneRechtsSph;

public void setFerneRechtsSph(Float ferneRechtsSph) {
this.ferneRechtsSph = ferneRechtsSph;

public Float getFerneRechtsSph() {
return ferneRechtsSph;

Is there a possibillity that this error deends on the java version? But couldn't verify this by now.

Thanks in advance for your help!

Stefan Mackovik

Joined: Nov 21, 2007
Posts: 4

Ar least, now I know which part is causing trouble:

If I remove <f:convertNumber locale="de"/> from the JSF page, everything works fine, butb unfortunatley I need this line for localisation...

Any ideas?
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16386

Just a wild guess - and it shouldn't be doing this, since it's a validation error, not an Exceptional one: Are you seeing differences between decimal formats (comma vs. point)?
[ August 11, 2008: Message edited by: Tim Holloway ]

Customer surveys are for companies who didn't pay proper attention to begin with.
Stefan Mackovik

Joined: Nov 21, 2007
Posts: 4
Yes, there are differences. Here in our country "." is for grouping and "," for seperating integer digits from fraction digits.
Jerwin Louise Uy
Ranch Hand

Joined: Oct 27, 2007
Posts: 75
Try changing the data type from float to double.

Uy Jerwin Louise Vergara
Junior Developer / Research and Development at Incuventure Partners Corporation
Stefan Mackovik

Joined: Nov 21, 2007
Posts: 4
Unfortunately this isn't an option, because we need float values (values like "1,25" are most likely)
[ August 12, 2008: Message edited by: Stefan Mackovik ]
Deepthi Kiran

Joined: Nov 07, 2012
Posts: 2
Please anyone has solution for the issue. I am using f:convertNumber tag and getting the similar issue as above.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16386

Welcome to the JavaRanch, Deepthi!

We prefer that rather than awakening old dormant message threads ("raising zombies") that people start new threads.

We do need more specific details on your particular problem, however.
I agree. Here's the link:
subject: JSF - "Can't set property..."