WorkSheetDefinition workSheetDefinition = new WorkSheetDefinition();
// TODO set the encoding
workSheetDefinition.load( worksheetDefinition.toString().getBytes() );
setWorkSheetDefinition(workSheetDefinition);
} catch(Throwable t) {
SpagoBIRuntimeException serviceException;
String msg = "Impossible load worksheet definition [" + worksheetDefinition + "].";
Throwable rootException = t;
while(rootException.getCause() != null) {
rootException = rootException.getCause();
}
String str = rootException.getMessage()!=null? rootException.getMessage(): rootException.getClass().getName();
msg += "\nThe root cause of the error is: " + str;
serviceException = new SpagoBIRuntimeException(msg, t);
throw serviceException;
}
}