You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@chemistry.apache.org by "Patrick Balm (JIRA)" <ji...@apache.org> on 2011/05/12 11:11:54 UTC

[jira] [Created] (CMIS-373) getContentStream() throws CmisNotFoundException on existing document (Alfresco)

getContentStream() throws CmisNotFoundException on existing document (Alfresco)
-------------------------------------------------------------------------------

                 Key: CMIS-373
                 URL: https://issues.apache.org/jira/browse/CMIS-373
             Project: Chemistry
          Issue Type: Bug
          Components: opencmis-client
    Affects Versions: OpenCMIS 0.3.0
         Environment: Alfresco 3.4d, opencmis-0.3.0-SNAPSHOT
            Reporter: Patrick Balm


When I upload a document via FTP into Alfresco I execute an Alfresco rule
that extracts the objectId (eg  "workspace://SpacesStore/b326b5d4-24aa-4cec-879d-f772e65d0375") via JavaScript.
When I use this objectId to search the document, I get a CmisNotFoundException.        

CmisObject object = getSession().getObject(getSession().createObjectId("workspace://SpacesStore/b326b5d4-24aa-4cec-879d-f772e65d0375"));
Document document = (Document) object;

// throws CmisNotFoundException
InputStream stream = document.getContentStream().getStream();

The documentation (http://wiki.alfresco.com/wiki/CMIS#Document_Objects) says 
"
Document objects represent the enties that we really come to the repository for, the content. Document objects (and only document objects) may have Content Streams (the actual file associated with the document). 
...
"

If I use above approach and code the exception is thrown, also the MimeType is not set for the document.
Test with PropertyData<?> show this:

pd.getDisplayName()=Content Stream MIME Type
pd.getFirstValue()=
pd.getId()=cmis:contentStreamMimeType
pd.getLocalName()=null
pd.getQueryName()=cmis:contentStreamMimeType
...
value of cmis:contentStreamLength = 0
value of cmis:contentStreamId = null


When I iterate over the complete folder in which the doc resides it does not throw CmisNotFoundException and correctly
returns the stream.

Picnic? (problem in chair, not in computer) or something else?

tia

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Closed] (CMIS-373) getContentStream() throws CmisNotFoundException on existing document (Alfresco)

Posted by "Patrick Balm (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CMIS-373?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Patrick Balm closed CMIS-373.
-----------------------------


not related to opencmis

> getContentStream() throws CmisNotFoundException on existing document (Alfresco)
> -------------------------------------------------------------------------------
>
>                 Key: CMIS-373
>                 URL: https://issues.apache.org/jira/browse/CMIS-373
>             Project: Chemistry
>          Issue Type: Bug
>          Components: opencmis-client
>    Affects Versions: OpenCMIS 0.3.0
>         Environment: Alfresco 3.4d, opencmis-0.3.0-SNAPSHOT
>            Reporter: Patrick Balm
>            Assignee: Florian Müller
>
> When I upload a document via FTP into Alfresco I execute an Alfresco rule
> that extracts the objectId (eg  "workspace://SpacesStore/b326b5d4-24aa-4cec-879d-f772e65d0375") via JavaScript.
> When I use this objectId to search the document, I get a CmisNotFoundException.        
> CmisObject object = getSession().getObject(getSession().createObjectId("workspace://SpacesStore/b326b5d4-24aa-4cec-879d-f772e65d0375"));
> Document document = (Document) object;
> // throws CmisNotFoundException
> InputStream stream = document.getContentStream().getStream();
> The documentation (http://wiki.alfresco.com/wiki/CMIS#Document_Objects) says 
> "
> Document objects represent the enties that we really come to the repository for, the content. Document objects (and only document objects) may have Content Streams (the actual file associated with the document). 
> ...
> "
> If I use above approach and code the exception is thrown, also the MimeType is not set for the document.
> Test with PropertyData<?> show this:
> pd.getDisplayName()=Content Stream MIME Type
> pd.getFirstValue()=
> pd.getId()=cmis:contentStreamMimeType
> pd.getLocalName()=null
> pd.getQueryName()=cmis:contentStreamMimeType
> ...
> value of cmis:contentStreamLength = 0
> value of cmis:contentStreamId = null
> When I iterate over the complete folder in which the doc resides it does not throw CmisNotFoundException and correctly
> returns the stream.
> Picnic? (problem in chair, not in computer) or something else?
> tia

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Resolved] (CMIS-373) getContentStream() throws CmisNotFoundException on existing document (Alfresco)

Posted by "Florian Müller (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CMIS-373?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Florian Müller resolved CMIS-373.
---------------------------------

    Resolution: Not A Problem
      Assignee: Florian Müller

That's an Alfresco specific behavior and not an OpenCMIS issue.

> getContentStream() throws CmisNotFoundException on existing document (Alfresco)
> -------------------------------------------------------------------------------
>
>                 Key: CMIS-373
>                 URL: https://issues.apache.org/jira/browse/CMIS-373
>             Project: Chemistry
>          Issue Type: Bug
>          Components: opencmis-client
>    Affects Versions: OpenCMIS 0.3.0
>         Environment: Alfresco 3.4d, opencmis-0.3.0-SNAPSHOT
>            Reporter: Patrick Balm
>            Assignee: Florian Müller
>
> When I upload a document via FTP into Alfresco I execute an Alfresco rule
> that extracts the objectId (eg  "workspace://SpacesStore/b326b5d4-24aa-4cec-879d-f772e65d0375") via JavaScript.
> When I use this objectId to search the document, I get a CmisNotFoundException.        
> CmisObject object = getSession().getObject(getSession().createObjectId("workspace://SpacesStore/b326b5d4-24aa-4cec-879d-f772e65d0375"));
> Document document = (Document) object;
> // throws CmisNotFoundException
> InputStream stream = document.getContentStream().getStream();
> The documentation (http://wiki.alfresco.com/wiki/CMIS#Document_Objects) says 
> "
> Document objects represent the enties that we really come to the repository for, the content. Document objects (and only document objects) may have Content Streams (the actual file associated with the document). 
> ...
> "
> If I use above approach and code the exception is thrown, also the MimeType is not set for the document.
> Test with PropertyData<?> show this:
> pd.getDisplayName()=Content Stream MIME Type
> pd.getFirstValue()=
> pd.getId()=cmis:contentStreamMimeType
> pd.getLocalName()=null
> pd.getQueryName()=cmis:contentStreamMimeType
> ...
> value of cmis:contentStreamLength = 0
> value of cmis:contentStreamId = null
> When I iterate over the complete folder in which the doc resides it does not throw CmisNotFoundException and correctly
> returns the stream.
> Picnic? (problem in chair, not in computer) or something else?
> tia

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira