# Cannot get property 'archetype_node_id' on null object error in openEHR toolKit **Category:** [New to openEHR?](https://discourse.openehr.org/c/new-to-openehr/13) **Created:** 2024-01-18 14:10 UTC **Views:** 457 **Replies:** 10 **URL:** https://discourse.openehr.org/t/cannot-get-property-archetype-node-id-on-null-object-error-in-openehr-toolkit/4839 --- ## Post #1 by @Maha_Mahmoud how to solve this error --- ## Post #2 by @SevKohler Hey @Maha_Mahmoud, welcome to the discourse :slight_smile: I guess the tool your referring is https://toolkit.cabolabs.com/ ? Thats a tool from cabolabs. In that case @pablo is the one with the answers. --- ## Post #3 by @pablo Hi @Maha_Mahmoud can you please describe your workflow to understand when the problem happens and also share the archetype or template you are using? Thanks. --- ## Post #4 by @Maha_Mahmoud When I try to generate canonical xml composition file from template otp file The same error appeared for these two templates https://tools.openehr.org/designer/#/viewer/shared/Pz9zaGFyZWRJZD0xJDcxODE0MzQ2YTdhNzQ5MGM5MWI3YzEwM2E0NzljOWQy https://tools.openehr.org/designer/#/viewer/shared/Pz9zaGFyZWRJZD0xJDM5M2YzMzYyZjViMzRhZDM4MjQ0MzRiODcxMTE3NWFi Thanks --- ## Post #5 by @pablo Hi @Maha_Mahmoud I can't see the XML. Can you export the OPTs and share the XML files? Thanks! --- ## Post #6 by @Maha_Mahmoud [insurance.docx|attachment](upload://imlesADygBwnv4q81RQOBgGCpHd.docx) (34.6 KB) [patient details.docx|attachment](upload://vo2EqGsb3oD0kf6ghZsuZPlFt2A.docx) (33.6 KB) --- ## Post #7 by @pablo Hi @Maha_Mahmoud I have extracted the opts from your doc files. You are using GENERIC_ENTRY which is a class from the integration model. That class is not supported by the instance generator of the openEHR Toolkit. Only classes from the entry model are supported. https://specifications.openehr.org/releases/RM/latest/integration.html https://specifications.openehr.org/releases/RM/Release-1.1.0/ehr.html#_entry_and_its_subtypes I'll add a check for this to show a more user-friendly error. --- ## Post #8 by @Maha_Mahmoud Ok, Thanks --- ## Post #9 by @ian.mcnicoll Ha Maha, Just refactor your archetypes as ADMIN_ENTRY or EVALUATION archetypes and it should work. These are the simplest of theEntry classes --- ## Post #10 by @Maha_Mahmoud Ok,I will try that Thanks --- ## Post #11 by @pablo Note the type of entry depends on the semantics of the information you want to model. If you use GENERIC_ENTRY, it's because you are importing some legacy data from another system into openEHR and that information might not correspond with any of the openEHR entry types. But if you want to record new information, you need to choose from OBSERVATION, EVALUATION, INSTRUCTION, ACTION or ADMIN_ENTRY types of entries. All those classes are supported by the instance generator in the openEHR Toolkit. Related note: we are updating the openEHR Toolkit to also support generating instances for demographic classes. This will be released soon. --- **Canonical:** https://discourse.openehr.org/t/cannot-get-property-archetype-node-id-on-null-object-error-in-openehr-toolkit/4839 **Original content:** https://discourse.openehr.org/t/cannot-get-property-archetype-node-id-on-null-object-error-in-openehr-toolkit/4839