Package com.sun.ejb.codegen

Examples of com.sun.ejb.codegen.GeneratorException


     * @param bundle the ejb bundle.
     * @return GeneratorException.
     */
    public static GeneratorException createGeneratorException(
            String key, EjbBundleDescriptor bundle) {
        return new GeneratorException(I18NHelper.getMessage(
            messages, key,
            bundle.getApplication().getRegistrationName(),
            getModuleName(bundle)));
    }
View Full Code Here


     * @return GeneratorException.
     */
    public static GeneratorException createGeneratorException(
            String key, EjbBundleDescriptor bundle,  Exception e) {

        return new GeneratorException(I18NHelper.getMessage(
            messages, key,
            bundle.getApplication().getRegistrationName(),
            getModuleName(bundle),
            e.getMessage()));
    }
View Full Code Here

     * @return GeneratorException.
     */
    public static GeneratorException createGeneratorException(
            String key, String beanName, EjbBundleDescriptor bundle) {

        return new GeneratorException(I18NHelper.getMessage(
            messages, key, beanName,
            bundle.getApplication().getRegistrationName(),
            getModuleName(bundle)));
    }
View Full Code Here

     */
    public static GeneratorException createGeneratorException(
            String key, String beanName, EjbBundleDescriptor bundle,
            String msg) {

        return new GeneratorException(I18NHelper.getMessage(
            messages, key,
            new Object[] {
                beanName,
                bundle.getApplication().getRegistrationName(),
                getModuleName(bundle),
View Full Code Here

               
                if( portInfo.isLinkedToPortComponent() ) {
                    WebServiceEndpoint linkedPortComponent = portInfo.getPortComponentLink();
                   
                    if (linkedPortComponent==null) {
                        throw new GeneratorException(localStrings.getLocalString(
             "enterprise.webservice.componentlinkunresolved",
                           "The port-component-link {0} cannot be resolved",
                           new Object[] {portInfo.getPortComponentLinkName()}));
                    }
                    WsUtil wsUtil = new WsUtil();
                    WebServerInfo wsi = wsUtil.getWebServerInfo(context.getDeploymentRequest());
                    URL rootURL = wsi.getWebServerRootURL(linkedPortComponent.isSecure());
                    URL actualAddress = linkedPortComponent.composeEndpointAddress(rootURL);
                    if(jaxwsClient) {
                        portInfo.addStubProperty(javax.xml.ws.BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
                                actualAddress.toExternalForm());
                    } else {
                        portInfo.addStubProperty(Stub.ENDPOINT_ADDRESS_PROPERTY, actualAddress.toExternalForm());
                    }
                    if (serviceRef.getBundleDescriptor().getModuleType().equals(ModuleType.CAR)) {
                        wsdlOverride = serviceRef.getWsdlOverride();
      if (wsdlOverride!=null) {
                            wsdlOverriden = true;
                            serviceRef.setWsdlOverride(linkedPortComponent.getWebService().getWsdlFileUrl());
      }
                    }
                }
            }

            // If this is a post JAXRPC-1.1 based web service, then no need for code gen etc etc
            if(jaxwsClient) {
                return;
            }
           
            if( serviceRef.hasGeneratedServiceInterface() ) {
               
                if( serviceRef.hasWsdlFile() && serviceRef.hasMappingFile() ) {
                    codegenRequired = true;
                } else {
                    throw new GeneratorException
      ("Deployment error for service-ref " + serviceRef.getName()
       + ".\nService references with generated service " +
       "interface must include WSDL and mapping information.");
                }
               
            } else {
               
                if( serviceRef.hasWsdlFile() ) {
                    if( serviceRef.hasMappingFile() ) {
                        codegenRequired = true;
                    } else {
                        throw new GeneratorException
          ("Deployment error for service-ref " + serviceRef.getName()
           + ".\nService references with wsdl must also have " +
           "mapping information.");
                    }
                }
View Full Code Here

        NoMetadataModelInfo modelInfo = rpcFactory.createNoMetadataModelInfo();
        URL wsdlFileUrl = webService.getWsdlFileUrl();

        Collection endpoints = webService.getEndpoints();
        if( endpoints.size() != 1 ) {
            throw new GeneratorException
                ("Deployment code generation error for webservice " +
                 webService.getName() + ". " +
                 " jaxrpc-mapping-file is required if web service has " +
                 "multiple endpoints");
        }
View Full Code Here

       
        Class serviceInterface = cl.loadClass(serviceInterfaceName);
        Collection seis = wsUtil.getSEIsFromGeneratedService(serviceInterface);

        if( seis.size() == 0 ) {
            throw new GeneratorException("Invalid Generated Service Interface "
                                         + serviceInterfaceName + " . ");
        } else if( seis.size() > 1 ) {
            throw new GeneratorException("Deployment error : If no " +
                                         "jaxrpc-mapping file is provided, " +
                                         "Generated Service Interface must have"
                                         +" only 1 Service Endpoint Interface");
        }
View Full Code Here

                            files.add(newPath);
                        }
                    }
                }
            } else {
                throw new GeneratorException("jaxrpc compilation exception");
            }
        } catch (Throwable t) {
            GeneratorException ge =
                new GeneratorException(t.getMessage());
            ge.initCause(t);
            throw ge;
  }
    }
View Full Code Here

                            .append(schemaName)
                            .append(DBSCHEMA_EXTENSION).toString());
                if (! (dbschemaFile.exists()
                       && dbschemaFile.isFile()
                       && dbschemaFile.canRead())) {
                    throw new GeneratorException(
                            I18NHelper.getMessage(
                            messages, "CMG.MissingDBSchema", // NOI18N
                            bundle.getApplication().getRegistrationName(),
                            JDOCodeGeneratorHelper.getModuleName(bundle),
                            schemaName));
View Full Code Here

        // or singleton collection (extra copies).
        Collection c = new ArrayList(validateModel(ejbcmp));

        // if the mapping info is not present, throw the exception and
        // stop the generation process
        GeneratorException mappingMissingEx = getMappingMissingException(c);
        if (mappingMissingEx != null)
            throw mappingMissingEx;

        c.addAll(validateSupported(ejbcmp));
View Full Code Here

TOP

Related Classes of com.sun.ejb.codegen.GeneratorException

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.