private Unmarshaller getUnmarshaller(boolean isV10) throws DeploymentException { try { if(isV10) { return jaxbContext10.createUnmarshaller(); } else { return jaxbContext11.createUnmarshaller(); } }catch(NullPointerException npe) { throw new DeploymentException("Failed to create unmarshaler, probably context has not been create, see console for error.", npe); } catch (Exception e) { throw new DeploymentException("Failed to create unmarshaler!",e); } }
/** * Inits and parses * @param jarEntry JarFile * @param componentContainer the container where the component should be * deployed. * @throws DeploymentException */ protected void initDeployer(File serviceXML, ComponentContainer container) throws DeploymentException { this.serviceXML = serviceXML; this.componentContainer = container; try { this.componentDescriptors = parseServiceDescriptors(); } catch (Exception ex) { DeploymentException de = new DeploymentException("Failed to parse deployment descriptor of " + serviceXML.getName(), ex); log.error(de.getMessage(), ex); throw de; } }
ex.printStackTrace(); try { this.componentContainer ex1.printStackTrace(); throw new DeploymentException(ex.getMessage(), ex); if (serviceXmlName.length() == 0 || !serviceXmlName.toLowerCase().endsWith("xml")) { throw new DeploymentException(serviceXmlName + " is not a valid service-xml file name."); throw new DeploymentException("Encountered " + serviceXmlName + " more than once."); logger.error("Error unistalling partial deployment", e); throw new DeploymentException(ex.getMessage(), ex);
protected void createSetActivityContextInterfaceMethod( CtClass activityContextInterface) throws DeploymentException { String methodToAdd = "public void sbbSetActivityContextInterface( Object aci ) {" + "this.sbbActivityContextInterface = (" + activityContextInterface.getName() + ") aci ; } "; CtMethod methodTest; try { methodTest = CtNewMethod.make(methodToAdd, sbbConcreteClass); sbbConcreteClass.addMethod(methodTest); logger.trace("Method " + methodToAdd + " added"); } catch (CannotCompileException e) { throw new DeploymentException(e.getMessage(), e); } }
throw new DeploymentException("Failed to parse deployment descriptor of " + componentJar.getName(), ex);
+ containingJar.getName()); if (zipFileEntry == null) { throw new DeploymentException("Error extracting jar file " + fileName + " from " + containingJar.getName()); new FileOutputStream(extractedFile)); } catch (FileNotFoundException e) { throw new DeploymentException("file " + fileName + " not found in " + containingJar.getName(), e); } catch (IOException e) { throw new DeploymentException("erro extracting file " + fileName + " from " + containingJar.getName(), e);
public DeployableUnitDescriptorImpl(org.mobicents.slee.container.component.deployment.jaxb.slee.du.DeployableUnit duDescriptor10) throws DeploymentException { try { this.isSlee11 = false; buildDescriptionMap(duDescriptor10.getJarOrServiceXml()); } catch (DeploymentException e) { throw e; } catch (Exception e) { throw new DeploymentException( "Failed to parse descriptor due to: ", e); } }
throw new DeploymentException("Failed to parse descriptor into dom document cause: \""+e.getMessage()+"\""); }catch (Exception e) { throw new DeploymentException("Failed to parse descriptor into dom document",e); if(documentType==null || documentType.getSystemId()==null) throw new DeploymentException("Doctype not present in xml file or invalid. Document can not be recognized as valid descriptor nor parsed"); return unmarshaller.unmarshal(document); } catch (JAXBException e) { throw new DeploymentException("failed to unmarshall descriptor with jaxb",e);
sourceUrl = new URL(sourceUrlStr); } catch (MalformedURLException exc) { throw new DeploymentException("Invalid source url.", exc); throw new DeploymentException("Source Directory " + sourceUrlStr + " does not exist or is not a directory"); throw new DeploymentException("Specified Destination " + destinationPath + " is not a directory"); else { throw new DeploymentException( "Failed to create destination directory: " + destinationPath); throw new DeploymentException("Specified Destination " + destinationPath + " is not a directory"); else { throw new DeploymentException( "Failed to create destination directory: " + destinationPath); throw new DeploymentException(deployableUnits[i].toString() + " is not a valid url.", ex);
private void exploreDULib() throws DeploymentException { // explore the library directory // TODO: The proper way to explore the library directories is to follow the JSLEE 1.1 // spec for adding the proper library descriptor Enumeration entries = unitJarFile.entries(); try { for (JarEntry entry = (JarEntry) entries.nextElement(); entries.hasMoreElements(); ) { entry = (JarEntry) entries.nextElement(); if (entry.getName().indexOf("library")!=-1 && entry.getName().indexOf("jar")!=-1 && !entry.isDirectory()) { File f = DeploymentManager.extractFile(entry.getName(),unitJarFile,getClasspathDirectory()); DeploymentManager.extractJar(new JarFile(f), getClasspathDirectory()); } } } catch (IOException ex) { throw new DeploymentException(ex.getMessage(), ex); } }
public void process(ResourceAdaptorTypeComponent component) throws DeploymentException { try { new ConcreteActivityContextInterfaceFactoryGenerator(component).generateClass(); } catch (DeploymentException ex) { throw ex; } catch (Throwable ex) { throw new DeploymentException( "Failed to generate ra type class(es)", ex); } }
public DeployableUnitDescriptorImpl(org.mobicents.slee.container.component.deployment.jaxb.slee11.du.DeployableUnit duDescriptor11) throws DeploymentException { try { this.isSlee11 = true; buildDescriptionMap(duDescriptor11 .getJarOrServiceXml()); } catch (DeploymentException e) { throw e; } catch (Exception e) { throw new DeploymentException( "Failed to parse descriptor due to: ", e); } } public DeployableUnitDescriptorImpl(org.mobicents.slee.container.component.deployment.jaxb.slee.du.DeployableUnit duDescriptor10)
throw new DeploymentException("Specified Destination " + srcPath + " is not a directory"); } else { throw new DeploymentException("Specified location " + srcPath + " not found");
private void createFields(CtClass[] parameters) throws DeploymentException { for (int i = 0; i < parameters.length; i++) { String parameterName = parameters[i].getName(); parameterName = parameterName.substring(parameterName .lastIndexOf(".") + 1); String firstCharLowerCase = parameterName.substring(0, 1) .toLowerCase(); parameterName = firstCharLowerCase.concat(parameterName .substring(1)); try { CtField ctField = new CtField(parameters[i], parameterName, sbbConcreteClass); ctField.setModifiers(Modifier.PRIVATE); sbbConcreteClass.addField(ctField); } catch (CannotCompileException e) { throw new DeploymentException(e.getMessage(), e); } } }
@Override public void processSecurityPermissions() throws DeploymentException { try { if (this.descriptor.getSecurityPermissions() != null) { super.permissions.add(new PermissionHolderImpl(super.getDeploymentDir().toURI(), this.descriptor.getSecurityPermissions())); } } catch (Exception e) { throw new DeploymentException("Failed to make permissions usable.", e); } }
throw new DeploymentException("Failed to create directory " + dir.getAbsolutePath()); throw new DeploymentException("Failed to create directory " + dir.getAbsolutePath()); } else
@Override public void processSecurityPermissions() throws DeploymentException { try { if (this.descriptor.getSecurityPermissions() != null) { super.permissions.add(new PermissionHolderImpl(super.getDeploymentDir().toURI(), this.descriptor.getSecurityPermissions())); } } catch (Exception e) { throw new DeploymentException("Failed to make permissions usable.", e); } }
@Override public void processSecurityPermissions() throws DeploymentException { try { if (this.descriptor.getSecurityPermissions() != null) { super.permissions.add(new PermissionHolderImpl(super.getDeploymentDir().toURI(), this.descriptor.getSecurityPermissions())); } } catch (Exception e) { throw new DeploymentException("Failed to make permissions usable.", e); } }
ex1.printStackTrace(); throw new DeploymentException(ex.getMessage(), ex);
throw new DeploymentException("failed to extract jar file " + jarFile.getName()); } finally {