Examples of ComponentException


Examples of edu.indiana.extreme.xbaya.component.ComponentException

            if (prefix == null ) {
              if("string".equals(typeName) || "int".equals(typeName)){
                namespace = XmlConstants.BUILDER.newNamespace("xsd", WSConstants.XSD_NS_URI);
                prefix = "xsd";
              }else{
                throw new ComponentException("Namespace prefix, " + prefix
                            + ", is not defined");
              }
            }else{
              namespace = element.lookupNamespaceByPrefix(prefix);
            }
View Full Code Here

Examples of net.sourceforge.marathon.component.ComponentException

        }
        else {
            if (component instanceof MCollectionComponent) {
                ((MCollectionComponent)component).setCellSelection(cellList.toArray(new Properties[cellList.size()]));
            } else {
                throw new ComponentException("Array of properties are expected only for collection components", scriptModel, windowMonitor);
            }
        }
    }
View Full Code Here

Examples of org.apache.airavata.workflow.model.component.ComponentException

            WsdlPortType portType = this.wsdl.getPortType(portTypeQName.getLocalPart());
            XmlElement templateIDElement = portType.xml().element(GPEL_NAMESPACE, WORKFLOW_TEMPLATE_ID_TAG);
            String templateIDString = templateIDElement.requiredText();
            this.templateID = new URI(templateIDString);
        } catch (URISyntaxException e) {
            throw new ComponentException(e);
        }
    }
View Full Code Here

Examples of org.apache.airavata.xbaya.component.ComponentException

            WsdlPortType portType = this.wsdl.getPortType(portTypeQName.getLocalPart());
            XmlElement templateIDElement = portType.xml().element(GPEL_NAMESPACE, WORKFLOW_TEMPLATE_ID_TAG);
            String templateIDString = templateIDElement.requiredText();
            this.templateID = new URI(templateIDString);
        } catch (URISyntaxException e) {
            throw new ComponentException(e);
        }
    }
View Full Code Here

Examples of org.apache.avalon.framework.component.ComponentException

            server = (MailServer) componentManager.lookup(MailServer.ROLE);
        } catch (ClassCastException cce) {
            StringBuffer errorBuffer =
                new StringBuffer(128).append("Component ").append(MailServer.ROLE).append(
                    "does not implement the required interface.");
            throw new ComponentException(errorBuffer.toString());
        }
    }
View Full Code Here

Examples of org.apache.avalon.framework.component.ComponentException

        throws ComponentException {
        super.compose(componentManager);
        UsersStore usersStore = (UsersStore)componentManager.lookup(UsersStore.ROLE);
        userRepository = usersStore.getRepository("LocalUsers");
        if (userRepository == null) {
            throw new ComponentException("The user repository could not be found.");
        }

        repo = (NNTPRepository)componentManager
            .lookup("org.apache.james.nntpserver.repository.NNTPRepository");
View Full Code Here

Examples of org.apache.avalon.framework.component.ComponentException

        mailServer = (MailServer) componentManager.lookup("org.apache.james.services.MailServer");
        UsersStore usersStore =
            (UsersStore) componentManager.lookup("org.apache.james.services.UsersStore");
        users = usersStore.getRepository("LocalUsers");
        if (users == null) {
            throw new ComponentException("The user repository could not be found.");
        }
    }
View Full Code Here

Examples of org.apache.avalon.framework.component.ComponentException

     */
    public Component select(String name, Locale loc, boolean cacheAtStartup)
        throws ComponentException {
        Component bundle = _select(name, loc, cacheAtStartup);
        if (bundle == null)
            throw new ComponentException("Unable to locate resource: " + name);
        return bundle;
    }
View Full Code Here

Examples of org.apache.avalon.framework.component.ComponentException

     */
    public Component selectFromFilename(String fileName, boolean cacheAtStartup)
        throws ComponentException {
        Component bundle = _select(fileName, null, cacheAtStartup);
        if (bundle == null)
            throw new ComponentException("Unable to locate resource: " + fileName);
        return bundle;
    }
View Full Code Here

Examples of org.apache.avalon.framework.component.ComponentException

    throws ComponentException {
        if( null == role ) {
            final String message =
                "ComponentLocator Attempted to retrieve component with null role.";

            throw new ComponentException( role, message );
        }
        if ( role.equals(SourceResolver.ROLE) ) {
            if ( null == this.sourceResolver ) {
                this.sourceResolver = (SourceResolver) super.lookup( role );
            }
            return this;
        }

        final EnvironmentStack stack = (EnvironmentStack)environmentStack.get();
        if ( null != stack && !stack.empty()) {
            final Object[] objects = (Object[])stack.getCurrent();
            final Map objectModel = ((Environment)objects[0]).getObjectModel();
            EnvironmentDescription desc = (EnvironmentDescription)objectModel.get(PROCESS_KEY);
            if ( null != desc ) {
                final Component component = desc.getRequestLifecycleComponent(role);
                if (null != component) {
                    return component;
                }
            }
        }

        final Component component = super.lookup( role );
        if (null != component && component instanceof RequestLifecycleComponent) {
            if (stack == null || stack.empty()) {
                throw new ComponentException(role, "ComponentManager has no Environment Stack.");
            }
            final Object[] objects = (Object[]) stack.getCurrent();
            final Map objectModel = ((Environment)objects[0]).getObjectModel();
            EnvironmentDescription desc = (EnvironmentDescription)objectModel.get(PROCESS_KEY);
            if ( null != desc ) {

                // first test if the parent CM has already initialized this component
                if ( !desc.containsRequestLifecycleComponent( role ) ) {
                    try {
                        if (component instanceof Recomposable) {
                            ((Recomposable) component).recompose(this);
                        }
                        ((RequestLifecycleComponent) component).setup((org.apache.cocoon.environment.SourceResolver)objects[0],
                                                                      objectModel);
                    } catch (Exception local) {
                        throw new ComponentException(role, "Exception during setup of RequestLifecycleComponent.", local);
                    }
                    desc.addRequestLifecycleComponent(role, component, this);
                }
            }
        }
       
        if ( null != component && component instanceof SitemapConfigurable) {

            // FIXME: how can we prevent that this is called over and over again?
            SitemapConfigurationHolder holder;
           
            holder = (SitemapConfigurationHolder)this.sitemapConfigurationHolders.get( role );
            if ( null == holder ) {
                // create new holder
                holder = new DefaultSitemapConfigurationHolder( role );
                this.sitemapConfigurationHolders.put( role, holder );
            }

            try {
                ((SitemapConfigurable)component).configure(holder);
            } catch (ConfigurationException ce) {
                throw new ComponentException(role, "Exception during setup of SitemapConfigurable.", ce);
            }
        }
        return component;
    }
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.