//data.instanceName = data.instanceName.replaceAll("\\s", "");
DeploymentManager mgr = ManagementHelper.getManagementHelper(request).getDeploymentManager();
try {
File rarFile = PortletManager.getRepositoryEntry(request, data.getRarURI());
ConnectorDeployable deployable = new ConnectorDeployable(rarFile.toURL());
DeploymentConfiguration config = mgr.createConfiguration(deployable);
final DDBeanRoot ddBeanRoot = deployable.getDDBeanRoot();
Connector15DCBRoot root = (Connector15DCBRoot) config.getDConfigBeanRoot(ddBeanRoot);
ConnectorDCB connector = (ConnectorDCB) root.getDConfigBean(ddBeanRoot.getChildBean(root.getXpaths()[0])[0]);
EnvironmentData environment = new EnvironmentData();