OJDeploy Issue:
I have noticed the above said issue, when I was building multiple webcenter portal applications through Hudson (which uses ojdeploy). I was using below ojdeploy script to build these applications
ojdeploy -profile A_portal -workspace A-portal.jws
(A_portal - deployment profile name in A portal application)
I have noticed that first portal application has correct autogenerated mar file. But, on second, third and other applications it is copying the files from first mar file.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibgN1xsmNMJfoQckc7-8NJnAbJIyWULjllfN9ERucmr-niSXMB2zKiA9y_Jb7fyUGy4wmGZfTEUwY1nAKCnyd1VNTxL0gFgjtTNdU5SzTPCPwZT60cKt5E4bZVQw1Q-JtfMa322OmuMEXw/s320/autogeneratedmar.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijXGDIElrMPH0eWO4SMTpo755Gv9UB8tuu9qi9aUzs6g6zM_OPhyphenhyphenRiHeq8fTbRvabNUrk_IwZ2-lIdaF9mKORxxpycZMYByf94SXqtMtXH0VrsMApg4MAwRhi-LFuaOgccvGq6kq_9eKV3/s320/A-mar.png)
Explanation with example:
1. I have 3 portal applications: A, B, C
2. Build first application with ojdeploy, the mar profile it generates is correct on it. What I mean by that is, the autogeneratedMar.mar file has all the files from the A portal application.
3. When I build B and C applications. The ojdeploy was copying the mar profile from A application to B and C. So, B and C has autogeneratedMar.mar with all the files from A.
Note: I was not able to reproduce this issue when I was using JDeveloper to build these applications.
To resolve this issue, I have created custom mar profile in each of the applications and selected below options in the MAR deployment profile:
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4LV0zanXP642terfzz3SadgyhAbrHJrcxU0TctXJJE4OmtGe-VVNZ7nbRWDHlyax6GdYn99g1e9eVMhD5FVgDt93jIcq28CJGXp2GWN5BvsxSbnsr2kq2D_yLbnZwX6Peh3OJxngovaNY/s320/c_new_mar.png)
User Metadata > Directories: 'oracle' checked.
HTML Root Dir for Portal > Directories: 'oracle' checked.
Updated each EAR deployment > Application Assembly: checked.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjW_Y8o8OU8aRJ8JyU13TT9PN8WewzFZf8wlYTrowMItkiaF4lEqyNXsMHIpPAzp5x6m9hK_xlddsBCJ_M6lcEoaDIrdiLAjLnnzsQB4Gsu-8iFy6Lfn7J7IXV0S_ntbFBVFcCoxMRTEDfp/s320/c_mar1.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1gMssxx2wfvB04w0byW9rM8vF1WNg1l_7q2W7qnOfyLIfvaF8tXGyr6Ouvv9HkyIeRoTC7cLjaTZZL8md3BqGGsC1u20eXu6mfre2wK4H8u5E7-eaWfYwDmI4pp1D-T2L0sDaRGcH02Ra/s320/c_mar2.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYgib52y6onfDYGqUzEgfRMu4fjC-N4mjUuJZByeioYweErmD82K6ELg1HaD6lSHxqDPIxEmCeCc1bSp-NiHB4-XoWm8q3j97B8R2EOUBkAWzWZ9F_npNIEtWif-OmVCJKHssDQr7SN5Pt/s320/c_mar3.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYGjbu3PP2-QdBzYfQzakkedwEvcSSCkShh5bmtX1x7_SpHGfHM_1nASowRfGBgWuv0vfq_93j0ZBfYaP1Bad3xBM8tbh13iifFZqSqvQBv5Mclj98WGnVe6DQ8eZ6OxNAA0hDETvfFVvp/s320/mar_add_ear.png)
Build these applications using ojdeploy (same script). The problem was resolved.
Each application has their own mar files (example: A portal application has A.mar, B has B.mar and C has c.mar file). Each mar file has files from the same application.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqHcdCv_pYHbPdwa_ZXfsZHpMZU52EOhDwFzL0qTjx4Pk74ZGyCo-DJ9URDZESwfRrQPJnmIOTAU98Q2yGDWa6YkNuaF2vbSymeP2d0jUD338zGvAWt1vMBmOcsY5q7wojD9f43kQUGfJW/s320/c_mar.png)
But, when I deploy these application to the webcenter domain. The application was throwing below exception:
oracle.mds.core.MetadataNotFoundException: MDS-00013: no metadata found for metadata object "/oracle/webcenter/peopleconnections/profile/metadata/people-p
rofile-config.xml"
Oracle support team found that the adf-config.xml(inside .adf/META-INF) is the issue.
It appears that this is a subtle JDeveloper quirk. For example, open the MAR deployment profile (in Application Properties) and click 'User Metadata' > 'Directories'. It will have oracle / webcenter / portalapp / pages, pagetemplates tree. If I check the top-level 'oracle' node to automatically select all of the child nodes, the problematic entry will be written to the adf-config.xml:
However, if I select the nodes from the bottom of the tree (i.e. pages and pagetemplates), the adf-config.xml will be written correctly. The same holds for the 'HTML Root Dir for Portal'. I tested this from a number of angles, and it always works for me.
I am not sure if the custom mar file issue is reproducible in PS5 environment. I have faced this issue in PS4 environment. But, if you notice this problem you know what to do now.
I have noticed the above said issue, when I was building multiple webcenter portal applications through Hudson (which uses ojdeploy). I was using below ojdeploy script to build these applications
ojdeploy -profile A_portal -workspace A-portal.jws
(A_portal - deployment profile name in A portal application)
I have noticed that first portal application has correct autogenerated mar file. But, on second, third and other applications it is copying the files from first mar file.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibgN1xsmNMJfoQckc7-8NJnAbJIyWULjllfN9ERucmr-niSXMB2zKiA9y_Jb7fyUGy4wmGZfTEUwY1nAKCnyd1VNTxL0gFgjtTNdU5SzTPCPwZT60cKt5E4bZVQw1Q-JtfMa322OmuMEXw/s320/autogeneratedmar.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijXGDIElrMPH0eWO4SMTpo755Gv9UB8tuu9qi9aUzs6g6zM_OPhyphenhyphenRiHeq8fTbRvabNUrk_IwZ2-lIdaF9mKORxxpycZMYByf94SXqtMtXH0VrsMApg4MAwRhi-LFuaOgccvGq6kq_9eKV3/s320/A-mar.png)
Explanation with example:
1. I have 3 portal applications: A, B, C
2. Build first application with ojdeploy, the mar profile it generates is correct on it. What I mean by that is, the autogeneratedMar.mar file has all the files from the A portal application.
3. When I build B and C applications. The ojdeploy was copying the mar profile from A application to B and C. So, B and C has autogeneratedMar.mar with all the files from A.
Note: I was not able to reproduce this issue when I was using JDeveloper to build these applications.
To resolve this issue, I have created custom mar profile in each of the applications and selected below options in the MAR deployment profile:
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4LV0zanXP642terfzz3SadgyhAbrHJrcxU0TctXJJE4OmtGe-VVNZ7nbRWDHlyax6GdYn99g1e9eVMhD5FVgDt93jIcq28CJGXp2GWN5BvsxSbnsr2kq2D_yLbnZwX6Peh3OJxngovaNY/s320/c_new_mar.png)
User Metadata > Directories: 'oracle' checked.
HTML Root Dir for Portal > Directories: 'oracle' checked.
Updated each EAR deployment > Application Assembly:
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjW_Y8o8OU8aRJ8JyU13TT9PN8WewzFZf8wlYTrowMItkiaF4lEqyNXsMHIpPAzp5x6m9hK_xlddsBCJ_M6lcEoaDIrdiLAjLnnzsQB4Gsu-8iFy6Lfn7J7IXV0S_ntbFBVFcCoxMRTEDfp/s320/c_mar1.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1gMssxx2wfvB04w0byW9rM8vF1WNg1l_7q2W7qnOfyLIfvaF8tXGyr6Ouvv9HkyIeRoTC7cLjaTZZL8md3BqGGsC1u20eXu6mfre2wK4H8u5E7-eaWfYwDmI4pp1D-T2L0sDaRGcH02Ra/s320/c_mar2.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYgib52y6onfDYGqUzEgfRMu4fjC-N4mjUuJZByeioYweErmD82K6ELg1HaD6lSHxqDPIxEmCeCc1bSp-NiHB4-XoWm8q3j97B8R2EOUBkAWzWZ9F_npNIEtWif-OmVCJKHssDQr7SN5Pt/s320/c_mar3.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYGjbu3PP2-QdBzYfQzakkedwEvcSSCkShh5bmtX1x7_SpHGfHM_1nASowRfGBgWuv0vfq_93j0ZBfYaP1Bad3xBM8tbh13iifFZqSqvQBv5Mclj98WGnVe6DQ8eZ6OxNAA0hDETvfFVvp/s320/mar_add_ear.png)
Build these applications using ojdeploy (same script). The problem was resolved.
Each application has their own mar files (example: A portal application has A.mar, B has B.mar and C has c.mar file). Each mar file has files from the same application.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqHcdCv_pYHbPdwa_ZXfsZHpMZU52EOhDwFzL0qTjx4Pk74ZGyCo-DJ9URDZESwfRrQPJnmIOTAU98Q2yGDWa6YkNuaF2vbSymeP2d0jUD338zGvAWt1vMBmOcsY5q7wojD9f43kQUGfJW/s320/c_mar.png)
But, when I deploy these application to the webcenter domain. The application was throwing below exception:
oracle.mds.core.MetadataNotFoundException: MDS-00013: no metadata found for metadata object "/oracle/webcenter/peopleconnections/profile/metadata/people-p
rofile-config.xml"
Oracle support team found that the adf-config.xml(inside .adf/META-INF) is the issue.
It appears that this is a subtle JDeveloper quirk. For example, open the MAR deployment profile (in Application Properties) and click 'User Metadata' > 'Directories'. It will have oracle / webcenter / portalapp / pages, pagetemplates tree. If I check the top-level 'oracle' node to automatically select all of the child nodes, the problematic entry will be written to the adf-config.xml:
However, if I select the nodes from the bottom of the tree (i.e. pages and pagetemplates), the adf-config.xml will be written correctly. The same holds for the 'HTML Root Dir for Portal'. I tested this from a number of angles, and it always works for me.
I am not sure if the custom mar file issue is reproducible in PS5 environment. I have faced this issue in PS4 environment. But, if you notice this problem you know what to do now.
No comments:
Post a Comment