During my development, I want to do a Replace Design from a template to a database. As usual as just tried to replace a design of the database by selecting the template from the list. When I click on Okay, Suddenly I got a notes error message popup saying "Design Replace Failed, Memory allocation request exceeded 65,000 bytes" as shown in the below image.
As we all know about the 64k limit error. But as for the first time I don't have an idea on this issue. I spent my all time to do workaround in fixing the issue. And finally I have sorted out the issue, this is due to more number of design elements exists in the database. For XPages and Custom Controls, we keep a safe copy of those design elements inside the database itself for our revert back plan whenever a new change request happens. So the number of design elements in the database increased rapidly.
So I have deleted all the safe copy design elements from the database, cleaned and built the database twice. Moreover this will resolve the issue. But still there will be a problem.
For each and every Custom Control, there will be a .config file created inside the database. Even we have deleted the design elements, the .config files and .properties may not be removed from the database. We have to remove those files manually.
To delete those files from the database, open the database in designer, from the designer goto Menu --> Window --> Show Eclipse Views --> Package Explorer. (Refer below image)
From the Package Explorer view, locate your database and expand Custom Controls and XPages section as shown in the below image.
As we all know about the 64k limit error. But as for the first time I don't have an idea on this issue. I spent my all time to do workaround in fixing the issue. And finally I have sorted out the issue, this is due to more number of design elements exists in the database. For XPages and Custom Controls, we keep a safe copy of those design elements inside the database itself for our revert back plan whenever a new change request happens. So the number of design elements in the database increased rapidly.
So I have deleted all the safe copy design elements from the database, cleaned and built the database twice. Moreover this will resolve the issue. But still there will be a problem.
For each and every Custom Control, there will be a .config file created inside the database. Even we have deleted the design elements, the .config files and .properties may not be removed from the database. We have to remove those files manually.
To delete those files from the database, open the database in designer, from the designer goto Menu --> Window --> Show Eclipse Views --> Package Explorer. (Refer below image)
From the Package Explorer view, locate your database and expand Custom Controls and XPages section as shown in the below image.
Inside Custom Control category you can find .config and .properties files for those design elements which you have deleted already. Delete those unwanted files. Make double sure that you are deleting the files which were not really required. For example, you have deleted a custom control named ccHome_Text. And if you can still find a .config file or .properties file in the name of ccHome_Text.config and ccHome_Text.properties, then you can delete those files.
Then do a clean and build the database twice and try replace the design. It will be succeeded for sure.
Hope this helps.



No comments:
Post a Comment