-
1. Re: javax.jcr.nodetype.ConstraintViolationException : Node is protected
Yogesh Upadhyay Feb 5, 2013 7:25 AM (in response to Veena_07)Can you send full stack trace ? And if possible json output of node you are trying to modify. Something like yournpdepath.json or .xml
Yogesh
-
2. Re: javax.jcr.nodetype.ConstraintViolationException : Node is protected
AshishPanwar Feb 5, 2013 7:55 PM (in response to Veena_07)Are you trying to write to a "cq:Page" node?
If so, try writing to the "cq:Pagecontent" node under the cq:Page node (jcr:content).
-
3. Re: javax.jcr.nodetype.ConstraintViolationException : Node is protected
Veena_07 Feb 5, 2013 10:25 PM (in response to Yogesh Upadhyay)05.02.2013 20:11:01.917 *ERROR* [JobHandler: /etc/workflow/instances/2013-02-05/model_29635143320497:/content/test67] com.az.signup.helper.SignupFormHelper Error in SignUpformhelper.java in setNodeProperty() javax.jcr.nodetype.ConstraintViolationException: Unable to perform operation. Node is protected.
at org.apache.jackrabbit.core.ItemValidator.checkCondition(ItemValidator.java:276)
at org.apache.jackrabbit.core.ItemValidator.checkModify(ItemValidator.java:248)
at org.apache.jackrabbit.core.PropertyImpl.checkSetValue(PropertyImpl.java:271)
at org.apache.jackrabbit.core.PropertyImpl.setValue(PropertyImpl.java:714)
at org.apache.jackrabbit.core.NodeImpl$SetPropertyOperation.perform(NodeImpl.java:2023)
at org.apache.jackrabbit.core.NodeImpl$SetPropertyOperation.perform(NodeImpl.java:1967)
at org.apache.jackrabbit.core.session.SessionState.perform(SessionState.java:200)
at org.apache.jackrabbit.core.NodeImpl.setProperty(NodeImpl.java:1889)
at org.apache.jackrabbit.core.NodeImpl.setProperty(NodeImpl.java:1859)
at com.az.signup.helper.SignupFormHelper.setNodeProperty(com.az.signup.helper.SignupFormHelp er.java:1946)
at com.az.signup.dax.MasterDataCRX.setSurveyValues(com.az.signup.dax.MasterDataCRX.java:264)
at com.az.signup.dax.MasterDataCRX.setSurveyNode(com.az.signup.dax.MasterDataCRX.java:216)
at com.az.signup.dax.MasterDataCRX.callSetSurveyNode(com.az.signup.dax.MasterDataCRX.java:13 0)
at com.az.signup.dax.MasterDataCRX.submitSurveyOptsBrands(com.az.signup.dax.MasterDataCRX.ja va:87)
at com.az.signup.impl.AZSignUpWorkflow.execute(com.az.signup.impl.AZSignUpWorkflow.java:86)
at com.day.cq.workflow.impl.job.HandlerBase.executeProcess(HandlerBase.java:172)
at com.day.cq.workflow.impl.job.JobHandler.process(JobHandler.java:122)
at org.apache.sling.event.jobs.JobUtil$1.run(JobUtil.java:272)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
this the error log i get.
{"qstnIdSys":"BRA123QNS001","qstnText":"23423","ansIdsSys":["BRA123ANS001"],"ansType":"dat e","qstnId":"123","jcr:primaryType":"nt:unstructured"}
this is json of one node created and properties written. Properties are getting written correctly but the above error is coming
-
4. Re: javax.jcr.nodetype.ConstraintViolationException : Node is protected
splram Feb 5, 2013 11:00 PM (in response to Veena_07)What is the name of property that you are trying to update using setProperty? Some properties cannot be modified, are you trying to modify something which is not supposed to be modified? Check once.
-
5. Re: javax.jcr.nodetype.ConstraintViolationException : Node is protected
Veena_07 Feb 6, 2013 12:01 AM (in response to splram)whatever the json is showing is all set dynamically through coding... Runtime only the nt:unstructured node is created and properties are set to it.
-
6. Re: javax.jcr.nodetype.ConstraintViolationException : Node is protected
splram Feb 6, 2013 12:21 AM (in response to Veena_07)Since the properties are getting modifed from a worfklow process, after setting the property, are you saving using session.save()? check once without saving the session.
-
7. Re: javax.jcr.nodetype.ConstraintViolationException : Node is protected
Veena_07 Feb 6, 2013 2:13 AM (in response to splram)Hi splram
I tried to log what all properties are getting written. Wen i checked i could find that it is taking the primary type of other node also and i think that is what throwing error..
Thanks a lot for your precious comments and help


