Error message : can not find the member in the class

In reply to peter:

Your body task is incomplete. It should look like this:

 virtual task body();
   req = mem_seq_item::type_id::create("req");
   start_item(req);
   void'(req.randomize());
   finish_item(req); 
  endtask