Package org.glassfish.deployment.common

Examples of org.glassfish.deployment.common.DeploymentException


            wsejbEndpointRegistry = Globals.getDefaultHabitat().getService(
                    WSEjbEndpointRegistry.class);
            if (wsejbEndpointRegistry != null ) {
                wsejbEndpointRegistry.registerEndpoint(webServiceEndpoint,endpointFacade,servant,tieClass);
            } else {
                throw new DeploymentException(localStrings.getLocalString(
                    "ejb.no_webservices_module",
                    "EJB-based Webservice endpoint is detected but there is no webservices module installed to handle it"));
            }
        }
View Full Code Here


            wsejbEndpointRegistry = Globals.getDefaultHabitat().getService(
                    WSEjbEndpointRegistry.class);
            if (wsejbEndpointRegistry != null ) {
                wsejbEndpointRegistry.registerEndpoint(webServiceEndpoint,endpointFacade,servant,tieClass);
            } else {
                throw new DeploymentException(localStrings.getLocalString(
                    "ejb.no_webservices_module",
                    "EJB-based Webservice endpoint is detected but there is no webservices module installed to handle it"));
            }
        }
View Full Code Here

                        doBootstrapShutdown(appInfo);
                    } finally {
                        // ignore.
                    }
                    String msgPrefix = getDeploymentErrorMsgPrefix( t );
                    DeploymentException de = new DeploymentException(msgPrefix + t.getMessage());
                    de.initCause(t);
                    throw(de);
                } finally {
                    invocationManager.popAppEnvironment();
                   
                    //The TCL is originally the EAR classloader
                    //and is reset during Bean deployment to the
                    //corresponding module classloader in BeanDeploymentArchiveImpl.getBeans
                    //for Bean classloading to succeed. The TCL is reset
                    //to its old value here.
                    Thread.currentThread().setContextClassLoader(oldTCL);
                }
            }
        } else if ( event.is(org.glassfish.internal.deployment.Deployment.APPLICATION_STARTED) ) {
            ApplicationInfo appInfo = (ApplicationInfo)event.hook();
            WeldBootstrap bootstrap = appInfo.getTransientAppMetaData(WELD_BOOTSTRAP,
                WeldBootstrap.class);
            if( bootstrap != null ) {
                final String fAppName = appInfo.getName();
                invocationManager.pushAppEnvironment(new ApplicationEnvironment() {

                    @Override
                    public String getName() {
                        return fAppName;
                    }
                   
                });
               
                try {
                    bootstrap.validateBeans();
                    bootstrap.endInitialization();
                } catch (Throwable t) {
                    try {
                        doBootstrapShutdown(appInfo);
                    } finally {
                        // ignore.
                    }
                    String msgPrefix = getDeploymentErrorMsgPrefix( t );
                    DeploymentException de = new DeploymentException( msgPrefix + t.getMessage());
                    de.initCause(t);
                    throw(de);
                }
                finally {
                    invocationManager.popAppEnvironment();
                }
View Full Code Here

    try {
      jspc.execute();
    }
    catch (Exception je) {
      throw new DeploymentException("JSP Compilation Error: " + je, je);
    }
    finally {
      // bnevins 9-9-03 -- There may be no jsp files in this web-module
      // in such a case the code above will create a useless, and possibly
      // problematic empty directory.   If the directory is empty -- delete
View Full Code Here

  ////////////////////////////////////////////////////////////////////////////
 
  private static void verify(File inWebDir, File outWebDir) throws DeploymentException {
    // inWebDir must exist, outWebDir must either exist or be creatable
    if (!FileUtils.safeIsDirectory(inWebDir)) {
      throw new DeploymentException("inWebDir is not a directory: " + inWebDir);
    }
  
        if (!FileUtils.safeIsDirectory(outWebDir)) {
            if (!outWebDir.mkdirs()) {
                logger.log(Level.FINE, CANNOT_DELETE_FILE, outWebDir);
            }
   
      if (!FileUtils.safeIsDirectory(outWebDir)) {
        throw new DeploymentException("outWebDir is not a directory, and it can't be created: " + outWebDir);
      }
    }
  }
View Full Code Here

                        bootstrap.shutdown();
                    } finally {
                        // ignore.
                    }
                    String msgPrefix = getDeploymentErrorMsgPrefix( t );
                    DeploymentException de = new DeploymentException(msgPrefix + t.getMessage());
                    de.initCause(t);
                    throw(de);
                } finally {
                    invocationManager.popAppEnvironment();
                   
                    //The TCL is originally the EAR classloader
                    //and is reset during Bean deployment to the
                    //corresponding module classloader in BeanDeploymentArchiveImpl.getBeans
                    //for Bean classloading to succeed. The TCL is reset
                    //to its old value here.
                    Thread.currentThread().setContextClassLoader(oldTCL);
                }
            }
        } else if ( event.is(org.glassfish.internal.deployment.Deployment.APPLICATION_STARTED) ) {
            ApplicationInfo appInfo = (ApplicationInfo)event.hook();
            WeldBootstrap bootstrap = appInfo.getTransientAppMetaData(WELD_BOOTSTRAP,
                WeldBootstrap.class);
            if( bootstrap != null ) {
                final String fAppName = appInfo.getName();
                invocationManager.pushAppEnvironment(new ApplicationEnvironment() {

                    @Override
                    public String getName() {
                        return fAppName;
                    }
                   
                });
               
                try {
                    bootstrap.validateBeans();
                    bootstrap.endInitialization();
                } catch (Throwable t) {
                    try {
                        bootstrap.shutdown();
                    } finally {
                        // ignore.
                    }
                    String msgPrefix = getDeploymentErrorMsgPrefix( t );
                    DeploymentException de = new DeploymentException( msgPrefix + t.getMessage());
                    de.initCause(t);
                    throw(de);
                }
                finally {
                    invocationManager.popAppEnvironment();
                }
View Full Code Here

        if( generateRmicStubs ) {
            StaticRmiStubGenerator staticStubGenerator = new StaticRmiStubGenerator(habitat);
            try {
                staticStubGenerator.ejbc(dc);
            } catch(Exception e) {
                throw new DeploymentException("Static RMI-IIOP Stub Generation exception for " +
                        dc.getSourceDir(), e);
            }
        }

        if (bundle == null || !bundle.containsCMPEntity()) {
            // bundle WAS null in a war file where we do not support CMPs
            return;
        }

        initCMPDeployer();
        if (cmpDeployer == null) {
            throw new DeploymentException("No CMP Deployer is available to deploy this module");
        }
        cmpDeployer.deploy(dc);  


    }
View Full Code Here

            } else {
                throw new RuntimeException("EJB Timer Service is not available");
           

        } catch (Exception e) {
            throw new DeploymentException("Failed to create automatic timers for " + ejbDescriptor.getName(), e);
       
    }
View Full Code Here

            generateAndRecordEARFacadeContents(
                    dc,
                    appClientGroupListSB.toString());
            recordGroupFacadeGeneration();
        } catch (Exception e) {
            throw new DeploymentException(e);
        }
    }
View Full Code Here

            is = jf.getInputStream(entry);
            DeploymentUtils.copyStream(is, os);
            is.close();
            clientArtifactsManager.add(mainClassFile, mainClassResourceName, true);
        } catch (Exception e) {
            throw new DeploymentException(e);
        } finally {
            try {
                os.close();
            } finally {
                try {
View Full Code Here

TOP

Related Classes of org.glassfish.deployment.common.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.