[opencms-dev] Problem writing properties

Jeff White jeff.white at jvolution.co.uk
Fri Sep 30 18:34:21 CEST 2005


Hi

I am trying to update a property value in OpenCms 6 and getting an exception
which is not very helpful as it does not say why,

org.opencms.file.CmsVfsException: Error writing property "template" on
resource "/index.html".

I have tried the vfs resource name and the fully qualified resource name
returned by getRootPath() neither of which allows me to update the property,
the code is as follows.

	CmsProperty prop = cms.readPropertyObject(vfsName, "template", false) ;
	String templateName = prop.getValue() ;
	templateName = templateName.substring(0, templateName.length()-4) +
"PUB.jsp" ;
	prop.setValue(templateName, CmsProperty.TYPE_INDIVIDUAL) ;
	cms.writePropertyObject(vfsName, prop) ;

Has anyone seen this problem.

Jeff White
JVolution Ltd.
Tel : (+44) 0208 714 4488
Mob: 07951 764806
This email and any attachments or links are confidential and intended only
for the individual to whom it is addressed. If you are not the intended
recipient, any use or dissemination of this communication is strictly
prohibited and you are requested to notify the sender immediately and then
delete this email.

JVolution does not accept liability for any data corruption, unauthorised
amendment, viruses and unforeseen delays to which this email may be subject.
This email and any attachments or links are opened at your own risk.
JVolution can take no responsibility for the consequences of actions carried
out as a result of this e-mail.




More information about the opencms-dev mailing list