static public RTComponent createComponent(String pathUri)
			throws CorbaNamingCannotFindException, CorbaNamingResolveException,
			ZombieRTObjectException, InvalidProfileException {
		RTObject rtObject = getComponent(pathUri);

		ComponentProfile profile;
		try {
			profile = rtObject.get_component_profile();
		} catch (Exception ex) {
			throw new ZombieRTObjectException();
		}

		RTComponent component;
		try {
			component = new RTComponent(profile.instance_name, pathUri,
					buildComponentId(rtObject), rtObject.get_configuration()
							.get_active_configuration_set().id, false, "None");

			PortService[] portServices = rtObject.get_ports();
			for (PortService portService : portServices) {
				String name = portService.get_port_profile().name;
				DataPort dataPort = new DataPort(name);
				component.dataPortSet.add(dataPort);
			}

			// Adding Configuration Sets
			_SDOPackage.Configuration configuration = rtObject
					.get_configuration();
			_SDOPackage.ConfigurationSet[] configurationSets = configuration
					.get_configuration_sets();
			for (_SDOPackage.ConfigurationSet configurationSet : configurationSets) {
				ConfigurationSet myConfigurationSet = new ConfigurationSet(
						configurationSet.id);
				for (NameValue configurationData : configurationSet.configuration_data) {
					myConfigurationSet.configurationDataSet
							.add(new ConfigurationData(configurationData.name,
									configurationData.value.toString()));
				}
				component.configurationSetSet.add(myConfigurationSet);
			}

			// Adding Execution Context
			RTC.ExecutionContext[] executionContexts = rtObject
					.get_owned_contexts();
			for (int i = 0; i < executionContexts.length; i++) {
				RTC.ExecutionContext executionContext = executionContexts[i];
				String kindText = null;
				executionContext.get_kind();
				if (executionContext.get_kind().equals(ExecutionKind.PERIODIC)) {
					kindText = "PERIODIC";
				} else {
					executionContext.get_kind();
					if (executionContext.get_kind().equals(
							ExecutionKind.EVENT_DRIVEN)) {
						kindText = "EVENT_DRIVEN";
					} else {
						kindText = "OTHER";
					}
				}
				ExecutionContext myEc = new ExecutionContext(Integer
						.toString(i), "rtsExt:execution_context_ext", kindText,
						Double.toString(executionContext.get_rate()));
				component.executionContextSet.add(myEc);
			}

			// Adding Location
			component.location = new Location(-1, -1, -1, -1);

			org.omg.CORBA.ORB orb = ORBUtil.getOrb();
			String str = orb.object_to_string(rtObject._duplicate());
			component.properties = new Properties("IOR", str);
			return component;
		} catch (Exception e) {
			throw new InvalidProfileException();
		}
	}