Examples of DeploymentException


Examples of com.sun.enterprise.admin.common.exception.DeploymentException

     */
    public static DeployableObjectType getTypeFromFile(String name, String filePath)
        throws DeploymentException {

        if(filePath == null)
            throw new DeploymentException("deploy file not specified");

        try {
            //@@@ special handling the deployment of .class POJO webservice
            //class. 
            if (filePath.endsWith(".class")) {
                // get the top directory from the moduleID, in the case of
                // autodeploy, the moduleID will be the full class name (with package)
                // with . replaced with _
                StringTokenizer tk = new StringTokenizer(name, "_");
                File f = new File(filePath);
                for (int i=0;i<tk.countTokens();i++) {
                    f = f.getParentFile();
                }
                try {
                    // it's important to not cache this because the class can
                    // change overtime... we need to load the last one.
                    URL[] urls = new URL[1];
                    urls[0] = f.toURL();
                    URLClassLoader cLoader = new URLClassLoader(urls,
                                DeploymentServiceUtils.class.getClassLoader());
                    String className = name.replaceAll("_", ".");
                    Class clazz = cLoader.loadClass(className);
                    if (clazz!=null && clazz.getAnnotation(javax.ejb.Stateless.class)!=null) {
                        return DeployableObjectType.EJB;
                    } else {
                        return DeployableObjectType.WEB;
                    }                   
                } catch(Exception e) {
                    sLogger.log(Level.WARNING, e.getMessage(), e);
                    return DeployableObjectType.WEB;
                }
            }

            Archivist archivist =
                ArchivistFactory.getArchivistForArchive(filePath);
            ModuleType moduleType = archivist.getModuleType();
            return getDeployableObjectType(moduleType);
        } catch (IOException ioe) {
            DeploymentException de = new DeploymentException(
                localStrings.getString(
                    "enterprise.deployment.ioexc_getting_archtype", filePath));
            de.initCause(ioe);
            throw de;
        } catch(Exception  ex) {
            DeploymentException de = new DeploymentException(
                localStrings.getString(
                    "enterprise.deployment.unknown.application.type", filePath));
            de.initCause(ex);
            throw de;
        }
    }
View Full Code Here

Examples of com.sun.enterprise.deployment.DeploymentException

                        "enterprise.deployment.backend.sip.duplicatesak.found",
                           sipApplication.getModuleID());
             logger.log(Level.SEVERE, errMsg );
             String exMsg = newLocalStrings.getString(
                        "enterprise.deployment.backend.sip.cannot.have.dupsak");
             throw new DeploymentException(exMsg);
         }
        
         if (matchingSipApplicationKeyAnnotations.size() == 1) {
             sipApplication.setSipApplicationKey(matchingSipApplicationKeyAnnotations.get(
View Full Code Here

Examples of com.sun.star.uno.DeploymentException

            refl = (XIdlReflection) UnoRuntime.queryInterface(
                XIdlReflection.class,
                context.getServiceManager().createInstanceWithContext(
                    "com.sun.star.reflection.CoreReflection", context));
        } catch (com.sun.star.uno.Exception e) {
            throw new DeploymentException(
                ("component context fails to supply service"
                 + " com.sun.star.reflection.CoreReflection: "
                 + e.getMessage()),
                context);
        }
View Full Code Here

Examples of javax.enterprise.inject.spi.DeploymentException

        if (root instanceof DeploymentException || root instanceof DefinitionException) {
            return root;
        }
        if (isFragmentFound(DEPLOYMENT_EXCEPTION_FRAGMENTS, root)) {
            return new DeploymentException(root);
        }
        if (isFragmentFound(DEFINITION_EXCEPTION_FRAGMENTS, root)) {
            return new DefinitionException(root);
        }
        return throwable;
View Full Code Here

Examples of javax.inject.DeploymentException

            /* <Deploy> element decleration */
            else if (XMLUtil.isElementDeployDeclaration(child))
            {
                if (DEPLOY_IS_DEFINED)
                {
                    throw new DeploymentException("There can not be more than one web-beans.xml file that declares <Deploy> element");
                }
                else
                {
                    if (!XMLUtil.isElementChildExist(child, WebBeansConstants.WEB_BEANS_XML_STANDART_ELEMENT))
                    {
                        throw new DeploymentException("<Deploy> element must have <Standard/> deployment type in the web-beans.xml");
                    }

                    configureDeploymentTypes(child);
                    DEPLOY_IS_DEFINED = true;

View Full Code Here

Examples of javax.jbi.management.DeploymentException

            CeltixServiceUnit csu = new CeltixServiceUnit(bus, suRootPath, componentParentLoader);
            csu.prepare(ctx);
            serviceUnits.put(suName, csu);
        } catch (Exception ex) {
            ex.printStackTrace();
            throw new DeploymentException(ex);
        }
       
        String msg =  "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>"
            + "<component-task-result>"
            + "  <component-name>" + suName + "</component-name>"
View Full Code Here

Examples of javax.websocket.DeploymentException

            Encoder instance;
            try {
                instance = encoderClazz.newInstance();
                instance.init(endpointConfig);
            } catch (InstantiationException | IllegalAccessException e) {
                throw new DeploymentException(
                        sm.getString("wsRemoteEndpoint.invalidEncoder",
                                encoderClazz.getName()), e);
            }
            EncoderEntry entry = new EncoderEntry(
                    Util.getEncoderType(encoderClazz), instance);
View Full Code Here

Examples of org.apache.agila.bpel.deployer.exception.DeploymentException

        } catch (Throwable e) {
            try {
                TransactionManager.rollbackTransaction();
            } catch (TransactionException e1) {
                throw new DeploymentException("Could not rollback transaction.", e);
            }
            throw new DeploymentException(e);
        }
    }
View Full Code Here

Examples of org.apache.avalon.phoenix.interfaces.DeploymentException

            (Installation)m_installations.remove( name );
        if( null == installation )
        {
            final String message =
                REZ.getString( "deploy.no-deployment.error", name );
            throw new DeploymentException( message );
        }
        try
        {
            final Application application = m_kernel.getApplication( name );
            final String[] blocks = application.getBlockNames();

            m_kernel.removeApplication( name );

            for( int i = 0; i < blocks.length; i++ )
            {
                //remove configuration and schema from repository and validator
                m_repository.removeConfiguration( name, blocks[ i ] );
                m_validator.removeSchema( name, blocks[ i ] );
            }

            m_installer.uninstall( installation );
        }
        catch( final Exception e )
        {
            throw new DeploymentException( e.getMessage(), e );
        }
    }
View Full Code Here

Examples of org.apache.axis.deployment.DeploymentException

                if (deser != null)
                    tmr.addDeserializerFactory(mapping.getQName(),
                                               mapping.getLanguageSpecificType(),
                                               deser);
            } catch (Exception e) {
                throw new DeploymentException(e.getMessage());
            }
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.