for(int i = 0; i < uresolvedReferenceErrors.size(); i++) {
String error = (String)uresolvedReferenceErrors.get(i);
msg += "\n" + error + "; ";
}
validationException = new SpagoBIEngineServiceException(getActionName(), msg);
jsonResponse = new JSONFailure(validationException);
} else {
scriptManager = new ScriptEngineManager();
groovyScriptEngine = scriptManager.getEngineByName("groovy");
// bindings ...
groovyScriptEngine.put("attributes", attributes);
groovyScriptEngine.put("parameters", parameters);
groovyScriptEngine.put("qFields", qFields);
groovyScriptEngine.put("dmFields", dmFields);
groovyScriptEngine.put("fields", qFields);
Object calculatedValue = null;
try {
calculatedValue = groovyScriptEngine.eval(expression);
jsonResponse = new JSONAcknowledge();
} catch (ScriptException e) {
SpagoBIEngineServiceException validationException;
Throwable t = e;
String msg = t.getMessage();
while( (msg = t.getMessage()) == null && t.getCause()!= null) t = t.getCause();
if(msg == null) msg = e.toString();
//msg = "Syntatic error at line:" + e.getLineNumber() + ", column:" + e.getColumnNumber() + ". Error details: " + msg;
validationException = new SpagoBIEngineServiceException(getActionName(), msg, e);
jsonResponse = new JSONFailure(validationException);
//logger.error("validation error", e);
}
}
try {