Examples of GeneratorException


Examples of cn.org.rapid_framework.generator.util.GeneratorException

   
    //生成 路径值,如 pkg=com.company.project 将生成 pkg_dir=com/company/project的值
    templateModel.putAll(GeneratorHelper.getDirValuesMap(templateModel));
    filePathModel.putAll(GeneratorHelper.getDirValuesMap(filePathModel));
   
    GeneratorException ge = new GeneratorException("generator occer error, Generator BeanInfo:"+BeanHelper.describe(this));
    List<File> processedTemplateRootDirs = processTemplateRootDirs();
   
    for(int i = 0; i < processedTemplateRootDirs.size(); i++) {
      File templateRootDir = (File)processedTemplateRootDirs.get(i);
      List<Exception> exceptions = scanTemplatesAndProcess(templateRootDir,processedTemplateRootDirs,templateModel,filePathModel,isDelete);
      ge.addAll(exceptions);
    }
    if(!ge.exceptions.isEmpty()) throw ge;
  }
View Full Code Here

Examples of cn.org.rapid_framework.generator.util.GeneratorException

          exceptions.addAll(ge.getExceptions());
        }
      }
      PrintUtils.printExceptionsSumary("",getGenerator().getOutRootDir(),exceptions);
      if(!exceptions.isEmpty()) {
        throw new GeneratorException("batch generate by all table occer error",exceptions);
      }
     
    }
View Full Code Here

Examples of cn.org.rapid_framework.generator.util.GeneratorException

   
 
  private void processTemplateRootDirs(Map templateModel,Map filePathModel,boolean isDelete) throws Exception {
      if(StringHelper.isBlank(getOutRootDir())) throw new IllegalStateException("'outRootDir' property must be not null.");
    if(templateRootDirs.size() == 0) throw new IllegalStateException("'templateRootDirs' cannot empty");
    GeneratorException ge = new GeneratorException("generator occer error, Generator BeanInfo:"+BeanHelper.describe(this));
    for(int i = 0; i < this.templateRootDirs.size(); i++) {
      File templateRootDir = (File)templateRootDirs.get(i);
      List<Exception> exceptions = scanTemplatesAndProcess(templateRootDir,templateModel,filePathModel,isDelete);
      ge.addAll(exceptions);
    }
    if(!ge.exceptions.isEmpty()) throw ge;
  }
View Full Code Here

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

Examples of com.sun.ejb.codegen.GeneratorException

     * @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

Examples of com.sun.ejb.codegen.GeneratorException

     * @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

Examples of com.sun.ejb.codegen.GeneratorException

     */
    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

Examples of com.sun.ejb.codegen.GeneratorException

               
                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

Examples of com.sun.ejb.codegen.GeneratorException

        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

Examples of com.sun.ejb.codegen.GeneratorException

       
        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
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.