[Hippo-cms7-user] Issue regarding ECM versions

Vijayaraghavan, Ashwin ashwin.vijayaraghavan at capgemini.com
Thu Nov 19 12:34:54 CET 2009


We have been used this piece of code in order to implement a very trivial email alert; it

basically fetches a set of documents having a my:alertnotification=true and sets the value to

false after sending it via email...

NodeIterator nodes = Utils.getDocuments(query, queryManager);
log.debug("AlertNotifier found " + nodes.getSize()+ " alerts to send out");

while (nodes.hasNext()) {
        //Get Editable Node instance
        HippoNode node = (HippoNode) nodes.nextNode();
        AlertNotification alertNotification;
        alertNotification = AlertNotificationParser.getAlertNotification(node);
        //Save the node
        Property contentProperty = node.getProperty("my:alertnotification");

It used to work like a charm with previous Hippo ECM versions (we saw it working *for sure* on

version 2.06.10) but now it triggers the following exception

19.11.2009 11:54:09 ERROR [com.sourcesense.my.alertnotifier.AlertNotifierJob.execute():75] Error

retrieving documents for the alert notification
javax.jcr.version.VersionException: Cannot set a property of a checked-in node: property

        at org.apache.jackrabbit.core.PropertyImpl.checkSetValue(PropertyImpl.java:242)
        at org.apache.jackrabbit.core.PropertyImpl.setValue(PropertyImpl.java:607)
        at org.apache.jackrabbit.core.PropertyImpl.setValue(PropertyImpl.java:579)
        at org.hippoecm.repository.decorating.PropertyDecorator.setValue

        at com.sourcesense.my.alertnotifier.AlertNotifierJob.execute(AlertNotifierJob.java:53)
        at org.quartz.core.JobRunShell.run(JobRunShell.java:203)
        at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)

We're currently using Hippo ECM 2.06.13; AFAIU from the exception, some update content method

has been 'deprecated' in favour of more structured workflow-oriented approach; can someone

confirm that? If so, could you please 'port' the few lines of code above to be compliant with

the new versions?

Thanks in advance,



This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is 
intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to 
read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message 
in error, please notify the sender immediately and delete all copies of this message.

More information about the Hippo-cms7-user mailing list