AnsweredAssumed Answered

FileFolderService sort problem

Question asked by beslan on Mar 1, 2013
Latest reply on Mar 5, 2013 by beslan
Hi,

Following error is occurring when I call FileFolderService.list() with folderOnly and sort enabled.


   NodeRef testNode = new NodeRef(spacesStoreRef, objectId);

   List<Pair<QName, Boolean>> sortProps = new ArrayList<Pair<QName, Boolean>>();
   sortProps.add(new Pair<QName, Boolean>(ContentModel.PROP_NAME, true));

   PagingRequest pageRequest = new PagingRequest(skipCount, itemLimit, null);
   pageRequest.setRequestTotalCountMax(itemLimit);

   PagingResults<FileInfo> fileInfoList = this.getServiceRegistry().getFileFolderService().list(testNode, false, true, null, null, pageRequest);



org.springframework.transaction.UnexpectedRollbackException: Transaction rolled back because it has been marked as rollback-only
org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:717)
org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:393)
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:120)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
$Proxy111.list(Unknown Source)
com.universal.alfresco.api.ContentManagerApiImpl.getOnlyFolders(ContentManagerApiImpl.java:366)


Problem is occurring only in repositories that upgraded from 3.4c to 4.2b. File sorting with name is also ok.

Thanks,

Beslan.

Outcomes