Package org.apache.axis2.deployment

Examples of org.apache.axis2.deployment.DeploymentException


        throw new DeploymentException(msg);
    }

    private void handleException(String msg, Throwable e) throws DeploymentException {
        log.error(msg, e);
        throw new DeploymentException(msg, e);
    }
View Full Code Here


    }

    public void deployModule(String moduleFileName) throws DeploymentException {
        File moduleFile = new File(moduleFileName);
        if (!moduleFile.exists()) {
            throw new DeploymentException("Module archive '" + moduleFileName + "' doesn't exist");
        }
        DeploymentFileData dfd = new DeploymentFileData(moduleFile, new ModuleDeployer(this));
        dfd.deploy();
    }
View Full Code Here

        } catch (ClassNotFoundException e) {
            if (handlername.indexOf("jaxws") > 0) {
                log.warn("[JAXWS] - unable to load " + handlername);
                return false;
            }
            throw new DeploymentException(e);
        } catch (Exception e) {
            throw new DeploymentException(e);
        }
        return true;
    }
View Full Code Here

                            }
                        }
                    });
            return classLoader;
        } catch (MalformedURLException e) {
            throw new DeploymentException(e);
        }
    }
View Full Code Here

            } finally {
                fin.close();
            }
        } catch (IOException e) {
            log.debug(Messages.getMessage(DeploymentErrorMsgs.DEPLOYING_EXCEPTION, e.getMessage()), e);
            throw new DeploymentException(e);
        }
    }
View Full Code Here

        } catch (AxisFault axisFault) {
            PrintWriter error_ptintWriter = new PrintWriter(errorWriter);
            axisFault.printStackTrace(error_ptintWriter);
            serviceStatus = "Error:\n" + errorWriter.toString();
            log.error(serviceStatus);
            throw new DeploymentException(axisFault);
        } catch (Exception e) {
            log.error("Can not build the service", e);
            throw new DeploymentException(e);

        } finally {
            if (serviceStatus.startsWith("Error:")) {
                axisConfig.getFaultyServices().put(deploymentFileData.getFile().getAbsolutePath(),
                        serviceStatus);
View Full Code Here

            axis2xmlStream = new FileInputStream(tenantAxis2XML);
            axisConfig = populateAxisConfiguration(axis2xmlStream);
        } catch (FileNotFoundException e) {
            String msg = "Cannot read tenant-axis2.xml";
            log.error(msg, e);
            throw new DeploymentException(msg, e);
        } finally {
            try {
                if (axis2xmlStream != null) {
                    axis2xmlStream.close();
                }
View Full Code Here

            // Set services dir
            String servicesDirName = "axis2services";
            File servicesDir = new File(repoLocation + File.separator + servicesDirName);
            if (!servicesDir.exists() && !servicesDir.mkdirs()) {
                throw new DeploymentException("Could not create services directory " +
                                              servicesDir.getAbsolutePath());
            }
            axisConfig.addParameter(new Parameter(DeploymentConstants.SERVICE_DIR_PATH,
                                                  servicesDirName));

            // Set modules dir
            String modulesDirName = "axis2modules";
            File modulesDir = new File(repoLocation + File.separator + modulesDirName);
            if(!modulesDir.exists() && !modulesDir.mkdirs()){
                throw new DeploymentException("Could not create modules directory " +
                                              modulesDir.getAbsolutePath());
            }
            axisConfig.addParameter(new Parameter(DeploymentConstants.MODULE_DRI_PATH,
                                                  modulesDirName));
        } catch (AxisFault e) {
            String msg =
                    "Cannot add DeploymentConstants.SERVICE_DIR_PATH or " +
                    "DeploymentConstants.MODULE_DIR_PATH parameters";
            log.error(msg, e);
            throw new DeploymentException(msg, e);
        }

        carbonContext.setRegistry(RegistryType.SYSTEM_CONFIGURATION, registry);
        try {
            // TODO: The governance system registry should be passed into the tenant axis
View Full Code Here

    private void setRegistry() throws DeploymentException {
        Parameter param = new Parameter(WSO2Constants.CONFIG_SYSTEM_REGISTRY_INSTANCE, registry);
        try {
            axisConfig.addParameter(param);
        } catch (AxisFault axisFault) {
            throw new DeploymentException(axisFault.getMessage(), axisFault);
        }
    }
View Full Code Here

    private void setUserRealm() throws DeploymentException {
        Parameter param = new Parameter(WSO2Constants.USER_REALM_INSTANCE, registry.getUserRealm());
        try {
            axisConfig.addParameter(param);
        } catch (AxisFault axisFault) {
            throw new DeploymentException(axisFault.getMessage(), axisFault);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.axis2.deployment.DeploymentException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.