• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Saloon Keeper
Posts: 27808
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
Stefan Mackovik
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, there are differences. Here in our country "." is for grouping and "," for seperating integer digits from fraction digits.
 
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try changing the data type from float to double.
 
Stefan Mackovik
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please anyone has solution for the issue. I am using f:convertNumber tag and getting the similar issue as above.
 
Tim Holloway
Saloon Keeper
Posts: 27808
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic