Foren
Error in folder creation
Madasamy P, geändert vor 7 Jahren.
Error in folder creation
Junior Member Beiträge: 90 Beitrittsdatum: 27.07.16 Neueste Beiträge
I'm using DLFolderLocalServiceUtil for folder creation in Documents and Media as,
DLFolder folder = null;
folder = DLFolderLocalServiceUtil.addFolder(userId, groupId, repositoryId, mountPoint, parentFolderId, journalName , description, hidden, serviceContext);
long cFoldId = folder.getFolderId();
folder = DLFolderLocalServiceUtil.addFolder(userId, groupId, repositoryId, mountPoint, cFoldId, articleName , description, hidden, serviceContext);
long bFoldId = folder.getFolderId();
folder =DLFolderLocalServiceUtil.addFolder(userId, groupId, repositoryId, mountPoint,
bFoldId, file1, description, hidden, serviceContext);
When multi-user accessing the same query as above in server , sometimes it creates the folder
sometimes the query don't create the folder inside Documents and Media
What is the reason for this issue ?
DLFolder folder = null;
folder = DLFolderLocalServiceUtil.addFolder(userId, groupId, repositoryId, mountPoint, parentFolderId, journalName , description, hidden, serviceContext);
long cFoldId = folder.getFolderId();
folder = DLFolderLocalServiceUtil.addFolder(userId, groupId, repositoryId, mountPoint, cFoldId, articleName , description, hidden, serviceContext);
long bFoldId = folder.getFolderId();
folder =DLFolderLocalServiceUtil.addFolder(userId, groupId, repositoryId, mountPoint,
bFoldId, file1, description, hidden, serviceContext);
When multi-user accessing the same query as above in server , sometimes it creates the folder
sometimes the query don't create the folder inside Documents and Media
What is the reason for this issue ?
Suresh Nimmakayala, geändert vor 6 Jahren.
RE: Error in folder creation
Liferay Master Beiträge: 690 Beitrittsdatum: 18.08.04 Neueste Beiträge
what is the error showing?
Madasamy P, geändert vor 6 Jahren.
RE: Error in folder creation
Junior Member Beiträge: 90 Beitrittsdatum: 27.07.16 Neueste Beiträge
No error can be shown
The folder creation was stopped at intermediate and folder created not according to user perspective
The folder creation was stopped at intermediate and folder created not according to user perspective
Suresh Nimmakayala, geändert vor 6 Jahren.
RE: Error in folder creation
Liferay Master Beiträge: 690 Beitrittsdatum: 18.08.04 Neueste Beiträge
Strange use try catch block to find where it is stopping and one more thing check folder exist first before creating a folder
BTW i used DLAppLocalServiceUtil.addFolder
HTH
BTW i used DLAppLocalServiceUtil.addFolder
HTH
Madasamy P, geändert vor 6 Jahren.
RE: Error in folder creation
Junior Member Beiträge: 90 Beitrittsdatum: 27.07.16 Neueste Beiträge
I've found an error
I have used an parentFolderId as global public variable , so it could be collided with each other user's folderId
When I declared fodlerId inside method it could be perfectly works
Anyway thanks Suresh for your answers
I have used an parentFolderId as global public variable , so it could be collided with each other user's folderId
When I declared fodlerId inside method it could be perfectly works
Anyway thanks Suresh for your answers