// objectTomigrate is only being read, needs to be merged to lazily get the data out
SampleObject objectToMigrate = em.merge(record);
try {
// ACTION HAPPENS HERE:
migrationResult = migrationAction.migrate(pad, objectToMigrate);
} catch (NullPointerException npe) {
log.error("Caught nullpointer exception when running a migration tool. ### WRONG CONFIGURATION? ###",npe);
} catch (Throwable t) {
log.error("Caught unchecked exception when running a migration tool: "+t.getMessage(),t);
//throw new PlatoServiceException("Could not run service "+a.getName()+" on object "+record.getShortName(),t);