I am trying to copy more than 150+ Pages(and CHILD) from one Space to another space by using deepCopyPage (Interface PageManager ) but getting deepCopyInternal net.sf.hibernate.TransactionException: Transaction was marked for rollback only; cannot commit

ERROR [http-nio2-8080-exec-357] [dao.bulk.copy.DefaultBulkPageCopy] deepCopyInternal net.sf.hibernate.TransactionException: Transaction was marked for rollback only; cannot commit

code

 txTemplate.execute(new TransactionCallback() {
            @Override
        public Object doInTransaction() {
            
                         PageCopyOptions pageCopyOptions = PageCopyOptions.builder()
                                 .withCopyAttachment(true)
                                 .withCopyLabel(true)
                                 .withContentProperty(true)
                                 .withCopyPermission(true)
                                 .withUser(currentUser)
                                 .withProgressMeter(new ProgressMeter())
                                 .build();
                         Page originalPage = originalSpace.getHomePage();

                         pageManager.deepCopyPage(pageCopyOptions, originalPage, homePage);