Details
-
Bug
-
Status: Closed
-
Normal
-
Resolution: Fixed
-
None
-
None
-
None
-
Turing Team 187
Description
Turns out that
workflowSession.getWorkspace().getVersionManager().restore(version, false);
can result in the following problem:
^[[19~[INFO] [talledLocalContainer] 18.07.2018 17:03:52 INFO http-nio-8080-exec-4 [StdWorkflow.invoke:225] Workflow call failed
[INFO] [talledLocalContainer] java.lang.ClassCastException: org.hippoecm.repository.impl.VersionDecorator cannot be cast to org.apache.jackrabbit.core.version.VersionImpl
[INFO] [talledLocalContainer] at org.apache.jackrabbit.core.VersionManagerImpl$6.perform(VersionManagerImpl.java:239) ~[jackrabbit-core-2.16.2-h1.jar:2.16.2-h1]
[INFO] [talledLocalContainer] at org.apache.jackrabbit.core.session.SessionState.perform(SessionState.java:216) ~[jackrabbit-core-2.16.2-h1.jar:2.16.2-h1]
[INFO] [talledLocalContainer] at org.apache.jackrabbit.core.VersionManagerImpl.perform(VersionManagerImpl.java:96) ~[jackrabbit-core-2.16.2-h1.jar:2.16.2-h1]
[INFO] [talledLocalContainer] at org.apache.jackrabbit.core.VersionManagerImpl.restore(VersionManagerImpl.java:225) ~[jackrabbit-core-2.16.2-h1.jar:2.16.2-h1]
[INFO] [talledLocalContainer] at org.apache.jackrabbit.core.VersionManagerImpl.restore(VersionManagerImpl.java:217) ~[jackrabbit-core-2.16.2-h1.jar:2.16.2-h1]
[INFO] [talledLocalContainer] at org.hippoecm.repository.impl.VersionManagerDecorator.restore(VersionManagerDecorator.java:120) ~[hippo-repository-engine-5.5.0-campaigns-psp1-SNAPSHOT.jar:5.5.0-campaigns-psp1-SNAPSHOT]
[INFO] [talledLocalContainer] at org.onehippo.repository.documentworkflow.task.RestoreVersionToBranchTask.doExecute(RestoreVersionToBranchTask.java:67) ~[hippo-repository-workflow-5.5.0-campaigns-psp1-SNAPSHOT.jar:5.5.0-campaigns-psp1-SNAPSHOT]
[INFO] [talledLocalContainer] at org.onehippo.repository.documentworkflow.task.AbstractDocumentTask.execute(AbstractDocumentTask.java:93) ~[hippo-repository-workflow-5.5.0-campaigns-psp1-SNAPSHOT.jar:5.5.0-campaigns-psp1-SNAPSHOT]
instead of trying to fix the decorator root cause the following does work:
workflowSession.getWorkspace().getVersionManager().restore(targetNode.getPath(), version.getName(), false);
Attachments
Issue Links
- is a result of
-
REPO-2046 When restoring a document via revision history, make sure to correctly handle branch logic
- Closed