Package org.apache.hivemind

Examples of org.apache.hivemind.ApplicationRuntimeException


        {
            foundResources = loader.getResources(moduleFileName);
        }
        catch (IOException ex)
        {
            throw new ApplicationRuntimeException(XmlImplMessages.unableToFindModulesError(_classResolver, ex),
                    ex);
        }
       
        if (!foundResources.hasMoreElements())
            throw new ApplicationRuntimeException(XmlImplMessages.unableToFindModuleResource(new ClasspathResource(_classResolver, moduleFileName)));

        while (foundResources.hasMoreElements())
        {
            URL descriptorURL = (URL) foundResources.nextElement();
View Full Code Here


    private Class findModuleInClassResolver(String type)
    {
        Class result = _classResolver.checkForClass(type);

        if (result == null)
            throw new ApplicationRuntimeException(AnnotationsMessages.unableToFindModuleClass(
                    type, _classResolver));

        return result;
    }
View Full Code Here

                // TODO: Throw Exception
            }
        }
        catch (Exception ex)
        {
            throw new ApplicationRuntimeException(ex.getMessage(), getLocation(), ex);
        }
       
    }
View Full Code Here

        }
        catch (Exception e)
        {
            _saxParser = null;

            throw new ApplicationRuntimeException(
                    ParseMessages.errorReadingDescriptor(resource, e), resource, _contentHandler
                            .getLocation(), e);
        }
        finally
        {
View Full Code Here

            return new InputSource(url.openStream());
        }
        catch (Exception e)
        {
            throw new ApplicationRuntimeException(ParseMessages.missingResource(resource),
                    resource, null, e);
        }
    }
View Full Code Here

            stack.push(interceptor);
        }
        catch (Exception ex)
        {
            throw new ApplicationRuntimeException(
                ServiceMessages.errorInstantiatingInterceptor(
                    _serviceId,
                    stack,
                    interceptorClass,
                    ex),
View Full Code Here

        // These modifiers are allowed
        final int validModifiers = Modifier.PUBLIC;
       
        int invalidModifiers = moduleClass.getModifiers() & ~validModifiers;
        if (invalidModifiers > 0) {
            throw new ApplicationRuntimeException(AnnotationsMessages.moduleClassHasInvalidModifiers(moduleClass, invalidModifiers));
        }
       
        // Check for package-private access
        if ((moduleClass.getModifiers() & (Modifier.PUBLIC | Modifier.PROTECTED | Modifier.PRIVATE)) == 0) {
            throw new ApplicationRuntimeException(AnnotationsMessages.moduleClassIsPackagePrivate(moduleClass));
        }
    }
View Full Code Here

        // These modifiers are allowed
        final int validModifiers = Modifier.PUBLIC | Modifier.PROTECTED | allowedModifiers;
       
        int invalidModifiers = method.getModifiers() & ~validModifiers;
        if (invalidModifiers > 0) {
            throw new ApplicationRuntimeException(AnnotationsMessages.annotatedMethodHasInvalidModifiers(method, methodType, invalidModifiers));
        }

        // TODO: Check for package access
       
        // Check for setAccessible-Errors when Modifier.PROTECTED is used
        if (Modifier.isProtected(method.getModifiers())) {
            // Try to set method accessible
            try
            {
                method.setAccessible(true);
            }
            catch (SecurityException e)
            {
                throw new ApplicationRuntimeException(AnnotationsMessages.annotatedMethodIsProtectedAndNotAccessible(method, methodType));
            }
        }
    }
View Full Code Here

            m.invoke(parent, parameters);
        }
        catch (Exception ex)
        {
            throw new ApplicationRuntimeException(RulesMessages.errorInvokingMethod(
                    _methodName,
                    parent,
                    getLocation(),
                    ex), getLocation(), ex);
        }
View Full Code Here

            String term = initializer.substring(lastCommax + 1, nextCommax);

            int equalsx = term.indexOf('=');

            if (equalsx <= 0)
                throw new ApplicationRuntimeException(RulesMessages.invalidInitializer(initializer));

            String key = term.substring(0, equalsx);
            String value = term.substring(equalsx + 1);

            result.put(key, value);
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.