Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

Unable to edit the metadata of DAM properties

seemak19887037
Level 2
Level 2

Hi,

I am getting error when trying to edit the title of the DAM asset property and after clicking on save button in console its showing like:-Unable to edit the properties

 

Also we are getting the error in error log:-

15.03.2021 11:31:38.074 *ERROR* [127.0.0.1 [1615807898064] POST /content/dam.html HTTP/1.1] org.apache.sling.servlets.post.impl.operations.ModifyOperation Exception during response processing.15.03.2021 11:31:38.074 *ERROR* [127.0.0.1 [1615807898064] POST /content/dam.html HTTP/1.1] org.apache.sling.servlets.post.impl.operations.ModifyOperation Exception during response processing.java.lang.IllegalArgumentException: Value for key jcr:created can't be put into node: java.util.GregorianCalendar[time=1555048743004,areFieldsSet=true,areAllFieldsSet=true,lenient=false,zone=sun.util.calendar.ZoneInfo[id="GMT+02:00",offset=7200000,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=2019,MONTH=3,WEEK_OF_YEAR=15,WEEK_OF_MONTH=2,DAY_OF_MONTH=12,DAY_OF_YEAR=102,DAY_OF_WEEK=6,DAY_OF_WEEK_IN_MONTH=2,AM_PM=0,HOUR=7,HOUR_OF_DAY=7,MINUTE=59,SECOND=3,MILLISECOND=4,ZONE_OFFSET=7200000,DST_OFFSET=0]        at org.apache.sling.jcr.resource.internal.JcrModifiableValueMap.put(JcrModifiableValueMap.java:458)        at org.apache.sling.jcr.resource.internal.JcrModifiableValueMap.put(JcrModifiableValueMap.java:47)        at org.apache.sling.servlets.post.impl.helper.SlingPropertyValueHandler.storeAsDate(SlingPropertyValueHandler.java:460)        at org.apache.sling.servlets.post.impl.helper.SlingPropertyValueHandler.setPropertyAsIs(SlingPropertyValueHandler.java:240)        at org.apache.sling.servlets.post.impl.helper.SlingPropertyValueHandler.setProperty(SlingPropertyValueHandler.java:120)        at org.apache.sling.servlets.post.impl.operations.ModifyOperation.writeContent(ModifyOperation.java:372)        at org.apache.sling.servlets.post.impl.operations.ModifyOperation.doRun(ModifyOperation.java:93)        at org.apache.sling.servlets.post.impl.operations.AbstractPostOperation.run(AbstractPostOperation.java:99)        at org.apache.sling.servlets.post.impl.SlingPostServlet.doPost(SlingPostServlet.java:228)        at org.apache.sling.api.servlets.SlingAllMethodsServlet.mayService(SlingAllMethodsServlet.java:146)        at org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:342) ...        at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:938)        at java.lang.Thread.run(Thread.java:748)Caused by: javax.jcr.nodetype.ConstraintViolationException: Property is protected: jcr:created = 2019-04-12T07:59:03.004+02:00        at org.apache.jackrabbit.oak.jcr.delegate.NodeDelegate.setProperty(NodeDelegate.java:522)        at org.apache.jackrabbit.oak.jcr.session.NodeImpl$36.perform(NodeImpl.java:1403)        at org.apache.jackrabbit.oak.jcr.session.NodeImpl$36.perform(NodeImpl.java:1390)        at org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.perform(SessionDelegate.java:207)        at org.apache.jackrabbit.oak.jcr.session.ItemImpl.perform(ItemImpl.java:112)        at org.apache.jackrabbit.oak.jcr.session.NodeImpl.internalSetProperty(NodeImpl.java:1390)        at org.apache.jackrabbit.oak.jcr.session.NodeImpl.setProperty(NodeImpl.java:368)        at org.apache.sling.jcr.resource.internal.JcrModifiableValueMap.put(JcrModifiableValueMap.java:455)        ... 169 common frames omitted

We are using AEM 6.5.8.0

 

1 Accepted Solution
asutosh_jena
Correct answer by
Community Advisor
Community Advisor

Hi @seemak19887037 

 

Are you facing this issue for all the assets or only for any specific asset?

View solution in original post

4 Replies
asutosh_jena
Correct answer by
Community Advisor
Community Advisor

Hi @seemak19887037 

 

Are you facing this issue for all the assets or only for any specific asset?

View solution in original post

SameerBhalerao
Level 4
Level 4

Hello,

 

POST request does not seem correct here. It should have complete path to whole asset for example modifying metadata at /content/dam/wknd/en/activities/hiking/equipment_6.jpg bring out something like below post request

 

POST /content/dam/wknd/en/activities/hiking/equipment_6.jpg HTTP/1.1] 

 

Can you retry after cleaning the logs?

Dipti_Chauhan
Community Advisor
Community Advisor

Hi @seemak19887037 

  you getting constraint Violation error for jcr:created property<javax.jcr.nodetype.ConstraintViolationException: Property is protected: jcr:created = 2019-04-12T07:59:03.004+02:00>. Can you please check this. There is no need to modify this property.

Can you also share you code snippet for metadata update?

 

Thanks

Dipti