[
https://issues.apache.org/jira/browse/SLING-2761?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13589473#comment-13589473
]
Alex Parvulescu commented on SLING-2761:
----------------------------------------
I forgot to paste in the stack-trace, maybe that would shed some more light on
the issue [2]:
The ModifyOperation checks the mixins on #processDeletes and #writeContent, on
new item the execution path goes directly into the AbstractCreateOperation:
#processCreate, next #deepGetOrCreateNode where is sets the mixinTypes property
[0]:
bq. props.put("jcr:mixinTypes", mixinTypes);
... only to have the JcrModifiableValueMap persist it directly (no api calls)
[1].
am I following the code correctly here?
[0]
http://svn.apache.org/viewvc/sling/trunk/bundles/servlets/post/src/main/java/org/apache/sling/servlets/post/impl/operations/AbstractCreateOperation.java?view=markup#l534
[1]
http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrModifiableValueMap.java?view=markup#626
[2]
{noformat}
*ERROR* [127.0.0.1 [1361809216898] POST /sling-tests/1361809216888/ HTTP/1.1]
org.apache.sling.servlets.post.impl.operations.ModifyOperation Exception during
response processing. javax.jcr.RepositoryException:
org.apache.sling.api.resource.PersistenceException: Value for key
jcr:mixinTypes can't be put into node: [Ljava.lang.String;@b59a28
at
org.apache.sling.servlets.post.impl.operations.ModifyOperation.doRun(ModifyOperation.java:113)
at
org.apache.sling.servlets.post.AbstractPostOperation.run(AbstractPostOperation.java:92)
at
org.apache.sling.servlets.post.impl.SlingPostServlet.doPost(SlingPostServlet.java:202)
at
org.apache.sling.api.servlets.SlingAllMethodsServlet.mayService(SlingAllMethodsServlet.java:148)
.........
Caused by: org.apache.sling.api.resource.PersistenceException: Value for key
jcr:mixinTypes can't be put into node: [Ljava.lang.String;@b59a28
at
org.apache.sling.jcr.resource.internal.helper.jcr.JcrResourceProvider.create(JcrResourceProvider.java:415)
at
org.apache.sling.resourceresolver.impl.ResourceResolverImpl.create(ResourceResolverImpl.java:1063)
at
org.apache.sling.servlets.post.impl.operations.AbstractCreateOperation.deepGetOrCreateNode(AbstractCreateOperation.java:537)
at
org.apache.sling.servlets.post.impl.operations.AbstractCreateOperation.processCreate(AbstractCreateOperation.java:109)
at
org.apache.sling.servlets.post.impl.operations.ModifyOperation.doRun(ModifyOperation.java:91)
... 64 more
Caused by: java.lang.IllegalArgumentException: Value for key jcr:mixinTypes
can't be put into node: [Ljava.lang.String;@b59a28
at
org.apache.sling.jcr.resource.internal.JcrModifiableValueMap.put(JcrModifiableValueMap.java:631)
at
org.apache.sling.jcr.resource.internal.helper.jcr.JcrResourceProvider.create(JcrResourceProvider.java:413)
... 68 more
Caused by: javax.jcr.nodetype.ConstraintViolationException: Item is protected.
at
org.apache.jackrabbit.oak.jcr.ItemImpl.checkProtected(ItemImpl.java:185)
at org.apache.jackrabbit.oak.jcr.NodeImpl$33.perform(NodeImpl.java:1513)
at org.apache.jackrabbit.oak.jcr.NodeImpl$33.perform(NodeImpl.java:1493)
at
org.apache.jackrabbit.oak.jcr.SessionDelegate.perform(SessionDelegate.java:136)
at
org.apache.jackrabbit.oak.jcr.NodeImpl.internalSetProperty(NodeImpl.java:1493)
at org.apache.jackrabbit.oak.jcr.NodeImpl.setProperty(NodeImpl.java:343)
at
org.apache.sling.jcr.resource.internal.JcrModifiableValueMap.put(JcrModifiableValueMap.java:626)
... 69 more
> Illegal change of protected property in PostServletVersionableTest
> ------------------------------------------------------------------
>
> Key: SLING-2761
> URL: https://issues.apache.org/jira/browse/SLING-2761
> Project: Sling
> Issue Type: Bug
> Components: Testing
> Reporter: Alex Parvulescu
>
> While running some of the integration tests using Oak as a repository impl, I
> ran into some ConstraintViolationExceptions with the
> PostServletVersionableTest.
> This uncovered an issue in Jackrabbit JCR-3526 where you can change protected
> properties on new items, which is in fact considered illegal.
> Coming back to the PostServletVersionableTest, the test setup uses this trick
> to set up the content and I think it should be changed.
> On a more general note fixing JCR-3526 could turn up even more problems that
> the aforementioned test, so it would be nice to have some more thoughts on
> this on how big the problem could really be.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira