AnsweredAssumed Answered

In Alfresco, getting blank file when retrieving root version

Question asked by unknown-user on May 9, 2014
In Alfresco, I am trying to retrieve previous versions of files using this code:

        VersionHistory history = this.versionService
                .getVersionHistory(nodeRef);

        Version version = history.getVersion(previousDeployedVersion);
        NodeRef previousNode = version.getFrozenStateNodeRef();
It's working until I get to version 1.0, then I get blank content. Is this normal behavior? I also tried getRootVersion() but got the same results.

When I look at the file's details page, version history, I can "view" the contents of the different versions. Version 1.0 show blank here also.

This behavior was seen on files that were added to Alfresco through a virtual webdav drive. I found that when I added a file through
Alfresco Explorer using the "Add content" interface, everything works as I expected and version 1.0 can be read correctly.
Can anyone suggest what is causing this difference? Thanks

Outcomes