rollback because of object type in Scala