Marcelo Ruiz Camauër 14 Years Ago Very interesting! So using these hooks, would it be possible to substitute Jackrabbit for Alfresco transparently, so that the DL portlet continues to just work as is? Please sign in to reply. Reply as... Cancel Minhchau Dang Marcelo Ruiz Camauër 14 Years Ago That is correct, assuming you've created (or are in the process of creating) a document library Hook which interacts with Alfresco.I don't believe we officially support this level of integration out of the box, since we're still waiting on the CMIS specification to finalize. Please sign in to reply. Reply as... Cancel Ray Augé Minhchau Dang 14 Years Ago Minhchau buddy, migration UI? Please sign in to reply. Reply as... Cancel Minhchau Dang Ray Augé 14 Years Ago - Edited Updated with a sample portlet that provides a migration UI. Please sign in to reply. Reply as... Cancel Jonas Yuan Minhchau Dang 14 Years Ago Hi Minhchau, nice work. It would be nice that a document library Hook interacting with Alfresco could be supported in nature. Thus the integration of Liferay and Alfresco would be simple. By the way, when does the CMIS specification get finalized? Thanks. Please sign in to reply. Reply as... Cancel
Minhchau Dang Marcelo Ruiz Camauër 14 Years Ago That is correct, assuming you've created (or are in the process of creating) a document library Hook which interacts with Alfresco.I don't believe we officially support this level of integration out of the box, since we're still waiting on the CMIS specification to finalize. Please sign in to reply. Reply as... Cancel Ray Augé Minhchau Dang 14 Years Ago Minhchau buddy, migration UI? Please sign in to reply. Reply as... Cancel Minhchau Dang Ray Augé 14 Years Ago - Edited Updated with a sample portlet that provides a migration UI. Please sign in to reply. Reply as... Cancel Jonas Yuan Minhchau Dang 14 Years Ago Hi Minhchau, nice work. It would be nice that a document library Hook interacting with Alfresco could be supported in nature. Thus the integration of Liferay and Alfresco would be simple. By the way, when does the CMIS specification get finalized? Thanks. Please sign in to reply. Reply as... Cancel
Ray Augé Minhchau Dang 14 Years Ago Minhchau buddy, migration UI? Please sign in to reply. Reply as... Cancel Minhchau Dang Ray Augé 14 Years Ago - Edited Updated with a sample portlet that provides a migration UI. Please sign in to reply. Reply as... Cancel
Minhchau Dang Ray Augé 14 Years Ago - Edited Updated with a sample portlet that provides a migration UI. Please sign in to reply. Reply as... Cancel
Jonas Yuan Minhchau Dang 14 Years Ago Hi Minhchau, nice work. It would be nice that a document library Hook interacting with Alfresco could be supported in nature. Thus the integration of Liferay and Alfresco would be simple. By the way, when does the CMIS specification get finalized? Thanks. Please sign in to reply. Reply as... Cancel
Sampsa Sohlman 14 Years Ago Good work!! While ago I was looking something like this, but I was too lazy to implement my self. Please sign in to reply. Reply as... Cancel
Jim Klo 14 Years Ago Minhchau, I've modified your sample for 5.1.1, in addition to some simple 'down and dirty' multi-threaded modifications. (I've got a lot of documents to migrate). I'd be happy to share, any way I can upload or get them to you? Please sign in to reply. Reply as... Cancel Minhchau Dang Jim Klo 14 Years Ago - Edited Of course! That's the main benefit of sharing things via open source, right?I've added a new share folder to my documents page which you should be able to upload to (I've given your user the ability to add and update documents). Please sign in to reply. Reply as... Cancel Jim Klo Minhchau Dang 14 Years Ago - Edited So here's my variant, which has been modified to work with 5.1.1 and uses a simple threaded model. I wouldn't recommend to anyone to manage their own threads this way normally. But for something that's most likely going to be run in a controlled environment, should be fine. I'm assuming one knows how to hookup an Action to the main servlet. The CodeOn my HW, the original version was migrating about 10 files / minute (most of that time pulling files out of the DB via JCR). My threaded version running at 30 threads, is migrating approx 50 files / minute on the same hardware. Enjoy! Please sign in to reply. Reply as... Cancel Carlos del Castillo Jim Klo 14 Years Ago What about the attachments on the wiki pages? Is it possible to do something similar? any ideas on where to start?Thanks! Please sign in to reply. Reply as... Cancel Minhchau Dang Carlos del Castillo 14 Years Ago By default, wiki page attachments and forum message attachments are stored in the document library in a hidden system folder.Therefore, as a side-effect (or as an added bonus, depending on how you view it), the process described in this blog entry will also change how both wiki attachments and forum message attachments are stored by Liferay. Please sign in to reply. Reply as... Cancel Carlos del Castillo Minhchau Dang 14 Years Ago I'm testing the tool to migrate the documents from JCR (database persistence) to the file system. The Document Library documents were updated fine, but unfortunately the wiki attachments were not. After the upgrade the wiki page I was using for tests has 0 attachments, originally had 2. I'm guessing I would have to add the hidden folder to code migrating the files. Do you know how can I identify that folder and the other question is if there is a hidden folder for every wiki/company?Thanks! Please sign in to reply. Reply as... Cancel Minhchau Dang Carlos del Castillo 14 Years Ago - Edited There is a folder in every company that has an id of zero, and that's the 'system' folder for that company. However, now that I think about it, it's a virtual folder, so there probably isn't a formal entry in the DLFolder table, and it probably wouldn't be returned by DLFolderLocalServiceUtil. That was an oversight on my part.So to migrate it, call DLFileEntryLocalServiceUtil.getFileEntries(0), which should return all the system folder entries across all companies. If it works, the DLFileEntry objects will contain the appropriate companyId, which should be the only other piece of information you need to do provide to the hook.I'll try this myself, and if it works, I'll update the linked samples. =) Please sign in to reply. Reply as... Cancel Carlos del Castillo Minhchau Dang 14 Years Ago Sounds great! I think I'll wait, you will have it a lot faster than me. Thanks again. Please sign in to reply. Reply as... Cancel Minhchau Dang Carlos del Castillo 14 Years Ago DLFileEntry objects aren't created for system folder entries either, so that strategy didn't work. There may be a cleaner way to get a list of the files in the hidden system folder, but I haven't come up with one yet.I've updated the sample code with an example of how wiki attachments and message board posts can be migrated using the getAttachmentsFiles() methods of the wiki pages and the message board post objects, but anything else that's put in the system won't be migrated unless you explicitly iterate over them. Please sign in to reply. Reply as... Cancel Carlos del Castillo Minhchau Dang 14 Years Ago Thank you so much, I'll take a look into the new code. Thanks for the prompt reply! Please sign in to reply. Reply as... Cancel
Minhchau Dang Jim Klo 14 Years Ago - Edited Of course! That's the main benefit of sharing things via open source, right?I've added a new share folder to my documents page which you should be able to upload to (I've given your user the ability to add and update documents). Please sign in to reply. Reply as... Cancel Jim Klo Minhchau Dang 14 Years Ago - Edited So here's my variant, which has been modified to work with 5.1.1 and uses a simple threaded model. I wouldn't recommend to anyone to manage their own threads this way normally. But for something that's most likely going to be run in a controlled environment, should be fine. I'm assuming one knows how to hookup an Action to the main servlet. The CodeOn my HW, the original version was migrating about 10 files / minute (most of that time pulling files out of the DB via JCR). My threaded version running at 30 threads, is migrating approx 50 files / minute on the same hardware. Enjoy! Please sign in to reply. Reply as... Cancel Carlos del Castillo Jim Klo 14 Years Ago What about the attachments on the wiki pages? Is it possible to do something similar? any ideas on where to start?Thanks! Please sign in to reply. Reply as... Cancel Minhchau Dang Carlos del Castillo 14 Years Ago By default, wiki page attachments and forum message attachments are stored in the document library in a hidden system folder.Therefore, as a side-effect (or as an added bonus, depending on how you view it), the process described in this blog entry will also change how both wiki attachments and forum message attachments are stored by Liferay. Please sign in to reply. Reply as... Cancel Carlos del Castillo Minhchau Dang 14 Years Ago I'm testing the tool to migrate the documents from JCR (database persistence) to the file system. The Document Library documents were updated fine, but unfortunately the wiki attachments were not. After the upgrade the wiki page I was using for tests has 0 attachments, originally had 2. I'm guessing I would have to add the hidden folder to code migrating the files. Do you know how can I identify that folder and the other question is if there is a hidden folder for every wiki/company?Thanks! Please sign in to reply. Reply as... Cancel Minhchau Dang Carlos del Castillo 14 Years Ago - Edited There is a folder in every company that has an id of zero, and that's the 'system' folder for that company. However, now that I think about it, it's a virtual folder, so there probably isn't a formal entry in the DLFolder table, and it probably wouldn't be returned by DLFolderLocalServiceUtil. That was an oversight on my part.So to migrate it, call DLFileEntryLocalServiceUtil.getFileEntries(0), which should return all the system folder entries across all companies. If it works, the DLFileEntry objects will contain the appropriate companyId, which should be the only other piece of information you need to do provide to the hook.I'll try this myself, and if it works, I'll update the linked samples. =) Please sign in to reply. Reply as... Cancel Carlos del Castillo Minhchau Dang 14 Years Ago Sounds great! I think I'll wait, you will have it a lot faster than me. Thanks again. Please sign in to reply. Reply as... Cancel Minhchau Dang Carlos del Castillo 14 Years Ago DLFileEntry objects aren't created for system folder entries either, so that strategy didn't work. There may be a cleaner way to get a list of the files in the hidden system folder, but I haven't come up with one yet.I've updated the sample code with an example of how wiki attachments and message board posts can be migrated using the getAttachmentsFiles() methods of the wiki pages and the message board post objects, but anything else that's put in the system won't be migrated unless you explicitly iterate over them. Please sign in to reply. Reply as... Cancel Carlos del Castillo Minhchau Dang 14 Years Ago Thank you so much, I'll take a look into the new code. Thanks for the prompt reply! Please sign in to reply. Reply as... Cancel
Jim Klo Minhchau Dang 14 Years Ago - Edited So here's my variant, which has been modified to work with 5.1.1 and uses a simple threaded model. I wouldn't recommend to anyone to manage their own threads this way normally. But for something that's most likely going to be run in a controlled environment, should be fine. I'm assuming one knows how to hookup an Action to the main servlet. The CodeOn my HW, the original version was migrating about 10 files / minute (most of that time pulling files out of the DB via JCR). My threaded version running at 30 threads, is migrating approx 50 files / minute on the same hardware. Enjoy! Please sign in to reply. Reply as... Cancel Carlos del Castillo Jim Klo 14 Years Ago What about the attachments on the wiki pages? Is it possible to do something similar? any ideas on where to start?Thanks! Please sign in to reply. Reply as... Cancel Minhchau Dang Carlos del Castillo 14 Years Ago By default, wiki page attachments and forum message attachments are stored in the document library in a hidden system folder.Therefore, as a side-effect (or as an added bonus, depending on how you view it), the process described in this blog entry will also change how both wiki attachments and forum message attachments are stored by Liferay. Please sign in to reply. Reply as... Cancel Carlos del Castillo Minhchau Dang 14 Years Ago I'm testing the tool to migrate the documents from JCR (database persistence) to the file system. The Document Library documents were updated fine, but unfortunately the wiki attachments were not. After the upgrade the wiki page I was using for tests has 0 attachments, originally had 2. I'm guessing I would have to add the hidden folder to code migrating the files. Do you know how can I identify that folder and the other question is if there is a hidden folder for every wiki/company?Thanks! Please sign in to reply. Reply as... Cancel Minhchau Dang Carlos del Castillo 14 Years Ago - Edited There is a folder in every company that has an id of zero, and that's the 'system' folder for that company. However, now that I think about it, it's a virtual folder, so there probably isn't a formal entry in the DLFolder table, and it probably wouldn't be returned by DLFolderLocalServiceUtil. That was an oversight on my part.So to migrate it, call DLFileEntryLocalServiceUtil.getFileEntries(0), which should return all the system folder entries across all companies. If it works, the DLFileEntry objects will contain the appropriate companyId, which should be the only other piece of information you need to do provide to the hook.I'll try this myself, and if it works, I'll update the linked samples. =) Please sign in to reply. Reply as... Cancel Carlos del Castillo Minhchau Dang 14 Years Ago Sounds great! I think I'll wait, you will have it a lot faster than me. Thanks again. Please sign in to reply. Reply as... Cancel Minhchau Dang Carlos del Castillo 14 Years Ago DLFileEntry objects aren't created for system folder entries either, so that strategy didn't work. There may be a cleaner way to get a list of the files in the hidden system folder, but I haven't come up with one yet.I've updated the sample code with an example of how wiki attachments and message board posts can be migrated using the getAttachmentsFiles() methods of the wiki pages and the message board post objects, but anything else that's put in the system won't be migrated unless you explicitly iterate over them. Please sign in to reply. Reply as... Cancel Carlos del Castillo Minhchau Dang 14 Years Ago Thank you so much, I'll take a look into the new code. Thanks for the prompt reply! Please sign in to reply. Reply as... Cancel
Carlos del Castillo Jim Klo 14 Years Ago What about the attachments on the wiki pages? Is it possible to do something similar? any ideas on where to start?Thanks! Please sign in to reply. Reply as... Cancel Minhchau Dang Carlos del Castillo 14 Years Ago By default, wiki page attachments and forum message attachments are stored in the document library in a hidden system folder.Therefore, as a side-effect (or as an added bonus, depending on how you view it), the process described in this blog entry will also change how both wiki attachments and forum message attachments are stored by Liferay. Please sign in to reply. Reply as... Cancel Carlos del Castillo Minhchau Dang 14 Years Ago I'm testing the tool to migrate the documents from JCR (database persistence) to the file system. The Document Library documents were updated fine, but unfortunately the wiki attachments were not. After the upgrade the wiki page I was using for tests has 0 attachments, originally had 2. I'm guessing I would have to add the hidden folder to code migrating the files. Do you know how can I identify that folder and the other question is if there is a hidden folder for every wiki/company?Thanks! Please sign in to reply. Reply as... Cancel Minhchau Dang Carlos del Castillo 14 Years Ago - Edited There is a folder in every company that has an id of zero, and that's the 'system' folder for that company. However, now that I think about it, it's a virtual folder, so there probably isn't a formal entry in the DLFolder table, and it probably wouldn't be returned by DLFolderLocalServiceUtil. That was an oversight on my part.So to migrate it, call DLFileEntryLocalServiceUtil.getFileEntries(0), which should return all the system folder entries across all companies. If it works, the DLFileEntry objects will contain the appropriate companyId, which should be the only other piece of information you need to do provide to the hook.I'll try this myself, and if it works, I'll update the linked samples. =) Please sign in to reply. Reply as... Cancel Carlos del Castillo Minhchau Dang 14 Years Ago Sounds great! I think I'll wait, you will have it a lot faster than me. Thanks again. Please sign in to reply. Reply as... Cancel Minhchau Dang Carlos del Castillo 14 Years Ago DLFileEntry objects aren't created for system folder entries either, so that strategy didn't work. There may be a cleaner way to get a list of the files in the hidden system folder, but I haven't come up with one yet.I've updated the sample code with an example of how wiki attachments and message board posts can be migrated using the getAttachmentsFiles() methods of the wiki pages and the message board post objects, but anything else that's put in the system won't be migrated unless you explicitly iterate over them. Please sign in to reply. Reply as... Cancel Carlos del Castillo Minhchau Dang 14 Years Ago Thank you so much, I'll take a look into the new code. Thanks for the prompt reply! Please sign in to reply. Reply as... Cancel
Minhchau Dang Carlos del Castillo 14 Years Ago By default, wiki page attachments and forum message attachments are stored in the document library in a hidden system folder.Therefore, as a side-effect (or as an added bonus, depending on how you view it), the process described in this blog entry will also change how both wiki attachments and forum message attachments are stored by Liferay. Please sign in to reply. Reply as... Cancel Carlos del Castillo Minhchau Dang 14 Years Ago I'm testing the tool to migrate the documents from JCR (database persistence) to the file system. The Document Library documents were updated fine, but unfortunately the wiki attachments were not. After the upgrade the wiki page I was using for tests has 0 attachments, originally had 2. I'm guessing I would have to add the hidden folder to code migrating the files. Do you know how can I identify that folder and the other question is if there is a hidden folder for every wiki/company?Thanks! Please sign in to reply. Reply as... Cancel Minhchau Dang Carlos del Castillo 14 Years Ago - Edited There is a folder in every company that has an id of zero, and that's the 'system' folder for that company. However, now that I think about it, it's a virtual folder, so there probably isn't a formal entry in the DLFolder table, and it probably wouldn't be returned by DLFolderLocalServiceUtil. That was an oversight on my part.So to migrate it, call DLFileEntryLocalServiceUtil.getFileEntries(0), which should return all the system folder entries across all companies. If it works, the DLFileEntry objects will contain the appropriate companyId, which should be the only other piece of information you need to do provide to the hook.I'll try this myself, and if it works, I'll update the linked samples. =) Please sign in to reply. Reply as... Cancel Carlos del Castillo Minhchau Dang 14 Years Ago Sounds great! I think I'll wait, you will have it a lot faster than me. Thanks again. Please sign in to reply. Reply as... Cancel Minhchau Dang Carlos del Castillo 14 Years Ago DLFileEntry objects aren't created for system folder entries either, so that strategy didn't work. There may be a cleaner way to get a list of the files in the hidden system folder, but I haven't come up with one yet.I've updated the sample code with an example of how wiki attachments and message board posts can be migrated using the getAttachmentsFiles() methods of the wiki pages and the message board post objects, but anything else that's put in the system won't be migrated unless you explicitly iterate over them. Please sign in to reply. Reply as... Cancel Carlos del Castillo Minhchau Dang 14 Years Ago Thank you so much, I'll take a look into the new code. Thanks for the prompt reply! Please sign in to reply. Reply as... Cancel
Carlos del Castillo Minhchau Dang 14 Years Ago I'm testing the tool to migrate the documents from JCR (database persistence) to the file system. The Document Library documents were updated fine, but unfortunately the wiki attachments were not. After the upgrade the wiki page I was using for tests has 0 attachments, originally had 2. I'm guessing I would have to add the hidden folder to code migrating the files. Do you know how can I identify that folder and the other question is if there is a hidden folder for every wiki/company?Thanks! Please sign in to reply. Reply as... Cancel Minhchau Dang Carlos del Castillo 14 Years Ago - Edited There is a folder in every company that has an id of zero, and that's the 'system' folder for that company. However, now that I think about it, it's a virtual folder, so there probably isn't a formal entry in the DLFolder table, and it probably wouldn't be returned by DLFolderLocalServiceUtil. That was an oversight on my part.So to migrate it, call DLFileEntryLocalServiceUtil.getFileEntries(0), which should return all the system folder entries across all companies. If it works, the DLFileEntry objects will contain the appropriate companyId, which should be the only other piece of information you need to do provide to the hook.I'll try this myself, and if it works, I'll update the linked samples. =) Please sign in to reply. Reply as... Cancel Carlos del Castillo Minhchau Dang 14 Years Ago Sounds great! I think I'll wait, you will have it a lot faster than me. Thanks again. Please sign in to reply. Reply as... Cancel Minhchau Dang Carlos del Castillo 14 Years Ago DLFileEntry objects aren't created for system folder entries either, so that strategy didn't work. There may be a cleaner way to get a list of the files in the hidden system folder, but I haven't come up with one yet.I've updated the sample code with an example of how wiki attachments and message board posts can be migrated using the getAttachmentsFiles() methods of the wiki pages and the message board post objects, but anything else that's put in the system won't be migrated unless you explicitly iterate over them. Please sign in to reply. Reply as... Cancel Carlos del Castillo Minhchau Dang 14 Years Ago Thank you so much, I'll take a look into the new code. Thanks for the prompt reply! Please sign in to reply. Reply as... Cancel
Minhchau Dang Carlos del Castillo 14 Years Ago - Edited There is a folder in every company that has an id of zero, and that's the 'system' folder for that company. However, now that I think about it, it's a virtual folder, so there probably isn't a formal entry in the DLFolder table, and it probably wouldn't be returned by DLFolderLocalServiceUtil. That was an oversight on my part.So to migrate it, call DLFileEntryLocalServiceUtil.getFileEntries(0), which should return all the system folder entries across all companies. If it works, the DLFileEntry objects will contain the appropriate companyId, which should be the only other piece of information you need to do provide to the hook.I'll try this myself, and if it works, I'll update the linked samples. =) Please sign in to reply. Reply as... Cancel Carlos del Castillo Minhchau Dang 14 Years Ago Sounds great! I think I'll wait, you will have it a lot faster than me. Thanks again. Please sign in to reply. Reply as... Cancel Minhchau Dang Carlos del Castillo 14 Years Ago DLFileEntry objects aren't created for system folder entries either, so that strategy didn't work. There may be a cleaner way to get a list of the files in the hidden system folder, but I haven't come up with one yet.I've updated the sample code with an example of how wiki attachments and message board posts can be migrated using the getAttachmentsFiles() methods of the wiki pages and the message board post objects, but anything else that's put in the system won't be migrated unless you explicitly iterate over them. Please sign in to reply. Reply as... Cancel Carlos del Castillo Minhchau Dang 14 Years Ago Thank you so much, I'll take a look into the new code. Thanks for the prompt reply! Please sign in to reply. Reply as... Cancel
Carlos del Castillo Minhchau Dang 14 Years Ago Sounds great! I think I'll wait, you will have it a lot faster than me. Thanks again. Please sign in to reply. Reply as... Cancel Minhchau Dang Carlos del Castillo 14 Years Ago DLFileEntry objects aren't created for system folder entries either, so that strategy didn't work. There may be a cleaner way to get a list of the files in the hidden system folder, but I haven't come up with one yet.I've updated the sample code with an example of how wiki attachments and message board posts can be migrated using the getAttachmentsFiles() methods of the wiki pages and the message board post objects, but anything else that's put in the system won't be migrated unless you explicitly iterate over them. Please sign in to reply. Reply as... Cancel Carlos del Castillo Minhchau Dang 14 Years Ago Thank you so much, I'll take a look into the new code. Thanks for the prompt reply! Please sign in to reply. Reply as... Cancel
Minhchau Dang Carlos del Castillo 14 Years Ago DLFileEntry objects aren't created for system folder entries either, so that strategy didn't work. There may be a cleaner way to get a list of the files in the hidden system folder, but I haven't come up with one yet.I've updated the sample code with an example of how wiki attachments and message board posts can be migrated using the getAttachmentsFiles() methods of the wiki pages and the message board post objects, but anything else that's put in the system won't be migrated unless you explicitly iterate over them. Please sign in to reply. Reply as... Cancel Carlos del Castillo Minhchau Dang 14 Years Ago Thank you so much, I'll take a look into the new code. Thanks for the prompt reply! Please sign in to reply. Reply as... Cancel
Carlos del Castillo Minhchau Dang 14 Years Ago Thank you so much, I'll take a look into the new code. Thanks for the prompt reply! Please sign in to reply. Reply as... Cancel
Jonas Yuan 14 Years Ago - Edited Hi Minhchau, good job. There is an error of this portlet in EE 5.1.6. Thanks.Exception in thread "Thread-86" java.lang.NoSuchMethodError: com.liferay.documentlibrary.util.Hook.updateFile(JLjava/lang/String;JJLjava/lang/String;DLjava/lang/String;JLjava/lang/String;Ljava/util/Date;[Ljava/lang/String;[Ljava/lang/String;Ljava/io/InputStream;)V Please sign in to reply. Reply as... Cancel Minhchau Dang Jonas Yuan 14 Years Ago The sample portlet was written against 5.2.x, so if you wish to use it against 5.1.x (like Jim Klo), you'll need to do some rewriting to use the correct Hook API. I'll go ahead and clarify the original blog post. Please sign in to reply. Reply as... Cancel Jonas Yuan Minhchau Dang 14 Years Ago Hi Minhchau, Thank you. Could you please provide the sample portlet against 5.1.x? This would be useful ... Please sign in to reply. Reply as... Cancel Jonas Yuan Jonas Yuan 14 Years Ago The following hooks are stayed in portal-impl of versions 5.1 and 5.2;com.liferay.documentlibrary.util.FileSystemHook;com.liferay.documentlibrary.util.Hook;com.liferay.documentlibrary.util.JCRHook;Thus the sample portlet you provided in Plugins SDK has to refer to portal-impl.jar. How to configure it in plugins SDK? In 5.3, com.liferay.documentlibrary.util.Hook has been moved to portal-service. Is it a good idea to move FileSystemHook and JCRHook to portal-service? ThanksJonas Yuan Please sign in to reply. Reply as... Cancel
Minhchau Dang Jonas Yuan 14 Years Ago The sample portlet was written against 5.2.x, so if you wish to use it against 5.1.x (like Jim Klo), you'll need to do some rewriting to use the correct Hook API. I'll go ahead and clarify the original blog post. Please sign in to reply. Reply as... Cancel Jonas Yuan Minhchau Dang 14 Years Ago Hi Minhchau, Thank you. Could you please provide the sample portlet against 5.1.x? This would be useful ... Please sign in to reply. Reply as... Cancel Jonas Yuan Jonas Yuan 14 Years Ago The following hooks are stayed in portal-impl of versions 5.1 and 5.2;com.liferay.documentlibrary.util.FileSystemHook;com.liferay.documentlibrary.util.Hook;com.liferay.documentlibrary.util.JCRHook;Thus the sample portlet you provided in Plugins SDK has to refer to portal-impl.jar. How to configure it in plugins SDK? In 5.3, com.liferay.documentlibrary.util.Hook has been moved to portal-service. Is it a good idea to move FileSystemHook and JCRHook to portal-service? ThanksJonas Yuan Please sign in to reply. Reply as... Cancel
Jonas Yuan Minhchau Dang 14 Years Ago Hi Minhchau, Thank you. Could you please provide the sample portlet against 5.1.x? This would be useful ... Please sign in to reply. Reply as... Cancel Jonas Yuan Jonas Yuan 14 Years Ago The following hooks are stayed in portal-impl of versions 5.1 and 5.2;com.liferay.documentlibrary.util.FileSystemHook;com.liferay.documentlibrary.util.Hook;com.liferay.documentlibrary.util.JCRHook;Thus the sample portlet you provided in Plugins SDK has to refer to portal-impl.jar. How to configure it in plugins SDK? In 5.3, com.liferay.documentlibrary.util.Hook has been moved to portal-service. Is it a good idea to move FileSystemHook and JCRHook to portal-service? ThanksJonas Yuan Please sign in to reply. Reply as... Cancel
Jonas Yuan Jonas Yuan 14 Years Ago The following hooks are stayed in portal-impl of versions 5.1 and 5.2;com.liferay.documentlibrary.util.FileSystemHook;com.liferay.documentlibrary.util.Hook;com.liferay.documentlibrary.util.JCRHook;Thus the sample portlet you provided in Plugins SDK has to refer to portal-impl.jar. How to configure it in plugins SDK? In 5.3, com.liferay.documentlibrary.util.Hook has been moved to portal-service. Is it a good idea to move FileSystemHook and JCRHook to portal-service? ThanksJonas Yuan Please sign in to reply. Reply as... Cancel
Jonas Yuan 14 Years Ago Hi Dang, it is working fine in 5.2.*: JCR<->File; but it failed File->S3 as:21:52:57,421 WARN [RestS3Service:317] Response '/,/' - Unexpected response code 403, expected 20021:52:57,484 WARN [RestS3Service:317] Response '/,/' - Unexpected response code 403, expected 20021:52:57,484 WARN [RestS3Service:324] Response '/,/' - Received error responsewith XML message21:52:57,500 ERROR [S3Hook:80] S3 PUT failed for '/,/'21:52:57,609 ERROR [DocumentLibraryMigrator:340] migrate of DLFE-1.zip failed Please sign in to reply. Reply as... Cancel Minhchau Dang Jonas Yuan 14 Years Ago From the log4j error message, it looks like it's failing to properly construct the S3Hook (since line 80 is in the middle of the S3Hook constructor).I don't personally have an Amazon WS account to test, but to verify, have you set the portal.properties corresponding to S3Hook? According to the source, you should have values for dl.hook.s3.access.key, dl.hook.s3.secret.key, and dl.hook.s3.bucket.name.Or were you just trying it out because it was an available drop-down option? Please sign in to reply. Reply as... Cancel
Minhchau Dang Jonas Yuan 14 Years Ago From the log4j error message, it looks like it's failing to properly construct the S3Hook (since line 80 is in the middle of the S3Hook constructor).I don't personally have an Amazon WS account to test, but to verify, have you set the portal.properties corresponding to S3Hook? According to the source, you should have values for dl.hook.s3.access.key, dl.hook.s3.secret.key, and dl.hook.s3.bucket.name.Or were you just trying it out because it was an available drop-down option? Please sign in to reply. Reply as... Cancel
Hugo Alvarado 14 Years Ago - Edited Hello Minhchau I hope you are doing fine,I deployed sample 5.1.x on my local env and I'm constantly getting a ClassCastException when trying to migrate content. I have running 5.1.5 version on a tomcat 6 bundle.This is the test case:Clean Install of environment (Fresh DB (Mysql) and Server Instance v. 5.1.5 ) I have JCRHook as default.I have added some documents to Document Library and Image GalleryBrowsed Document Library Portlet to see documents and it worked.Created a Journal Article that links to these documents. (It Works).Uploaded the Migration PortletSelected source Hook: JCRHookSelected target Hook: FileSystemHookrun...... Errors (ClassCastExceptions) All Docs failed.20:13:09,712 ERROR [DocumentLibraryMigrator:339] migrate of DLFE-1.pdf failed java.lang.ClassCastException: Any thoughts on this I really appreciate it.Thanks! great post btw Please sign in to reply. Reply as... Cancel Saran veda Hugo Alvarado 14 Years Ago - Edited Hi Hugo,I have deployed the Migration portlet in 5.2.3, when i am trying to migrate the document from Filesystem to JCR tables, it gives the same error as you specified above,[#|2009-12-02T00:13:25.986-0500|INFO|sun-appserver2.1|javax.enterprise.system.stream.out|_ThreadID=23;_ThreadName=Thread-13843;|00:13:25,986 ERROR [DocumentLibraryMigrator:340] migrate of DLFE-203.jpg failedjava.lang.ClassCastException: Any help on this ?Thanks Please sign in to reply. Reply as... Cancel Robina Arora Hugo Alvarado 13 Years Ago Hi Hugo,I am also getting this same exception 'java.lang.ClassCastException: com.liferay.portal.jcr.jackrabbit.JCRFactoryImpl'I am using version 5.2.2 on tomcat 6 bundle.were you able to resolve this problem?Thanks! Please sign in to reply. Reply as... Cancel
Saran veda Hugo Alvarado 14 Years Ago - Edited Hi Hugo,I have deployed the Migration portlet in 5.2.3, when i am trying to migrate the document from Filesystem to JCR tables, it gives the same error as you specified above,[#|2009-12-02T00:13:25.986-0500|INFO|sun-appserver2.1|javax.enterprise.system.stream.out|_ThreadID=23;_ThreadName=Thread-13843;|00:13:25,986 ERROR [DocumentLibraryMigrator:340] migrate of DLFE-203.jpg failedjava.lang.ClassCastException: Any help on this ?Thanks Please sign in to reply. Reply as... Cancel
Robina Arora Hugo Alvarado 13 Years Ago Hi Hugo,I am also getting this same exception 'java.lang.ClassCastException: com.liferay.portal.jcr.jackrabbit.JCRFactoryImpl'I am using version 5.2.2 on tomcat 6 bundle.were you able to resolve this problem?Thanks! Please sign in to reply. Reply as... Cancel
Alexander Chow 14 Years Ago FYI, I just committed this migration code to trunk.http://issues.liferay.com/browse/LPS-6534 Please sign in to reply. Reply as... Cancel