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 Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "JSF - "Can Watch "JSF - "Can New topic
Author

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

Stefan Mackovik
Greenhorn

Joined: Nov 21, 2007
Posts: 4
Hello!

I've a very strange problem using JSF-RI 1.2, Spring 2.55 and Hibernate using Oracle OC4J 10.1.3.3 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 'at.sozvers.bva.loewe.online.dto.SehwertDTO' to value '1'.
java.lang.IllegalArgumentException: argument type mismatch
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at javax.el.BeanELResolver.setValue(BeanELResolver.java:313)
at javax.el.CompositeELResolver.setValue(CompositeELResolver.java:275)
at com.sun.faces.el.FacesCompositeELResolver.setValue(FacesCompositeELResolver.java:100)
at com.sun.el.parser.AstValue.setValue(AstValue.java:113)
at com.sun.el.ValueExpressionImpl.setValue(ValueExpressionImpl.java:246)
at com.sun.facelets.el.TagValueExpression.setValue(TagValueExpression.java:93)
at javax.faces.component.UIInput.updateModel(UIInput.java:771)
at javax.faces.component.UIInput.processUpdates(UIInput.java:703)
at javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1076)
at javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1076)
at javax.faces.component.UIForm.processUpdates(UIForm.java:261)
at org.ajax4jsf.component.AjaxViewRoot$2.invokeContextCallback(AjaxViewRoot.java:412)
at org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:235)
at org.ajax4jsf.component.AjaxViewRoot.processUpdates(AjaxViewRoot.java:428)
at com.sun.faces.lifecycle.UpdateModelValuesPhase.execute(UpdateModelValuesPhase.java:78)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:154)
at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:260)
at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:366)
at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:493)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:623)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
at java.lang.Thread.run(Thread.java:595)


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"/>
</h:inputText>


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
Stefan Mackovik
Greenhorn

Joined: Nov 21, 2007
Posts: 4
Hi!

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: 16141
    
  21

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
Greenhorn

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
email: jerwin.uy@incuventure.net
Stefan Mackovik
Greenhorn

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
Greenhorn

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: 16141
    
  21

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: http://aspose.com/file-tools
 
subject: JSF - "Can't set property..."