Examples of ConfigurationException


Examples of org.jboss.system.ConfigurationException

      }
      // If class is given, instantiate it
      String code = mbeanElement.getAttribute("code");
      if ( code == null || "".equals(code))
      {
         throw new ConfigurationException("missing 'code' attribute");
      }

      // get the constructor params/sig to use
      ConstructorInfo constructor = ConstructorInfo.create(mbeanElement);

      // Check for xmbean specific attributes
      String xmbeandd = null;
      Attr xmbeanddAttr = mbeanElement.getAttributeNode("xmbean-dd");
      if( xmbeanddAttr != null )
         xmbeandd = xmbeanddAttr.getValue();
      String xmbeanCode = mbeanElement.getAttribute("xmbean-code");
      if( xmbeanCode.length() == 0 )
         xmbeanCode = XMBEAN_CODE;

      // Create the mbean instance
      ObjectInstance instance = null;
      try
      {
         if ( xmbeandd == null )
         {
            // Check for the explicit management interface in case of a standard MBean
            Attr itfAttr = mbeanElement.getAttributeNode("interface");
            if (itfAttr != null)
            {
               // Get the good class loader
               ClassLoader classLoader = server.getClassLoader(loaderName);

               // Load interface class
               String itf = itfAttr.getValue();
               Class itfClass = classLoader.loadClass(itf);
               log.debug("About to create bean resource: " + mbeanName + " with code: " + code);
               Object resource = server.instantiate(code,
                                                    loaderName,
                                                    constructor.params,
                                                    constructor.signature);
               //
               log.debug("About to register StandardMBean : " + mbeanName);
               instance = server.createMBean("javax.management.StandardMBean",
                                             mbeanName,
                                             loaderName,
                                             new Object[]{resource,itfClass},
                                             new String[]{Object.class.getName(),Class.class.getName()});
            }
            else
            {
               // This is a standard or dynamic mbean
               log.debug("About to create bean: " + mbeanName + " with code: " + code);
               instance = server.createMBean(code,
                                             mbeanName,
                                             loaderName,
                                             constructor.params,
                                             constructor.signature);
            }
         } // end of if ()
         else if( xmbeandd.length() == 0 )
         {
            // This is an xmbean with an embedded mbean descriptor
            log.debug("About to create xmbean object: " + mbeanName
               + " with code: " + code + " with embedded descriptor");
            //xmbean: construct object first.
            Object resource = server.instantiate(code, loaderName,
                  constructor.params, constructor.signature);

            NodeList mbeans = mbeanElement.getElementsByTagName("xmbean");
            if( mbeans.getLength() == 0 )
               throw new ConfigurationException("No nested mbean element given for xmbean");
            Element mbeanDescriptor = (Element) mbeans.item(0);
            Object[] args = {resource, mbeanDescriptor,
                             ServiceConstants.PUBLIC_JBOSSMX_XMBEAN_DTD_1_0};
            String[] sig = {Object.class.getName(), Element.class.getName(),
                            String.class.getName()};
View Full Code Here

Examples of org.jbpm.configuration.ConfigurationException

      // get a command from the queue
      DbMessageService dbMessageService = null;
      try {
        dbMessageService = (DbMessageService) jbpmContext.getServices().getMessageService();
      } catch (ClassCastException e) {
        throw new ConfigurationException("CommandExecutorThread only works with the DbMessageService implementation of the MessageService. please, configure jbpm.cfg.xml accordingly.");
      }
      if (dbMessageService==null) {
        throw new ConfigurationException("no messaging service available");
      }
      message = dbMessageService.receiveNoWait(destination);
     
      if (message!=null) {
        checkForMoreMessages = true;
View Full Code Here

Examples of org.jpos.core.ConfigurationException

        throws ConfigurationException
    {
        key = cfg.get ("key");
        String fieldList = cfg.get ("fields");
        if (fieldList == null)
            throw new ConfigurationException ("'fields' property not present");

        StringTokenizer st = new StringTokenizer (fieldList);
        int f[] = new int[st.countTokens()];

        for (int i=0; i<f.length; i++)
View Full Code Here

Examples of org.jscsi.exception.ConfigurationException

            validator.validate(source, result);

            return (Document) result.getNode();
        } catch (final SAXException exc) {
            throw new ConfigurationException(exc);
        } catch (final ParserConfigurationException exc) {
            throw new ConfigurationException(exc);
        } catch (final IOException exc) {
            throw new ConfigurationException(exc);
        }
    }
View Full Code Here

Examples of org.jvnet.hk2.config.ConfigurationException

        if (config == null) {
            Object[] params = {VirtualServerInfoStatsProvider.class.getName(),
                    HttpServiceStatsProvider.class.getName(),
                    "http service", "virtual server"};
            logger.log(Level.SEVERE, UNABLE_TO_REGISTER_STATS_PROVIDERS, params);
            throw new ConfigurationException(logger.getResourceBundle().getString(NULL_CONFIG));
        }

        HttpService httpService = config.getHttpService();
        for (VirtualServer vs : httpService.getVirtualServer()) {
            StatsProviderManager.register(
View Full Code Here

Examples of org.maltparserx.core.config.ConfigurationException

      Object[] arguments = new Object[params.length];
      arguments[0] = this;
      Constructor<?> constructor = clazz.getConstructor(params);
      return (AbstractParserFactory)constructor.newInstance(arguments);
    } catch (NoSuchMethodException e) {
      throw new ConfigurationException("The parser factory '"+clazz.getName()+"' cannot be initialized. ", e);
    } catch (InstantiationException e) {
      throw new ConfigurationException("The parser factory '"+clazz.getName()+"' cannot be initialized. ", e);
    } catch (IllegalAccessException e) {
      throw new ConfigurationException("The parser factory '"+clazz.getName()+"' cannot be initialized. ", e);
    } catch (InvocationTargetException e) {
      throw new ConfigurationException("The parser factory '"+clazz.getName()+"' cannot be initialized. ", e);     
    }
  }
View Full Code Here

Examples of org.mapfish.print.config.ConfigurationException

    }

    @Override
    public void validate(final List<Throwable> validationErrors, final Configuration configuration) {
        if (this.requiredRoles == null) {
            validationErrors.add(new ConfigurationException("requiredRoles must be defined"));
        }
    }
View Full Code Here

Examples of org.modelmapper.ConfigurationException

    return this;
  }

  public void throwConfigurationExceptionIfErrorsExist() {
    if (hasErrors())
      throw new ConfigurationException(getMessages());
  }
View Full Code Here

Examples of org.modeshape.jcr.ConfigurationException

    protected Cache<NodeKey, CachedNode> cacheForWorkspace( String name ) {
        Cache<NodeKey, CachedNode> cache = workspaceCacheManager.getCache(cacheNameForWorkspace(name));
        if (cache instanceof AdvancedCache) {
            TransactionManager txManager = ((AdvancedCache<?, ?>)cache).getTransactionManager();
            if (txManager != null) {
                throw new ConfigurationException(JcrI18n.workspaceCacheShouldNotBeTransactional.text(name));
            }
        }
        return cache;
    }
View Full Code Here

Examples of org.mojavemvc.exception.ConfigurationException

     */
    public ActionSignature getActionMethodSignature(Class<?> controllerClass, String action) {

        Map<String, ActionSignature> actionMap = controllerClassToActionMap.get(controllerClass);
        if (actionMap == null) {
            throw new ConfigurationException("no actions defined for " + controllerClass.getName());
        }
        return actionMap.get(action);
    }
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.