Package org.apache.hivemind

Examples of org.apache.hivemind.ApplicationRuntimeException


            return;
        }
        Defense.notNull(contributingModule, "Contributing module");
       
        if (_canElementsBeMapped && !(container instanceof Map)) {
            throw new ApplicationRuntimeException("Schema root class is expected to be assignable to " +
                    "'java.util.Map' because key-attribute or unique attribute is used in the schema. ");
        }

        // Move the container to the stack as top level element
        push(container);
View Full Code Here


        // For backward compatibility lists are handled specially. The behaviour
        // of hivemind 1.x is emulated
        if (_parameters instanceof List) {
            return (List) _parameters;
        } else {
            throw new ApplicationRuntimeException("Parameters are not contained in a list. Use getParametersContainer instead.");
        }
    }
View Full Code Here

            return (Translator) c.newInstance(new Object[]
            { initializer });
        }
        catch (Exception ex)
        {
            throw new ApplicationRuntimeException(XmlImplMessages.translatorInstantiationFailure(
                    translatorClass,
                    ex), ex);
        }
    }
View Full Code Here

    private Class findTranslatorClass(String translatorName)
    {
        Class result = (Class) _translatorClasses.get(translatorName);

        if (result == null)
            throw new ApplicationRuntimeException(XmlImplMessages.unknownTranslatorName(
                    translatorName,
                    TRANSLATORS_CONFIGURATION_ID));

        return result;
    }
View Full Code Here

        }

        // TODO: refactor to use the ErrorHandler rather than throw an exception
        // (these errors are somewhat recoverable).

        throw new ApplicationRuntimeException(buffer.toString(), element.getLocation(), null);
    }
View Full Code Here

                    .getService(ServiceInterceptorFactory.class);

            ServicePointDefinition spd = factoryPoint.getServicePointDefinition();
            if (!(spd instanceof XmlServicePointDefinitionImpl)) {
                // TODO annotations: Externalize message
                throw new ApplicationRuntimeException("ServicePoint used as InterceptorFactory must be of type XmlServicePointDefinitionImpl");
            }
            XmlServicePointDefinitionImpl xmlServicePoint = (XmlServicePointDefinitionImpl) spd;
            Schema schema = xmlServicePoint.getParametersSchema();
            if (schema != null) {
View Full Code Here

        // The "hivemind" module is available here only if the HivemoduleProvider
        // has been executed before. This order is defined in the MANIFEST.MF file of the xml module
        // The cast is safe since the module is defined in the core.
        ModuleDefinitionImpl moduleDefinition = (ModuleDefinitionImpl) registryDefinition.getModule("hivemind");
        if (moduleDefinition == null) {
            throw new ApplicationRuntimeException("Module 'hivemind' not found.");
        }
       
        helper = new ModuleDefinitionHelper(moduleDefinition);
       
        addTranslatorManager(moduleDefinition, errorHandler);
View Full Code Here

        {
            _method.addCatch(catchBody, ctException);
        }
        catch (Exception ex)
        {
            throw new ApplicationRuntimeException(ServiceMessages.unableToAddCatch(
                    exceptionClass,
                    _method,
                    ex), ex);
        }
View Full Code Here

        {
            _method.insertAfter(body, asFinally);
        }
        catch (Exception ex)
        {
            throw new ApplicationRuntimeException(ServiceMessages.unableToExtendMethod(
                    _signature,
                    _method.getDeclaringClass().getName(),
                    ex), ex);
        }
View Full Code Here

                        if (i.hasNext())
                        {
                            sb.append(", ");
                        }
                    }
                    throw new ApplicationRuntimeException(ImplMessages.unqualifiedServicePoint(
                            serviceId,
                            sb.toString()));
                }
            }
            throw new ApplicationRuntimeException(ImplMessages.noSuchServicePoint(serviceId));
        }

        if (!result.visibleToModule(module))
            throw new ApplicationRuntimeException(ImplMessages.serviceNotVisible(serviceId, module));

        return result;
    }
View Full Code Here

TOP

Related Classes of org.apache.hivemind.ApplicationRuntimeException

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.