Package org.apache.commons.jelly

Examples of org.apache.commons.jelly.JellyException


                    String name = classObject.toString();
                    try {
                        actionClass = Class.forName( name );
                    }
                    catch (Throwable t) {
                        throw new JellyException( "Could not find class: " + name + " for this <action> tag. Exception: " +t, t );
                    }
                }
                if ( actionClass != null ) {
                    action = (Action) actionClass.newInstance();
                }
View Full Code Here


        // evaluate body as it may contain a <destination> or message tag
        invokeBody(output);
       
        Message message = getMessage();
        if ( message == null ) {
            throw new JellyException( "No message specified. Either specify a 'message' attribute or use a nested <jms:message> tag" );
        }
        Destination destination = getDestination();
        if ( destination == null ) {
            throw new JellyException( "No destination specified. Either specify a 'destination' attribute or use a nested <jms:destination> tag" );
        }
        getConnection().send( destination, message );
    }
View Full Code Here

        // evaluate body as it may contain a <destination> tag
        invokeBody(output);
       
        Destination destination = getDestination();
        if ( destination == null ) {
            throw new JellyException( "No destination specified. Either specify a 'destination' attribute or use a nested <jms:destination> tag" );
        }
        Message message = null;
        if ( timeout > 0 ) {
            if ( log.isDebugEnabled() ) {
                log.debug( "Receiving message on destination: " + destination + " with timeout: " + timeout );
View Full Code Here

     throws a JellyExceptoin if the goal could not be found
     */
    protected Goal getGoal(String name) throws JellyException {
        Project project = getProject();
        if ( project == null ) {
            throw new JellyException( "Must use this tag inside a <maven:project> tag" );
        }
       
        // #### allow lazy creation of callbacks before the goal is defined...
        Goal goal = project.getGoal(name, true);
        if ( goal == null ) {
            throw new JellyException( "No such target name: " + name );
        }
        return goal;
    }
View Full Code Here

        if ( name == null ) {
            throw new MissingAttributeException("name");
        }
        MethodSupportTag tag = (MethodSupportTag) findAncestorWithClass( MethodSupportTag.class );
        if ( tag == null ) {
            throw new JellyException("<http:header> tag must be within a <http:method> tag");
        }
       
        if ( value != null ) {
            tag.addHeader(name, value.toString());
        }
View Full Code Here

       
*/       
        
        HttpConnection connection = getConnection();
        if ( connection == null ) {
            throw new JellyException(
                "No HTTP connection available. "
                + "This tag should have a 'uri' attribute or be nested inside "
                + "a <http:connection> tag"
            );
        }

        HttpMethod method = getMethod();
        if ( method == null ) {
            throw new JellyException( "No HTTP Method available for this tag to execute" );
        }
        int result = method.execute(getState(), connection);

        if ( var != null ) {
            context.setVariable(var, method);
View Full Code Here

            }
            catch (SecurityException e)
            {
                if ( ! e.getMessage().equals( "exitVM-0" ) )
                {
                    throw new JellyException( e );
                }
            }
            finally
            {
                System.setSecurityManager( oldSm );
View Full Code Here

                    packageName = line.substring( 8 ).trim();
                }
            }
            in.close();
        } catch (Exception e) {
            throw new JellyException("Unable to determine generated class",
                                     e);
        }
        if (generatedFileName == null) {
            return null;
        }
View Full Code Here

        Class theClass = null;
        try {
            theClass = getClassLoader().loadClass( rootClass );
        }
        catch (Exception e) {
            throw new JellyException( "Could not load class called: " + rootClass, e );
        }
       
        if ( theClass == null ) {
            throw new JellyException( "Could not load class called: " + rootClass );
        }       
        if ( path != null ) {
            reader.registerBeanClass( path, theClass );
        }
        else {
View Full Code Here

        AntlrTag antlr = (AntlrTag) findAncestorWithClass( AntlrTag.class );

        if ( antlr == null )
        {
            throw new JellyException( "<grammar> should only be used within an <antlr> block." );
        }

        antlr.addGrammar( grammar );
    }
View Full Code Here

TOP

Related Classes of org.apache.commons.jelly.JellyException

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.