[ 
https://issues.apache.org/jira/browse/SLING-4267?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14258577#comment-14258577
 ] 

Robert Munteanu commented on SLING-4267:
----------------------------------------

[[email protected]] - I've tried enabling the tests ( see attached patch 
) but I get some errors which I think are due to faulty data. 

First example is a ":jcr:data" property:

{code}
        "file": {
          "jcr:primaryType": "nt:file",
          "jcr:createdBy": "admin",
          "jcr:created": "Thu Aug 07 2014 16:32:59 GMT+0200",
          "jcr:content": {
            "jcr:primaryType": "nt:resource",
            "jcr:lastModifiedBy": "anonymous",
            "jcr:mimeType": "image/jpeg",
            "jcr:lastModified": "Thu Aug 07 2014 16:32:59 GMT+0200",
            ":jcr:data": 24377,
            "jcr:uuid": "eda76d00-b2cd-4b59-878f-c33f71ceaddc"
          }
{code}

I don't think that ":jcr:data" should be a real property ; are we really 
supposed to import files using JSON?

The second example is the jcr:isCheckedOut property. That again does not sound 
like something we should import. Thoughts?

> Json content import does not work for the JCR_JACKRABBIT resource resolver 
> type
> -------------------------------------------------------------------------------
>
>                 Key: SLING-4267
>                 URL: https://issues.apache.org/jira/browse/SLING-4267
>             Project: Sling
>          Issue Type: Bug
>          Components: Testing
>    Affects Versions: Testing Sling Mock Jackrabbit 0.1.0
>            Reporter: Robert Munteanu
>             Fix For: Testing Sling Mock Jackrabbit 0.2.0
>
>         Attachments: SLING-4267-1.diff
>
>
> The tests are ignored for now and the implementation fails when run in a test 
> case. The stack trace is similar to:
> {noformat}java.lang.NullPointerException
>       at 
> org.apache.sling.resourceresolver.impl.ResourceResolverImpl.create(ResourceResolverImpl.java:1044)
>       at 
> org.apache.sling.testing.mock.sling.loader.ContentLoader.createResourceHierarchy(ContentLoader.java:183)
>       at 
> org.apache.sling.testing.mock.sling.loader.ContentLoader.json(ContentLoader.java:155)
>       at 
> org.apache.sling.testing.mock.sling.loader.ContentLoader.json(ContentLoader.java:120){noformat}
> The tests, on the other hand, complain that {noformat}app: is not a 
> registered namespace prefix.{noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to