The application has not been initialized exception when trying to fetch using java

Hello everyone,
I am new to capella and writing a an application to fetch data from capella using java.

when i try to get operationalActivityPkg using the following code, i get an assertion failed exception with message ‘The application has not been initialized’.

public static void main(String args){

OaPackage.eINSTANCE.eClass();
LibrariesPackage.eINSTANCE.eClass();
CapellacorePackage.eINSTANCE.eClass();
CapellacommonPackage.eINSTANCE.eClass();

ResourceSet resourceSet = new ResourceSetImpl();
resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put(“capella”, new XMIResourceFactoryImpl());
URI fileUri = URI.createFileURI(“/C:/Capella/workspace/Project1/Project1.capella”);
Resource resource = resourceSet.getResource(fileUri, true);

Project project = (Project)resource.getContents().get(0);
EList ownedModelRoots = project.getOwned ModelRoots();
ModelRoot modelRoot = ownedModelRoots.get(0);
OperationalAnalysis operationalAnalysis=SystemEngineeringExt.getOperationalAnalysis ((SystemEngineering) modelRoot);
OperationalCapabilityPkg operationalCapabilityPkg = operationalAnalysis.getContainedOperationalCapabilityPkg();
}

Do I need to initialize some services? If so, how can that be done.
Thanks for your time

Hi,

Is there any progress on the issue regarding the “Application has not been initialized” error when trying to fetch data from Capella programmatically? Any solutions or suggestions?

Thanks!