Hi All,
I am getting below exception while trying to update/add bulk metadata properties for a given node:
Exception: javax.jcr.version.VersionException: Cannot set property. Node is checked in.
at org.apache.jackrabbit.oak.jcr.session.NodeImpl$35.checkPreconditions(NodeImpl.java:1357)
at org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.prePerform(SessionDelegate.java:606)
at org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.perform(SessionDelegate.java:197)
at org.apache.jackrabbit.oak.jcr.session.ItemImpl.perform(ItemImpl.java:112)
at org.apache.jackrabbit.oak.jcr.session.NodeImpl.internalSetProperty(NodeImpl.java:1352)
at org.apache.jackrabbit.oak.jcr.session.NodeImpl.setProperty(NodeImpl.java:432)
The node is of type mix:versionable and I am trying to set String and String[] type property. Setting up few properties thru the code work fine, however when I try to set large set of data, it throws above exception. I set property as:
metadataNode.setProperty(name, metadataValue);
To resolve above error, I tried to checkout and check in the current node: /content/dam/abc/product-design/44739_Asset.tif and It resulted into following error:
/content/dam/abc/product-design/44739_Asset.tif/jcr:content/metadata is not versionable
at org.apache.jackrabbit.oak.jcr.version.ReadWriteVersionManager.checkout(ReadWriteVersionManager.java:161)
at org.apache.jackrabbit.oak.jcr.delegate.VersionManagerDelegate.checkout(VersionManagerDelegate.java:75)
at org.apache.jackrabbit.oak.jcr.version.VersionManagerImpl$6.performVoid(VersionManagerImpl.java:340)
at org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.performVoid(SessionDelegate.java:266)
at org.apache.jackrabbit.oak.jcr.version.VersionManagerImpl.checkout(VersionManagerImpl.java:331)
at com.day.cq.workflow.compatibility.CQWorkflowProcessRunner.execute(CQWorkflowProcessRunner.java:93)
at com.adobe.granite.workflow.core.job.HandlerBase.executeProcess(HandlerBase.java:184)
at com.adobe.granite.workflow.core.job.JobHandler.process(JobHandler.java:234)
at org.apache.sling.event.impl.jobs.JobConsumerManager$JobConsumerWrapper.process(JobConsumerManager.java:512)
at org.apache.sling.event.impl.jobs.queues.JobQueueImpl.startJob(JobQueueImpl.java:303)
at org.apache.sling.event.impl.jobs.queues.JobQueueImpl.access$100(JobQueueImpl.java:66)
at org.apache.sling.event.impl.jobs.queues.JobQueueImpl$1.run(JobQueueImpl.java:238)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Can you please suggest?
Thanks.
Hi Meenakshi,
I do not know about previous suggestion. What is your use case and can you attach the custom workflow process for review.
Thanks,
MeenakshiP wrote...
Hi All,
I am getting below exception while trying to update/add bulk metadata properties for a given node:
Exception: javax.jcr.version.VersionException: Cannot set property. Node is checked in.
at org.apache.jackrabbit.oak.jcr.session.NodeImpl$35.checkPreconditions(NodeImpl.java:1357)
at org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.prePerform(SessionDelegate.java:606)
at org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.perform(SessionDelegate.java:197)
at org.apache.jackrabbit.oak.jcr.session.ItemImpl.perform(ItemImpl.java:112)
at org.apache.jackrabbit.oak.jcr.session.NodeImpl.internalSetProperty(NodeImpl.java:1352)
at org.apache.jackrabbit.oak.jcr.session.NodeImpl.setProperty(NodeImpl.java:432)
at com.levistrauss.dam.core.util.CommonUtils.writeBackMetadata(CommonUtils.java:1144)
Based on prior suggestions, I tried to checkout and check in the current node: /content/dam/abc/levis/product-design/44739_Asset.tif
It resulted into following error:
/content/dam/abc/levis/product-design/44739_Asset.tif/jcr:content/metadata is not versionable
at org.apache.jackrabbit.oak.jcr.version.ReadWriteVersionManager.checkout(ReadWriteVersionManager.java:161)
at org.apache.jackrabbit.oak.jcr.delegate.VersionManagerDelegate.checkout(VersionManagerDelegate.java:75)
at org.apache.jackrabbit.oak.jcr.version.VersionManagerImpl$6.performVoid(VersionManagerImpl.java:340)
at org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.performVoid(SessionDelegate.java:266)
at org.apache.jackrabbit.oak.jcr.version.VersionManagerImpl.checkout(VersionManagerImpl.java:331)
at com.levistrauss.dam.core.util.CommonUtils.writeTaggingMetadata(CommonUtils.java:1183)
at com.levistrauss.dam.core.workflows.LSCOMetadataWriteback.execute(LSCOMetadataWriteback.java:119)
at com.day.cq.workflow.compatibility.CQWorkflowProcessRunner.execute(CQWorkflowProcessRunner.java:93)
at com.adobe.granite.workflow.core.job.HandlerBase.executeProcess(HandlerBase.java:184)
at com.adobe.granite.workflow.core.job.JobHandler.process(JobHandler.java:234)
at org.apache.sling.event.impl.jobs.JobConsumerManager$JobConsumerWrapper.process(JobConsumerManager.java:512)
at org.apache.sling.event.impl.jobs.queues.JobQueueImpl.startJob(JobQueueImpl.java:303)
at org.apache.sling.event.impl.jobs.queues.JobQueueImpl.access$100(JobQueueImpl.java:66)
at org.apache.sling.event.impl.jobs.queues.JobQueueImpl$1.run(JobQueueImpl.java:238)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Can you please suggest?
Thanks.
Are you dealing with mix:versionable nodes? This exception generally happens on this kind of nodes. See the javadoc and try to implement the right method.
https://docs.adobe.com/content/docs/en/spec/jsr170/javadocs/jcr-1.0/javax/jcr/Node.html
What kind of property are you trying to set?
Yes it is of type mix:versionable.
Was there a resolution to this?
We are having the same exception when attempting to modify workflow models through the standard UI.
Views
Likes
Replies
Views
Likes
Replies