Home › Forums › Administration › Deleting Entity Type breaks system updates?
- This topic has 2 replies, 3 voices, and was last updated 3 years, 10 months ago by Zaccak Solutions.
-
AuthorPosts
-
-
January 22, 2021 at 1:13 am #15172Greg FentonParticipant
Our customer is configuring the system via NexJ Admin. They have removed several Type values from the system that are not of use to their implementation. Now that they have done that, trying to reload the system to enable an upgrade or reload seed data, the system won’t start up.
Repro Steps:
- In MSSQL, set NJVersion.loaded = 0
- Start the NexJ Server (I used the Server Console) and make sure it starts up correctly.
- In MSSQL, ensure that NJVersion.loaded == 1
- Go to NexJ Admin >> Entity Codes >> Entity Types
- Right-click any type (I selected Institution) >> Delete
- Shut down the NexJ Server
- In MSSQL, set NJVersion.loaded = 0
- Start the NexJ Server (again, Server Console)
Expected Result:
- the system starts up and the CRM & Admin apps work just fine
Actual Result:
- Server has errors on start (though the server console does enable the Scheme REPL), the CRM & Admin apps are not running, and the following stack trace is seen in the server console:
Java123456789101112131415161718192021222324252627282930313233343536373839404142; 00:54:49,174 INFO [SysUpgrade] (Thread-0) Starting step 30/34 - Seed system subject areas and reports; 00:54:50,059 INFO [SysUpgrade] (Thread-0) Starting step 32/34 - Initialize persistence; 00:54:50,821 WARN [ActTemplateSeeder] (Thread-0) Cannot add System document type, "Event Document", because one exists with that name; 00:54:50,823 WARN [ActTemplateSeeder] (Thread-0) Cannot add System document type, "Event Note", because one exists with that name; 00:54:50,826 WARN [ActTemplateSeeder] (Thread-0) Cannot add System document template, "Event Note", because one exists with that name; 00:54:50,828 WARN [ActTemplateSeeder] (Thread-0) Cannot add System document template, "Event Feedback", because one exists with that name; 00:54:50,862 INFO [SysSyncTarget] (Thread-0) Sending snapshot to BI_1_BISyncLinkClass Sync linkTypeLocalization; 00:54:50,864 INFO [SysSyncTarget] (Thread-0) Sending snapshot to BI_1_BISyncLinkClass Sync linkEnumDisplay; 00:54:50,911 INFO [AssignmentModelSeeder] (Thread-0) Cannot seed ids.assignmentModel, Opportunity Team, because it has been customized.; 00:54:50,912 INFO [AssignmentModelSeeder] (Thread-0) Cannot seed ids.assignmentModel, Coverage, because it has been customized.; 00:54:57,738 FATAL [LifecycleManager] (Thread-0) Unable to start up the applicationnexj.core.runtime.ValidationException: Invalid Entity Type Custom Field Type Association (err.validation.invalidInstance) -{entityType: nexj.core.runtime.ValidationException: The entity type of Entity Type Custom Field Type Association must be specified. (err.validation.requiredAttribute) -}; 00:54:57,741 ERROR [TomcatServerMDB] (Thread-0) Unable to create TomcatServerMDB@273739890nexj.core.runtime.LifecycleException: Unable to start up the application. (err.runtime.startup)at nexj.core.runtime.LifecycleManager.startup(LifecycleManager.java:253)at nexj.core.runtime.LifecycleManager.startup(LifecycleManager.java:273)at nexj.core.rpc.ServerMDB.ejbCreate(ServerMDB.java:52)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)at java.lang.reflect.Method.invoke(Method.java:498)at nexj.core.container.platform.teee.ejb.GenericMDBContainer.getBean(GenericMDBContainer.java:150)at nexj.core.container.platform.teee.ejb.GenericMDBContainer.invoke(GenericMDBContainer.java:110)at nexj.core.container.platform.teee.ejb.MDBMessageEndpointFactory$ProxyHandler.invoke(MDBMessageEndpointFactory.java:286)at com.sun.proxy.$Proxy2.startup(Unknown Source)at nexj.core.rpc.tomcat.ra.TomcatResourceAdapter.startFramework(TomcatResourceAdapter.java:1145)at nexj.core.rpc.tomcat.ra.TomcatResourceAdapter.startTomcat(TomcatResourceAdapter.java:766)at nexj.core.rpc.tomcat.ra.TomcatResourceAdapter.endpointActivation(TomcatResourceAdapter.java:219)at nexj.core.container.platform.teee.ra.GenericRAContainer.activateMessageEndpoint(GenericRAContainer.java:100)at nexj.core.container.platform.teee.GenericContainerContainer.activateMessageListener(GenericContainerContainer.java:1243)at nexj.core.container.platform.teee.GenericContainerContainer.startAdapters(GenericContainerContainer.java:570)at nexj.core.container.platform.teee.GenericContainerContainer.startChildren(GenericContainerContainer.java:384)at nexj.core.container.platform.teee.GenericContainerContainer.start(GenericContainerContainer.java:329)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)at java.lang.reflect.Method.invoke(Method.java:498)at nexj.core.container.platform.teee.BootstrapLoader.invoke(BootstrapLoader.java:374)at nexj.core.container.platform.teee.BootstrapLoader$1.run(BootstrapLoader.java:313)Thoughts? They are using a UI provided for system configuration, and that UI enables the deletion of these types. Is there some workaround we can provide that would stop the user from inadvertently breaking their system?
0 -
January 22, 2021 at 11:53 am #15197Community ManagerKeymaster
Hi Greg,
I have been in discussion with Henry Z about application configuration. The best practices should be followed when configuring templates and such.
The required templates should be seeded into the system for long term maintenance. The code package which will be applied will allow users to import/export config.
Please do note the system restricts deletion of templates which already have associated data.
Regards,
Dhruv
0-
January 25, 2021 at 11:40 am #15273Zaccak SolutionsParticipant
I think the bug is that it should only soft-delete the data and not hard delete the entity type.
Hard deletes cause the seed data to try and create it again..
We have put workaround by commenting out the seeded data from creating the deleted data again but will implement a better solution if one is available.
0
-
-
-
AuthorPosts
- You must be logged in to reply to this topic.