jQuery in Action, 3rd edition
The moose likes JSF and the fly likes UpdateModelException - Property 'xx' not writable on type java.lang.String Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "UpdateModelException - Property Watch "UpdateModelException - Property New topic

UpdateModelException - Property 'xx' not writable on type java.lang.String

David Squire

Joined: Sep 23, 2009
Posts: 5
I am getting the following error when I try to submit an AJAX request:

serverError: class javax.faces.component.UpdateModelException /s/tabs/variables.xhtml @219,151 value="#{row.valueLabel}": Property 'valueLabel' not writable on type java.lang.String

I'm using JSF 2.0 and Tomcat 7.0. In my backing bean I have a list of "ValueLabelRow" classes. The ValueLabelRow class has two properties a "value" which is an Object and a "valueLabel" which is a String. They both have getter and setter methods and there is nothing else in this class. It is a totally simple POJO.

On the front end I am using an h:dataTable tag with two columns. The first column uses an h: outputText to display the "value" as a read only value, and the second column uses an h:inputText to show/allow for edit the "valueLabel."

These exact same classes and beans used to work just fine in JSF 1.2, but now as I'm upgrading to 2.0 I'm hitting this error. I don't understand why the property is not writable. And why is it saying "not writable on type java.lang.String?"

Any help would be greatly appreciated!

Thank you,


Alastair Rae

Joined: Nov 14, 2003
Posts: 7
I don't have an answer but I do have the same problem in JSF2 + ui:repeat
Darcio Pacifico

Joined: Jul 06, 2011
Posts: 1
(Using JSF1.2+Richfaces3+Spring3+Hibernate3+Java1.6)

I have exactly same error when my properties have generic return:
...<P extends Serializable>...
public P getPK(){...}

As a workaround i override these methods forcing return to String.

I hope this helps you and other people. Good luck!
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17410

And a hearty "Welcome" to all you new greenhorns!

You need one of the following:


Add a toString() and a constructor-from-string method to the bean


Write a JSF converter class to convert the bean to and from String format.

It is essential that anything you send to a web page be convertible to text format since HTML is text.

In David's case, I suspect that the get and/or set methods were incorrectly defined. JSF cannot see these methods unless they are public, so the proper forms would be:

For clarity, I've omitted constructors, the value get/set methods and other amenities.

An IDE is no substitute for an Intelligent Developer.
I agree. Here's the link: http://aspose.com/file-tools
subject: UpdateModelException - Property 'xx' not writable on type java.lang.String
It's not a secret anymore!