Package org.springframework.scripting

Examples of org.springframework.scripting.ScriptCompilationException


        ReflectionUtils.setField(f.getKey(), goo, dependency);
      }
      processor.processInjection(goo);
      return goo;
    } catch (InstantiationException ex) {
      throw new ScriptCompilationException(scriptSource, "Could not instantiate Groovy script class: "
          + scriptClass.getName(), ex);
    } catch (IllegalAccessException ex) {
      throw new ScriptCompilationException(scriptSource, "Could not access Groovy script constructor: "
          + scriptClass.getName(), ex);
    }
  }
View Full Code Here


            targetClass = targetClass.getSuperclass();
          }
        }
      }
    } catch (CompilationFailedException ex) {
      throw new ScriptCompilationException(scriptSource, ex);
    }
  }
View Full Code Here

    try {
      return (bindings == null ? engine.eval(script.getScriptAsString()) : engine.eval(
          script.getScriptAsString(), bindings));
    } catch (IOException ex) {
      throw new ScriptCompilationException(script, "Cannot access script", ex);
    } catch (ScriptException ex) {
      throw new ScriptCompilationException(script, "Execution failure", ex);
    }
  }
View Full Code Here

     
      return CFCDynamicProxy.createInstance(file, actualInterfaces);
    }
    catch (Throwable e)
    {
      ScriptCompilationException sce = new ScriptCompilationException(scriptSource, e);
     
      throw sce;
    }
  }
View Full Code Here

      // Process re-execution outside of the synchronized block.
      return executeScript(scriptSource, scriptClassToExecute);
    }
    catch (CompilationFailedException ex) {
      throw new ScriptCompilationException(scriptSource, ex);
    }
  }
View Full Code Here

        // An instance of the scripted class: let's return it as-is.
        return goo;
      }
    }
    catch (InstantiationException ex) {
      throw new ScriptCompilationException(
          scriptSource, "Could not instantiate Groovy script class: " + scriptClass.getName(), ex);
    }
    catch (IllegalAccessException ex) {
      throw new ScriptCompilationException(
          scriptSource, "Could not access Groovy script constructor: " + scriptClass.getName(), ex);
    }
  }
View Full Code Here

    }
    catch (RaiseException ex) {
      RubyException rubyEx = ex.getException();
      String msg = (rubyEx != null && rubyEx.message != null) ?
          rubyEx.message.toString() : "Unexpected JRuby error";
      throw new ScriptCompilationException(scriptSource, msg, ex);
    }
    catch (JumpException ex) {
      throw new ScriptCompilationException(scriptSource, ex);
    }
  }
View Full Code Here

        // A Class: We need to create an instance for every call.
        try {
          return clazz.newInstance();
        }
        catch (Throwable ex) {
          throw new ScriptCompilationException(
              scriptSource, "Could not instantiate script class: " + clazz.getName(), ex);
        }
      }
      else {
        // Not a Class: We need to evaluate the script for every call.
        return BshScriptUtils.createBshObject(
            scriptSource.getScriptAsString(), actualInterfaces, this.beanClassLoader);
      }
    }
    catch (EvalError ex) {
      throw new ScriptCompilationException(scriptSource, ex);
    }
  }
View Full Code Here

        }
        return this.scriptClass;
      }
    }
    catch (EvalError ex) {
      throw new ScriptCompilationException(scriptSource, ex);
    }
  }
View Full Code Here

        // A Class: We need to create an instance for every call.
        try {
          return clazz.newInstance();
        }
        catch (Throwable ex) {
          throw new ScriptCompilationException(
              scriptSource, "Could not instantiate script class: " + clazz.getName(), ex);
        }
      }
      else {
        // Not a Class: We need to evaluate the script for every call.
        return BshScriptUtils.createBshObject(
            scriptSource.getScriptAsString(), actualInterfaces, this.beanClassLoader);
      }
    }
    catch (EvalError ex) {
      throw new ScriptCompilationException(scriptSource, ex);
    }
  }
View Full Code Here

TOP

Related Classes of org.springframework.scripting.ScriptCompilationException

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.